A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
|
I'm using CCS M compiler. I want an interface I2C between a master 16f648A and a slave hardware I2C 16F877A. I'm succeeded in sending commands from the 648A to the 877A. But I can't transmit data from the 877A to 648A. Does anybody have an example. 16F648A master code i2c_start(); i2c_write(0xF0); i2c_write(0x01); i2c_write(170); i2c_stop(); i2c_start(); i2c_write(0xF1); i2c_write(0x01); //Here it keeps waiting read_in = i2c_read(); i2c_stop(); |