Page 1 of 1
RS232 implemented as hardware or software
Posted: Mon Apr 02, 2018 2:48 am
by billduck
I have some Lithium cell boards that report the cell voltage and temperature to an UNO. A pack of 8 cells. The cell board voltage is being reported correctly when I run a hardware OR a software RS232. Since the UNO has only one hardware RS232, additional UART communication needs to be software based. When I add a second RS232 in software, the cell voltage is not being reported correctly. I am not ruling out bad code, but is there any reason I can not have 1 hardware RS232, and multiple software based RS232's.
Thanks in advance
Re: RS232 implemented as hardware or software
Posted: Mon Apr 02, 2018 2:31 pm
by medelec35
Hi billduck,
I have used hardware and software UART at the same time.
With the software side there could be an issue when interrupts are triggered at the same time as sending or receiving!
Interrupts cause software UART pulse stretching.
Is software side not working then what I do to test baud rate is send a U (Must be upper case).
Then baud is 1/timeOfEachBit.
Martin
Re: RS232 implemented as hardware or software
Posted: Fri Apr 06, 2018 3:21 am
by billduck
All's well that ends well. The software was not correct. I'll post more as it develops.
P.S. I love Flowcode!
Re: RS232 implemented as hardware or software
Posted: Fri Apr 06, 2018 7:42 am
by medelec35
billduck wrote:The software was not correct.
Have you downloaded the latest update from
here?
If you have then you should be able to sort the timing of software by selecting Custom for baud.
Then you can sent the "U" that was mentioned in a previous post, changing the custom baud until correct timing of a bit.
Martin