From: NMMX on
Hi all,

I have a few questions on how to go about generate the correct waveforms
for reading/writing from/to an external flash memory using an AVR
microcontroller.

The AVR has enough I/O to allow direct connection between address, data and
control lines. I don't have to worry about counters/latches etc.

The AVR is using a 12MHz clock. How do you work out how long each cycle
will take?

Also with the AVR it seems there can be a delay when doing I/O operations,
there is a sync latch that is half a cycle, does anyone have any
information about this?

Currently I just insert random nops to delay cycles until it works as
expected. However, I would like to be able to work this out properly so can
write more efficient code.

Regards.



---------------------------------------
Posted through http://www.EmbeddedRelated.com
From: TTman on
>
> Currently I just insert random nops to delay cycles until it works as
> expected. However, I would like to be able to work this out properly so
> can
> write more efficient code.
>
>
That's lucky...... all the info you need is in the Atmel data sheets, but I
suspect you don't understand what is in front of you. Have you thouight
about SPI flash ?


From: NMMX on
>>
>> Currently I just insert random nops to delay cycles until it works as
>> expected. However, I would like to be able to work this out properly so

>> can
>> write more efficient code.
>>
>>
>That's lucky...... all the info you need is in the Atmel data sheets, but
I
>suspect you don't understand what is in front of you. Have you thouight
>about SPI flash ?

Parallel is used due to the requirements of the project.

You're right, I don't fully understand everything within the datasheets
hence why I am asking for a little bit of help to gain better
understanding.

I'm not in a electronics background for work/academic the only resource I
have when I don't fully understand something is community forums and
books.

It is quite easy to insert enough no operation instructions so I can be
sure that I am within the correct time frames, I simply want to be able to
calculate it properly. I know a few issues that would effect this is things
such as the sync latching.

Regards.

---------------------------------------
Posted through http://www.EmbeddedRelated.com
From: linnix on
On May 26, 10:18 am, "NMMX" <alan.embedded(a)n_o_s_p_a_m.nmmx.net>
wrote:
> Hi all,
>
> I have a few questions on how to go about generate the correct waveforms
> for reading/writing from/to an external flash memory using an AVR
> microcontroller.
>
> The AVR has enough I/O to allow direct connection between address, data and
> control lines. I don't have to worry about counters/latches etc.
>
> The AVR is using a 12MHz clock. How do you work out how long each cycle
> will take?

You mean other than 1/12000000 or 0.833333333333333333333333333333ns?

>
> Also with the AVR it seems there can be a delay when doing I/O operations,
> there is a sync latch that is half a cycle, does anyone have any
> information about this?

If the clock pulse is square and the latch is level activated, it will
latch exactly half a cycle.

>
> Currently I just insert random nops to delay cycles until it works as
> expected. However, I would like to be able to work this out properly so can
> write more efficient code.

Can't help you without knowing exactly what you are trying to do.

From: Dombo on
linnix schreef:
> On May 26, 10:18 am, "NMMX" <alan.embedded(a)n_o_s_p_a_m.nmmx.net>
> wrote:
>> Hi all,
>>
>> I have a few questions on how to go about generate the correct waveforms
>> for reading/writing from/to an external flash memory using an AVR
>> microcontroller.
>>
>> The AVR has enough I/O to allow direct connection between address, data and
>> control lines. I don't have to worry about counters/latches etc.
>>
>> The AVR is using a 12MHz clock. How do you work out how long each cycle
>> will take?
>
> You mean other than 1/12000000 or 0.833333333333333333333333333333ns?

I'm pretty sure he means something other than
0.833333333333333333333333333333ns, my guess is about two orders of
magnitude more than that.