| ??? 08/24/02 11:07 Read: times |
#27873 - RE: example using AT89S8252 internal EEPROM |
I couldn't get it working.
how to declare somthing as xdata? in my headerfile (keil) the bits are defined as EEMEN_ , but if I put that underscore in my code too, it gives an error. I did find another example on this site: char eeprom_read(unsigned int addr) { char eeprom_data = 0; eeprom_data = (*(char xdata *)addr); return eeprom_data; } void eeprom_write(char data_value, unsigned int addr) { WMCON |= 0x10; // Set the EEMWE bit to start a write to EEPROM. (*(char xdata *) addr) = data_value; WMCON &= ~0x10; // Clear the EEMWE bit to finish write. } but that doesn't work too, the only thing it returns, is the address. and what's the function of that ~ ? thanks for the example in assembler, but I can use c a little. |
| Topic | Author | Date |
| example using AT89S8252 internal EEPROM | 01/01/70 00:00 | |
| RE: example using AT89S8252 internal EEPROM | 01/01/70 00:00 | |
| RE: Dennis | 01/01/70 00:00 | |
| RE: Dennis | 01/01/70 00:00 | |
| RE: Dennis | 01/01/70 00:00 | |
| RE: example using AT89S8252 internal EEPROM | 01/01/70 00:00 | |
| RE: example using AT89S8252 internal EEPROM | 01/01/70 00:00 | |
| RE: example using AT89S8252 internal EEPROM | 01/01/70 00:00 | |
| RE: example using AT89S8252 internal EEPROM | 01/01/70 00:00 | |
RE: example using AT89S8252 internal EEPROM | 01/01/70 00:00 |



