Microcontroller › 8051 › how to send and receive 2digit data from eeprom 24c02 from array › hi you have to send data in 8
February 26, 2012 at 6:15 pm
#7198
Participant
hi
you have to send data in 8 bit pattren like 0x95 in hex number system
Example :
unsigned char array[5]={5,10,8,3}
void save() //save in EEPROM
{
start();
send_byte(0xA0); //device address
aknowledge();
send_byte(0x00); //word address
aknowledge();
send_byte(array[0]);
aknowledge();
send_byte(array[1]);
aknowledge();
send_byte(array[2]);
aknowledge();
send_byte(array[3]);
aknowledge();
stop(); // don’t forget to stop the communication
this way data will be write in sequential manner
Hope it will help U