UART Communication (TX/RX pins)

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
ahmedkhalid
Posts: 28
Joined: Mon May 26, 2014 8:51 pm
Has thanked: 4 times

UART Communication (TX/RX pins)

Post by ahmedkhalid »

Hello Everyone!!

I am currently working on a module which has two sub-modules which uses TX/RX pins for UART communication.The Controller I am using is Atmega 32 which has only

one pair of pins meant for UART communication (one TX and One RX). These sub- modules works on different baud rate. So my question is that can I use the same

TX/RX pins of controller for both the sub-modules?? If yes then how?

User avatar
ionize
Posts: 25
Joined: Fri Aug 05, 2011 8:01 pm
Has thanked: 29 times
Been thanked: 11 times

Re: UART Communication (TX/RX pins)

Post by ionize »

You can use a 74HC4052N multiplexer. Since you only need to switch between 2 devices, it will only take 1 pin to do it. Here is an easy to use one: https://www.atlas-scientific.com/produc ... ctor.html?. Of course, you'll have to adjust the baud rates in your code after the switch selections.
Good Luck with your project,
Scott

ahmedkhalid
Posts: 28
Joined: Mon May 26, 2014 8:51 pm
Has thanked: 4 times

Re: UART Communication (TX/RX pins)

Post by ahmedkhalid »

Hello

I am using ESP8266 WiFi module and RS232 at the same time for my project.

There are many AVR atmega micro-controllers which have two UART interfaces, each having a pair of TX/RX pins. Like atmega 324V, atmega 644p, atmega 164P,

atmega 161, atmega 162, atmega 164A etc etc. But the thing is flowcode doesn't give me option to change the default pin connections of these modules. If I

continue with the default pin connections, will this work on hardware? Plus one more thing these modules work on different baud rates. So can I have different

baud rates on same micro-controller?

Waiting for your response!

Thanks in advance!!

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: UART Communication (TX/RX pins)

Post by Benj »

Hello,
continue with the default pin connections, will this work on hardware?
I believe the hardware UART pins are fixed, changing the hardware channel should assign the correct pins for the device. If not then let me know as some PICs have adjustable UART pins which is now fully supported.
Plus one more thing these modules work on different baud rates. So can I have different baud rates on same micro-controller?
Each hardware UART has it's own BAUD register so yes you can have different bauds on different hardware UART channels.

The new ECIO40P16 has 4 hardware UART channels with re-mappable pins.

Post Reply