| ??? 06/08/01 13:59 Read: times |
#12304 - RE: I2C interface for 24C16 + DS1307 |
Magnus,
by looking at your code snippet it seems like you haven't understand how the I2C Bus works. Philips had a nice printed document "The I2C Bus and how to use it", it was also part in IC20 i think - however i don't know if they'll have it on the web, but there should be plenty of resources giving you an insight in this fascinating bus system. Here a couple hints: Transmission timing is controlled by the slave, SCL is bidirectional an must be sensed by the clock master. A slave can and will stretch clock cycles by pulling SCL low, no need for your obscure delays. dont use too high pull-up values at high bus speeds (limit) and your bus is long and/or has many clips attached. 2K2 is a reasonable value, 10K can be too high. when reading from a slave, the master has to supply ACK/NACK. ACK/NACK (regarless of read/write) is supplied IMMEDIATELY after the low-high transition of the 9th clock pulse, there is no such thing as a ACK timeout - if the slave needs more time to decide wheter it should ACK or NACK it may stretch SCL after the 8th pulse. Cheers, Roger |
| Topic | Author | Date |
| I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| serching ADuC824 applications | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: I2C interface for 24C16 + DS1307 | 01/01/70 00:00 | |
| RE: serching ADuC824 applications | 01/01/70 00:00 | |
RE: serching ADuC824 applications | 01/01/70 00:00 |



