[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] sdram adress/length
From: |
David Brown |
Subject: |
Re: [avr-gcc-list] sdram adress/length |
Date: |
Thu, 10 Nov 2005 15:43:00 +0100 |
(Please post in plain text format, not tiny font html)
You can use "unsigned long int" (or uint32_t) for 32-bit unsigned integers.
I don't think there is any support for three-byte data in avr-gcc - it is
not a commonly used size in C. You'll waste a little time and space with
32-bit data, but it will save worrying about the carry.
Alternatively, and probably better, you could re-organize your loops in
terms of inner and outer loops with (at most) 16-bit counters for each.
Of course, flash write speed is by far the overhead in such a loop, not the
calculation of the increments.
And are you sure you mean sdram? I can't think of any way an sdram chip
could be connected to an AVR and still work properly. You've got to access
it synchronous to a fast clock, and refresh the data regularly.
mvh.,
David
----- Original Message -----
From: varsha
hello all,
i am using avr-gcc (GCC) 3.4.3, and using ATmega16 ,
and writng the code for copying sdram data int flash, in c language.
There are three address bytes and three length bytes for sdram.
At a time i can read 16 bytes from sdram, then i want to decerment the
length and incerement the address value bye 16.
how to increment address value(or decrement the length), by using a single
variable.
i dont want use three different bytes, because then propogating carry
becomes a problem..
is there any way , by which we can define a data type which takes three
bytes of memory...?
or how can i solve this problem?
regards,
varsha
--