PDA

View Full Version : Atmel DataFlash



smileyapple
- 3rd January 2005, 10:07
Hi,

Does anybody have any experience or code for the Atmel DataFlash memory chips. The chip I am using is the AT45DB081B.

Cheers,

Apple

mister_e
- 3rd January 2005, 15:55
this is one link refered by Bruce on a previous thread.

http://www.emesystems.com/BS2flash.htm

smileyapple
- 5th January 2005, 04:56
Hi,Steve,thank you very much!

I have viewed the link page, but i could not unterstand the code given by the page totally, because i know nothing about the language. i use c language,and my code is as follow:

unsigned int RX_data;
unsigned int writeBUF1[4]={0x84,0x00,0x00,0x00};
unsigned int readBUF1[5]={0xD4,0x00,0x00,0x00,0x00};

//send data to buffer1
void data_to_buf1()
{
PORTDbits.RD14 = 0; putsSPI1(4,writeBUF1);
WriteSPI1(0xAA);
PORTDbits.RD14 = 1;
}

//read buffer1
void read_buf1()
{
PORTDbits.RD14 = 0; putsSPI1(5,readBUF1);
while(DataRdySPI1())
RX_data = ReadSPI1();
PORTDbits.RD14 = 1;
}

//main function
int main(void)
{
initial_port();
CloseSPI1();
ConfigIntSPI1(SPI_INT_DIS);
OpenSPI1(0x0061,0x8000);
data_to_buf1();
read_buf1();
}

i followed the operation order given by the datasheet,but my code can not work. and i have connected CS and RESET pins to +3.3V . Can you give me some suggestions?

by the way, i have another question. when i visit my post , i can not see your reply, and it seem like nobody have replied, but i can visit your reply through the llink that send in my mailbox, what is the matter, can i just visit the reply though the link in my mailbox?

Thank you again!

regards

apple

Bruce
- 5th January 2005, 17:00
If you're looking for help with C code for the Atmel DataFlash, why not visit a C oriented forum?

Here's one example using the CCS C compiler.

http://www.ccsinfo.com/forum/viewtopic.php?t=20092&highlight=atmel+dataflash

The CCS forum would probably be your best bet for help with C code examples & questions. You can find it here http://www.ccsinfo.com/forum/

smileyapple
- 6th January 2005, 03:09
Bruce,thank you so much for your reply!!!

since i am a non-english speaker, it's a litter difficult for me to find help about the code on the internet, i just found a previous post about this dataflash on this web, so i asked my question here.
Thank you for your help!!!!

regards,
apple