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?
UART Communication (TX/RX pins)
Moderator: Benj
-
- Posts: 28
- Joined: Mon May 26, 2014 8:51 pm
- Has thanked: 4 times
Re: UART Communication (TX/RX pins)
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
Good Luck with your project,
Scott
-
- Posts: 28
- Joined: Mon May 26, 2014 8:51 pm
- Has thanked: 4 times
Re: UART Communication (TX/RX pins)
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!!
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!!
- 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)
Hello,
The new ECIO40P16 has 4 hardware UART channels with re-mappable pins.
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.continue with the default pin connections, will this work on hardware?
Each hardware UART has it's own BAUD register so yes you can have different bauds on different hardware UART channels.Plus one more thing these modules work on different baud rates. So can I have different baud rates on same micro-controller?
The new ECIO40P16 has 4 hardware UART channels with re-mappable pins.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel