Code seems OK, perhaps too short the delay between the write I2C command and the read
Did you place the pullup resistors on the SDA and SCL lines?
Cheers
Al.
Code seems OK, perhaps too short the delay between the write I2C command and the read
Did you place the pullup resistors on the SDA and SCL lines?
Cheers
Al.
Last edited by aratti; - 24th February 2011 at 05:42.
All progress began with an idea
Thanks, Al.
It's the same delay used by jellis00, but I think he was running 18F devices and I don't know at what speed. (Or if that would make a difference.)
Yes; per the SRF02 specifications recommendation, I used 1.8K (see the schematic).Did you place the pullup resistors on the SDA and SCL lines?
Russ
Russ
N0EVC, xWB6ONT, xWN6ONT
"Easy to use" is easy to say.
Russ, I think your problem is in the this line of code:
SCL VAR PORTA.4 ' Serial clockS
PortA.4 is an open collector pin and I think not suitable for I2C comm.
Try to change pin.
Cheers
Al.
All progress began with an idea
Bookmarks