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

Reply to
Nick
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.