[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] (no subject)
From: |
Royce Pereira |
Subject: |
Re: [avr-chat] (no subject) |
Date: |
Thu, 29 Nov 2007 09:56:54 +0530 |
Hi,
----- Original Message -----
From: "Dharmesh Joshi" <address@hidden>
To: <address@hidden>
Sent: Thursday, 29 November, 2007 3:21 AM
Subject: [avr-chat] (no subject)
Dear Sir/Madam
I am very new at the micro controller AVR, I have placed an order for my
starter kit. I have got few questions that I would like to ask.
1) In C when i make a array, as temporary memory, will the microchip
automatically see that as the RAM or do I need to type some special code.
And if so, the if I want to save whets in my array, do I just write to my
EEPROM or Flash.
If you dont specify storage, the default is SRAM. For eeprom/ flash , it
depends on your compiler. AVR-GCC uses macros to access eeprom/flash.
Commercial compilers(codevision etc) allow you to specify storage as
eeprom/flash, & generate the code automatically. Consult your compiler's
documentation/help.
2) C program has functions that can determine how much memory is the RAM.
Can these functions be used in the microchip, so if there is less memory my
chip can save other data to the EEPROM to free up space in the limited RAM.
eeprom is used for data you want to presereve during power-off. Using it as
scratchpad during run-time, will affect performance of the code, as eeprom
access is slow.
The amount of memory is determined by the chip you passto the compiler,
rather than the C program.
If you are short of sram, better use another AVR device :)
regards,
--Royce.
--------------------------------------------------------------------------------
_______________________________________________
AVR-chat mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-chat