??? 05/30/07 09:22 Read: times |
#140037 - Polling the 24C02 EEPROM for ready Responding to: ???'s previous message |
David Prentice said:
Philippe,
I have compiled and run your code on my hardware, which is a 24C256 EEPROM (slave address 0xA0) with cpu AT89C5131 @ 24MHz. It works fine, although I would code it differently. At first sight, I thought it was a good idea to split function calls to highlight acknowledge with the two functions sendack and getack. Reading Jan's posts and yours, it seems this is not a good practise. As I'm writing this code for teaching purposes, I have to respect the "good practises". Should I "reintegrate" these acknowledge transactions into getbyte and putbyte in order to retrun proper error codes ? David Prentice said:
If you can read your 24C04 ok then it is responding to your SLAVE address of 0xAE. Yes, it is. David Prentice said:
I assume that you do not have WP on. (pin7 on a PDIP8 package) I checked that. David Prentice said:
The other point is that a Page Write will wrap around. e.g. if you have a page size of 16 (AT24C04 datasheet) then writing "Philippe" to address 9 will put "Phili" at 9..15 and "ppe\0" at address 0..3.
David. I'll check that and reply to this post ;)). - Philippe |
Topic | Author | Date |
I2C eeprom 24c02 byte write stuck in ack | 01/01/70 00:00 | |
timing | 01/01/70 00:00 | |
timing | 01/01/70 00:00 | |
what\'s the problem, exactly? | 01/01/70 00:00 | |
timing | 01/01/70 00:00 | |
how do you know that? | 01/01/70 00:00 | |
How do you know that? | 01/01/70 00:00 | |
do you have some other version of code? | 01/01/70 00:00 | |
do you have some other version of code? | 01/01/70 00:00 | |
A work around For That | 01/01/70 00:00 | |
work around For That | 01/01/70 00:00 | |
Well in my guess, you have same problem:-) as mine | 01/01/70 00:00 | |
Polling the 24C02 EEPROM for ready | 01/01/70 00:00 | |
OOPS wrong logic | 01/01/70 00:00 | |
I thought that I should try your code | 01/01/70 00:00 | |
Polling the 24C02 EEPROM for ready | 01/01/70 00:00 | |
great, but do not forget to mention | 01/01/70 00:00 | |
The Clock | 01/01/70 00:00 | |
addition - show the full picture - 'edit' to above![]() | 01/01/70 00:00 | |
i2c function signatures | 01/01/70 00:00 | |
hello friend | 01/01/70 00:00 |