I wrote a very simple program but with the same output result:
5, 57
5, 255
I tried using portc.0 as SDA and portc.1 at SCL with the same result. I used a different 16F877. It just doesn't make any sense to me anymore. I've checked the datasheets and my circuit many, many times.Code:DEFINE LOADER_USED 1 DEFINE OSC 20 edata var BYTE pause 100 i2cwrite portc.4,portc.3,160,5,[57] pause 10 serout2 portc.6,32,[dec 5,44,32,dec 57,10,13] i2cread portc.4,portc.3,160,5,[edata] serout2 portc.6,32,[dec 5,44,32,dec edata,10,13] end




Bookmarks