Quantcast
Channel: MEL PICBASIC Forum
Viewing all articles
Browse latest Browse all 4745

PIC as I2C Slave

$
0
0
Happy new year to everybody.

This is my first post here. Whenever I had a problem, a little search in this forum presented me with very good solution posted by other members, who seemed to be experts in their respective fields.

I am planning to connect several small PIC Microcontrollers on an I2C bus. One Microcontroller (May be 16F877A) will be master and scan all the slaves one by one for changes (button press or something like that). The slave will send one data byte only when Master request data on its particular address, will remain silent for rest of the scanning period. The search will be repeated after the last slave is scanned.

I have designed several projects where the slave is an 24CXXX( EEPROM) or DS1307(RTC), which is not very difficult. They are working fine. But I am finding difficulty in thinking of a PIC as slave, assigning control and unique address bytes to each slave.

I would highly appreciate any help (code examples etc.) from those experts in this forum.

Mainul

Viewing all articles
Browse latest Browse all 4745

Trending Articles