Pages: [1]   Go Down
Author Topic: flash memory and C  (Read 431 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, this is probably a silly question, but if I search for info on writing into arduino's flash memory, I get links (like the one in the playground: http://www.arduino.cc/playground/Code/EEPROM-Flash ) that go to an outside site (http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_rom_array ). This site has examples in C, and my problem is that I don't understand what the relationship is between this code and the arduino code that I'm familiar with. How do I make use of the sample code? Given that I don't really know C, is there any hope for me?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 183
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Since 0008 there is an eeprom library.  Documentation is in the reference:
http://www.arduino.cc/en/Reference/EEPROM
« Last Edit: June 28, 2007, 02:00:34 pm by bigengineer » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, that looks great, but I'll be needing around 2 or 3K of space for data, so EEPROM won't cut it.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 183
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using a 4Mbit dataflash chip, AT45DB041B,  from atmel. I should write some decent code and a tutorial about it. But at the moment all time is lost wrestling the arduino BT.  :-/

It works with SPI.
« Last Edit: June 28, 2007, 02:12:29 pm by bigengineer » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i'm looking forward to that tutorial. in the meantime, are there any other resources about how to use that chip?
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Basically, all the Arduino code you're familiar with is C.  You should be able to use the commands documented at the outside site (the avr-libc manual).  You might need an #include statement at the top of your sketch - in this case:

#include <avr/pgmspace.h>
Logged

Pages: [1]   Go Up
Jump to: