??? 08/08/05 11:38 Read: times |
#98987 - Where is your problem? Responding to: ???'s previous message |
The way you've written your code makes it hard to debug. You want to test your i2c routines first before getting too complex and involving the uart. So rewrite your code to separate the i2c and the uart. Write some simple code to write a byte to the eeprom and read it back and send it out the uart. Search for some i2c code already written and tested to make your job easier. At a guess, I would say your problem is something to do with not sending a stop sequence or writing too many bytes - I think the 24c04 can only write 8 bytes at a time on a page and will probably only write after it has got the i2c stop. You then have to wait 10mS (check the device specs for the required time) for the write to complete, then you can write more data. |
Topic | Author | Date |
Ask i2c between 89c52 and 24c04 ? | 01/01/70 00:00 | |
A Link! | 01/01/70 00:00 | |
Wrong Link! | 01/01/70 00:00 | |
Based on your post about IIC not John! | 01/01/70 00:00 | |
Check WriteData() function for input | 01/01/70 00:00 | |
Uninitialised data! | 01/01/70 00:00 | |
I had initialised the ch variable | 01/01/70 00:00 | |
Where is your problem? | 01/01/70 00:00 | |
i have SDCC callable 24cxx ASM routines | 01/01/70 00:00 | |
Cross-posting![]() | 01/01/70 00:00 |