Easy example code for reading information on the i2c slave (PIC16F1825)?
I want to distribute my robotic controlls to several PICs. My goal is to control every axis of my robot (including the end switches) via one PIC which are steared by a main controller.
To accomplish this I want to setup the PICs as i2c slaves. All they have to do is read information pushed by the master (8Bit) and then act according to the informations sent with the bitmask (direction, number of steps,...).
So far I have used MCC to get the slave setup and setup of the i2c adress on the PIC side.
As I haven't got any hands on experiance with i2c I would be very glad to get a pointer to a easy short example showing how implement this (reading information sent by the master).