Society of Robots - Robot Forum
Software => Software => Topic started by: yeoh on October 25, 2011, 09:48:52 AM
-
Hello, I have several questions about the UART
How does the UART sends information from the computer to the Microcontroller? Like if I pressed A, how can I send it to the Microcontroller?
Secondly, how do I take the received information from the PC and make an if statement? Like If received info == 'A', LED_ON();?
ThankYou, I am completely new to UART. Also, i would like to give credit to societyofrobots.com for helping me alot(tutorials).
-
Did you google UART or look it up in Wikiwedia?
There is tons of info about how a UART works and how to use them.
Also google "RS232" and "asynchronous serial".
In your PC the UART is connected to the Serial COM port, 9pin D connector on the back which is RS232. You can use a 'dumb terminal' program, like TeraTera, HyperTerm or RealTerm to connect to and send/receive data over. Or you write code that 'opens' the COM port then sends and receives data. Again there is a lot of info on how to do this from many different programming languages.
On a micro-processor read the data sheet and app notes on how to its UART.
-
A little bit more info would help.
What micro controller board are you using?
Does your computer only have USB ports or does it also have RS232 ports (usually 9 pin but can be 25 pin if its very old)?