EEprom addressing



Hi Guys,

I am unable to write a code for data read/write from EEprom. Here's the
functio below:
signed char eeprom_read
unsigned char eeprom_read
( unsigned int address----- // 9-bit address to read (0x000 -
0x1FF) ) ------????
{
// wait for previous operation to complete
while (meeprombusy);

// eeprom now busy
meeprombusy = 1;

// store bit 8 of address
// byte operation, clear interrupt flag
DEECON = (address >> 8) & 0x01;
// store bits 0-7 of address
DEEADR = address & 0xFF;

// if not using interrupt then poll for end of operation
if (!EA || !EIEE)
{
// wait for operation to complete
while (!(DEECON & 0x80));
// eeprom no longer busy
meeprombusy = 0;
// return value
return DEEDAT;
}

I have picked this code form Code architect for LPC932. I have tried
writing address -----
Keil always a syntax error. And i want to know how can i write 6 bytes
and read them when required...

Please help..
With Regards..
Nick

.



Relevant Pages

  • Re: How to design non blocking device drivers?
    ... store the write's data and report success, ... You can also send your write requests through a queue ... He said he wanted the data written _to the EEPROM_ without blocking. ...
    (comp.arch.embedded)
  • Re: AVR (AT90S2313) EEPROM
    ... I would like to store values at a specific EEPROM address and to have ... I know how to declare a varible that will compile to be ... the STK500 plugin for AVR Studio can burn a specified hex file ...
    (comp.arch.embedded)
  • AVR (AT90S2313) EEPROM
    ... I have been doing a lot of searching and reading, ... I would like to store values at a specific EEPROM address and to have ...
    (comp.arch.embedded)
  • Log runtime to EEPROM?
    ... I want to log the total runtime of an application to an EEPROM. ... have a secure method to do that if the application get turned of at that ... the EEPROM + a flag 0 or 1 that indicate where i was able to store the ...
    (comp.arch.embedded)