bianchi77
Advanced Member level 4
- Joined
- Jun 11, 2009
- Messages
- 1,313
- Helped
- 21
- Reputation
- 44
- Reaction score
- 20
- Trophy points
- 1,318
- Location
- California
- Activity points
- 9,442
Guys,
Do you know how to read more characters on 24C16 ?
I want to read the third character (82 ),
Do you know how to read more characters on 24C16 ?
I want to read the third character (82 ),
Code:
void save() //save in EEPROM
{
start();
send_byte(0xA0); //device address
aknowledge();
send_byte(0x00); //word address
aknowledge();
send_byte(5); //send data
aknowledge();
send_byte(65);
aknowledge();
[B] send_byte(82);
aknowledge();
[/B]
stop();
}
void Read()
{
start();
send_byte(0xA0);
aknowledge();
send_byte(0x00);
aknowledge();
start();
send_byte(0xA1); //device address
aknowledge();
i=read_byte();
aknowledge();
j=read_byte();
aknowledge();
stop();
if(i==5)
{
led=0;
delay(100);
led=1;
delay(100);
write=i+48;
lcd_command(0xC6);
lcd_data(write);
}
else
led=1;
if(j==65)
{
lcd_command(0xC7);
lcd_data(j);
}
aknowledge();