| ??? 03/20/99 18:51 Read: times |
#312 - I2C problem with 80c552 |
Hi.
In my project i use 80C552 uc. I need to use 24C02 I2C EEPROM. I've try to use Philips code (gived by philips in 80c552 appication note - this one witch work on first memory page). When i try to write EEPROM it work fine. I do this like that: MOV MTD,#00H ; Subadress MOV MTD+1,#0FFH ; Write 0FFH MOV SLA,#0A0H ; EEPROM adress MOV NUMBYTMST,#02 ; Send two bytes SETB STA ; Start transmit (of course first I inicialize I2C) But when i try to read EEPROM it don't work :-((. When i try to read from 00 subadress it almost work (most because i've recive data in MRD+2 ?!?!). But when i try to read from diffrend subadress i don't work :-((. - I try to read like this MOV MTD,#05H ; Subadress MOV SLA,#0A0H ; EEPROM adress MOV NUMBYTMST,#01 ; Send two bytes SETB STA ; Start transmit MOV SLA,#0A1H ; set EEPROM to read MOV NUMBYTMST,#01 SETB STA Pleeeease help me. Best Regards MIKE |



