I2C, SPI,....

Status
Not open for further replies.

YAN-1

New Member
Hi everyone. I am in the process of learning about the I2C, USART, and SPI modules in the PIC in an attempt to communicate between several PICs in a project. I want to have a master PIC send orders to other slaves and receive data from them. Can I assign like an address to each of the other slaves? How do I do that? I would really appreciate any links for any tutorials. Most of the things I find concerning the I2C module are related to EPROMs and not to several slave PICs. Thanks.
 
hi,
If speed is not important then I2C would be ideal. Every slave on I2C bus has 7-bit address, so you only need 2-wires to interface all PICs.
If speed is important, then you could use SPI (full-duplex, up to ~25Mbits), each device has to have a /CS (or SS - Slave select) pin, so that master can choose device to communicate with.
USART in asynchronus mode is NOT appropriate for multi-PIC communication
You can also try 1-wire BUS (from Dallas), but this bus is the slowest from them all.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…