Exact match. Not showing close matches.
'[PIC]: usart autobaud routine'
> I'm trying to implement an autobaud usart routine. My ideea was to change
> the spbrg value register if a frameerror occure. The result is
> interesting. It work's ok if I switch only from 57600 baud to 19200 baud
> but if I want to use more than two different baud rate ( ie: 57600, 19200,
> 9600, 4800, 2400, 1200 ) by counting how many frameerrors appears and
> change spbrg value (and brgh if necessary ) does not work.
So you intend to change bit rate, and then again if you get another framing
error, and so on, nominally taking N keypresses to step through N possible
I think you're missing the fact that if you run your UART at 57600bps, and
send it a character at 9600, you could get SIX or so framing errors.
Somehow you need to wait for all of the "noise" data generated by a single
keypress to settle down before you start looking at the next character.
On something like a PIC, I'd be very tempted to switch the uart rxd pin
into a programmed input, and measure the length of the shortest "pulse"
seen during a character, and then calculate the bitrate from that.
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
More... (looser matching)
- Last day of these posts
- In 2001
, 2002 only
- New search...