go away spammer

Author Topic: UART on any pin  (Read 3841 times)

0 Members and 1 Guest are viewing this topic.

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
UART on any pin
« on: August 23, 2008, 07:53:14 PM »
I have a question on UART.

Why is UART limited to certain pins on the AVR?
Back in my PIC days ( like 3 months ago , lol  ) I was able to achieve TTL serial communication on any pin . It seems that with the AVR UART is only on certain pins. Well serial is just a combination of 1 and 0 , so shouldn't serial be possible on any output pin?

Can someone clear this up for me ?

Thanks,
Eric
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: UART on any pin
« Reply #1 on: August 23, 2008, 08:33:08 PM »
hardware UART vs software UART . . . the previous is more accurate, faster, and less computationally expensive.

the latter is called 'bit banging'

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: UART on any pin
« Reply #2 on: August 23, 2008, 08:40:31 PM »
oh thanks for clearing that up

with hardware UART does this "run in the background" or something like that?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: UART on any pin
« Reply #3 on: August 23, 2008, 09:13:08 PM »
Someone correct me if I'm wrong here, but I believe the buffer does. But it's only like 1 byte, if I remember correctly.

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: UART on any pin
« Reply #4 on: August 23, 2008, 09:26:42 PM »
is there some function in the AVRlib for bit-banging?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: UART on any pin
« Reply #5 on: August 23, 2008, 09:48:03 PM »
If you google around, you can find source code to do it. No built in function, however.

Offline Kirk

  • Jr. Member
  • **
  • Posts: 44
  • Helpful? 2
Re: UART on any pin
« Reply #6 on: September 02, 2008, 10:23:31 PM »
The Arduino environment has a bit bang send and recieve serial on any pin that I have used.  It could be hacked to run under gcc.

Kirk

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: UART on any pin
« Reply #8 on: September 03, 2008, 04:35:57 AM »
Actually now that I think about it, I seem to remember seeing AVRlib having a software UART.

Offline Kirk

  • Jr. Member
  • **
  • Posts: 44
  • Helpful? 2
Re: UART on any pin
« Reply #9 on: September 03, 2008, 06:23:38 AM »
Oh I forgot about AVR USB   firmware only USB

http://www.obdev.at/products/avrusb/index.html

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics

 


Get Your Ad Here