A humble request from a new visitor!
For a couple of days now, I have been trying to connect a PIC16F628 with a port expander (Philips PCF8574) via I2C. Alas, without succes. Hardware looks OK, the port expander works well (with arduino), the pic is OK: mplab, pickit2, win2K. Compiles and burns without problems. Pullups on both lines (15K). Everything mounted on a breadboard, connections checked umpteen times with a digital multimeter. No, SCL and SDA are not reversed!
Here is my code:
**broken link removed**
Alas, I do not have an oscilloscope, so I cannot see what is going on. I do see that SDA and SCl are high when not busy.
I thought that I really understood the whole I2C thing, but now I am beginning to doubt even that. So, in order to check that out too, I tried one of the excellent tutorials of
(tutorial 6.1: eeprom and LCD).
I constructed the whole thing on a breadboard, (an 24C2 instead of a pcf8574), compiled Mr. Goodwin's code, burned & turned on the power, and read: "writing ...efg" on the LCD. An error! With I2C again! Ohoh!!
I have spend so much time at it lately that my wife has started giving me "the look". Any hint or advice is very much appreciated! It could even save my marriage! (Just joking)
Thanks, and keep up the good works.
For a couple of days now, I have been trying to connect a PIC16F628 with a port expander (Philips PCF8574) via I2C. Alas, without succes. Hardware looks OK, the port expander works well (with arduino), the pic is OK: mplab, pickit2, win2K. Compiles and burns without problems. Pullups on both lines (15K). Everything mounted on a breadboard, connections checked umpteen times with a digital multimeter. No, SCL and SDA are not reversed!
Here is my code:
**broken link removed**
Alas, I do not have an oscilloscope, so I cannot see what is going on. I do see that SDA and SCl are high when not busy.
I thought that I really understood the whole I2C thing, but now I am beginning to doubt even that. So, in order to check that out too, I tried one of the excellent tutorials of
(tutorial 6.1: eeprom and LCD).
I constructed the whole thing on a breadboard, (an 24C2 instead of a pcf8574), compiled Mr. Goodwin's code, burned & turned on the power, and read: "writing ...efg" on the LCD. An error! With I2C again! Ohoh!!
I have spend so much time at it lately that my wife has started giving me "the look". Any hint or advice is very much appreciated! It could even save my marriage! (Just joking)
Thanks, and keep up the good works.