Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Advice on PIC to PIC comms.

Status
Not open for further replies.

Mosaic

Well-Known Member
Hi all:
I need to create a data bus system to have the bus carrying up to 8 bytes of data which is updated and transmitted sequentially by a master MCU 16f886.

The data can be updated every 20 msec, this is flexible.

The slave PIc's (up to 8 of them) (also 16F886's) must receive their single data byte that is individually flagged . Each slave uses 1 of the 8 data bytes (8bit).

The 8 data bytes can be repetitively transmitted from the Master PIC, every 20 msec.
The master PIC is already running a code loop that cycles faster than 1msec.

The less data wires used the better.

thanks for any advice.
 
I would use the USART.

You can transmit to multiple receivers, and it would all be one one wire. Each slave would receive all the data and only use its own byte.

If you need the slaves to transmit, you need a pull-up on the return line and you need to disable the slave transmitters unless they are actually transmitting.
 
IMO a synchronous bus like SPI or I2C is better than the USART. There's also the pin happy PSP bus.
At 20ms the I2C bus would be best and the least amount of I/O (2 pins)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top