Communication between 2 microchips

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
User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Communication between 2 microchips

Post by Jan Lichtenbelt »

I have two inputs/ouputs left (E0 and E1 of PIC16F877A) and need to send an address and a data byte to an other microchip. What kind of communication do you advise?

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 microchips

Post by Benj »

Hello Jan

I would advise using the RS232 in software mode.

There is no buffering for the software mode so you will need to ensure that the receiver is listening by keeping the main loop fairly clear or using flow control or using a INT interrupt pin to flag that an incoming byte is being received. Option 1 or 2 are probably the easiest to implement.

I would get this working using a new set of programs and then once you are happy with the results try and plug it into your existing program.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Communication between 2 microchips

Post by Jan Lichtenbelt »

The alternative is I2C. Is that not easier? What are the advantages/disadvantages?

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 microchips

Post by Benj »

Yes I2C is an alternative however I suggest using RS232 as there is currently no I2C slave component for Flowcode and therefore you would have to manipulate the I2C registers using C code to put it into a slave mode. This could be fairly tricky to get working unless you have a good understanding of C.

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times

Re: Communication between 2 microchips

Post by electronix »

Why not use RXINT?

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 microchips

Post by Benj »

RXINT only works with hardware UARTs using RS232. If your in software mode then you have to monitor the input either using flowcontrol or by using a pin interrupt to detect the start bit of the transaction and then collect the data manually.

Post Reply