Hi everybody. Happy New Year.
I have question about working with EEPROM of mc68hc912bc32 using C. I've worked with EEPROM of AVR microcontrollers, but there are some other principles of working with it. Please, can you consult me?
I've read carefully manual and created the next code:
//this code must write some data to EEPROM position
uchar EEPROM_Write(unsigned short* addr) { //addr - address of EEPROM position
EEPROT = 0; //unprotect sections of EEPROM
EEPROG = 0b00000010; //set EELAT
*addr = 3231; //write to addr position data 3231
EEPROG |= 1; //set EEPGM (turn on voltage converter)
EEPROM_Wait(); //wait nearly 10 ms
EEPROG = 0; //turn off
return 1;
}
This code doesn't work. I mind doesn't work that there are no changes in memory map in simulator (EEPROM 0x0d00 - 0x0fff).
Can you say me something about that? Thanks.