I2C Slave with PIC

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times
Contact:

I2C Slave with PIC

Post by tiny »

Hi, have any an idea, how i can programming an PIC as I2C Slave? I need one Master and 5 Slaves. I use PIC16F876 and PIC18F2680, for CAN over SPI I have not enough Pins free. Please help!!!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: I2C Slave with PIC

Post by Benj »

Hello

There should be examples available on the microchip website though they may be in assembler. Also have a look through the device datasheet and try to understand how the I2C registers go together to form a master or slave.

User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times
Contact:

Re: I2C Slave with PIC

Post by tiny »

Hello Benj, thanks for your reply. I have programmed more than 20 years ago in assembler language. I have already got the files from Microchip. I hope that I come with c-code and asm-code and the registers of the MCU to a result.

Post Reply