Hi!
You're using device adress $9A thats mean label on your sensor is TC74A5 if not, you have found out your problem. Anyway you're using same adress-command for reading as for writing that's error too.
For TC74A0 is adress 1001000* (thats mean $90 for writing $91 for read from device)
For TC74A1 is adress 1001001*
For TC74A2 is adress 1001010*
For TC74A3 is adress 1001011*
For TC74A4 is adress 1001100*
For TC74A5 is adress 1001101*
For TC74A6 is adress 1001110*
For TC74A7 is adress 1001111*
* is R/W, place 1 for reading from TC74, 0 for writing.
Anyway i'am using 4,7k pullup on both of pins.
This code is working for me (replace device adress if you've another):
BStart ; initiate i2c start
i2cwrite sda,scl,$90,$1,[$00] ' Place in normal operating mode
BStop ; stop i2c
Pause 10
BStart ; initiate i2c start
i2cread sda,scl,$91,$0,[temp] ' Read temperature
BStop ; stop i2c
Hope that will help you...
(and sorry for my english)
Milos
Bookmarks