Link to home
Start Free TrialLog in
Avatar of bythefsh
bythefsh

asked on

building a software UART

ok brainy low level c guys.
     how difficult is it to write a software uart, as opposed to adding an actual Hardware UART to my board? and what are the typical first timer mistakes i need to look out for?
ASKER CERTIFIED SOLUTION
Avatar of griessh
griessh
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Feasibility will depend on Platform & Operating System.
If you are working with a Windows/Intel OS/Platform, then will be a little hard to ensure proper timing because windows does some task simultaneously that can consume system resources avoiding you to transmit in proper time.
If you are working with a non-multitasking operating system like DOS, this could be done succefully using many techniques, polled or interrupted, as proposed by grg99.
If you are working with a microcontroller, it could be done also without problems, there are many ways to do it and is very popular in PicMicro microcontrollers, because most of them didn't use to have a real UART.
But notice that, depending on technique choosen you will be able or not to do full-duplex communication.

Please specify Platform and OS.

Good luck,
Jaime.