mikkolaa
Newbie level 4
i2c communication between two microcontrollers
Hello,
I am starting programming programs whitch communicate between two PIC18F6520.
(It is possible to use SPI also, but what is maximum cable lenght between SPI devices?)
The protocol should be very easy. It will be send only 2-4 bytes at one time.
I think I need use dual master mode, because second PIC send error codes to
master PIC.
I have no idea how to start the I2C project. (The master PIC is working now
without I2C, but next I will write I2C protocol to "slave" and current "master" pic.
I am using MPLAB 7.4 ASM coding.
Can you anyone advice some to start project? Example code?
I have PIC18C Reference Manual.
Hello,
I am starting programming programs whitch communicate between two PIC18F6520.
(It is possible to use SPI also, but what is maximum cable lenght between SPI devices?)
The protocol should be very easy. It will be send only 2-4 bytes at one time.
I think I need use dual master mode, because second PIC send error codes to
master PIC.
I have no idea how to start the I2C project. (The master PIC is working now
without I2C, but next I will write I2C protocol to "slave" and current "master" pic.
I am using MPLAB 7.4 ASM coding.
Can you anyone advice some to start project? Example code?
I have PIC18C Reference Manual.