There is an example of doing I2C Slave in PBP in the examples on MELABS website here http://www.picbasic.com/resources/samples.htm, just download the I2CSLAVE.BAS and I2CMAST.BAS and try them out. These samples are for the 16F877A but with some modification they do work on the 18F452 and serveral other PIC MCUs.




Bookmarks