Author Topic: UART  (Read 661 times)

0 Members and 1 Guest are viewing this topic.

Offline yeohTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
UART
« 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).

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,943
  • Helpful? 98
Re: UART
« Reply #1 on: October 25, 2011, 05:37:16 PM »
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.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,150
  • Helpful? 109
Re: UART
« Reply #2 on: October 25, 2011, 05:58:32 PM »
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)?
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here

data_list