Author Topic: No UART? No Problem! Timer Interrupt Based Serial Port  (Read 2059 times)

0 Members and 1 Guest are viewing this topic.

Offline frank26080115Topic starter

  • Supreme Robot
  • *****
  • Posts: 322
  • Helpful? 2
No UART? No Problem! Timer Interrupt Based Serial Port
« on: February 26, 2008, 11:45:07 PM »
I wrote it in the member tutorial page, it doesn't support Rx right now, but it's useful as a debug port.

http://www.societyofrobots.com/member_tutorials/node/92

Can somebody tell me why it works flawlessly for 4800 baud but not 9600?

Time per bit for 9600 baud should be 104.166667 microseconds, counting the timer to 26 should take exactly 104 microseconds.

The error rate should be 0.1%, and I should have about 1664 clock cycles between each bit, shouldn't be that busy... maybe it's only hyperterminal's fault, or my FTDI chip is being a skank...

I just got 9600 baud working, but timer needed to be 24 not 26 like calculated, and at the front of interrupt A I had to add a tiny tiny delay. But now 4800 baud is messed up...
« Last Edit: February 27, 2008, 01:03:00 AM by frank26080115 »

 

Related Topics

  Subject / Started by Replies Last post
13 Replies
4812 Views
Last post October 30, 2007, 10:15:21 AM
by Admin
22 Replies
5206 Views
Last post June 27, 2008, 07:59:44 PM
by JesseWelling
2 Replies
1741 Views
Last post October 21, 2008, 06:38:13 PM
by mbateman
12 Replies
2417 Views
Last post July 24, 2009, 09:59:04 PM
by Admin


Get Your Ad Here

data_list