Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Discussion Groups

Discussion Groups | Piclist | CCS M I2C 16f648A & 16F877A

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.

CCS M I2C 16f648A & 16F877A - Harrie Geerts - Nov 24 14:21:00 2004




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();





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )