communication between 2 PIC

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
ruud67
Posts: 1
Joined: Wed Jan 06, 2010 8:14 pm

communication between 2 PIC

Post by ruud67 »

After a lot of study, I made my first flowcode V4 program for letting burn 15 different LEDS, depending on 5 switches.
Up, down, left, right and reset.
These LEDS need to be in 2 places.
1 place is the control box with some switches (and the 15 LEDS), the other place is on a flexible arm (again 15 LEDS).
Because of that flexible arm I want to use only 4 wires between the control box and the second screen, so I was thinking about I2C or RS232.
But I can’t find the right way to get started with this.
It only needs to write 15 bits from one side to the other and there is no need for feed back, can somebody help me with this (im very new in this :oops: )

Thank you
Ruud

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: communication between 2 PIC

Post by Benj »

Hello Ruud

I have moved your post into the v4 topic. Please can you post Flowcode questions here.

If you require access to the Flowcode 4 forum topic then please follow the "Online Resources" link located in the Flowcode V4 help menu.
You will require a registered copy of Flowcode 4 to gain access to the forum topic.

Are you controlling each LED from a different I/O pin. If so then it will make things easier for you. Are you also using a second micro on the end of your flexible cable or do you just want to connect up more LEDs to this?

If your using a second micro then RS232 is probably your best option. You should be able to manipulate two variables to control the two 8-bit ports connected to the LEDs. Then simply send these same control bytes over the RS232. The receiver program should then check for incoming bytes and if it received data then update it own ports for its LEDs.

If you only wish to use one micro then you could use something like the MCP23S17 or the MCP23017 which is an output expender chip controlled by SPI or I2C.

Post Reply