avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-libc-dev] USI to UART


From: Nigel Winterbottom
Subject: RE: [avr-libc-dev] USI to UART
Date: Tue, 13 Jun 2006 22:43:05 +0100


> -----Original Message-----
> On Behalf Of Cairns, Dustin
> Sent: Monday, June 12, 2006 7:21 PM
> To: address@hidden
> Subject: [avr-libc-dev] USI to UART
> 
> 
> 
> Has anyone used the USI as a UART based on the application note from
> ATMEL AVR307?  This app note uses the Tiny26 and I am trying to port
> this to the Mega3250 but I cannot get it working.  
> 
> Thanks, Dustin

Hello Dustin,

Not really a "avr-libc" question. I can't suggest a more applicable list but
I'm sure someone else will.

Anyway...I've followed this appnote to implement a UART using USI on a
mega169 at 1MHz. I had to slightly modify the routines given in the appnote
to suit my hardware.

The 2nd "synthesised" UART was for a command interpreter. It was very flakey
at 9600 baud; 1 in 3 command responses suffered corruption. Reception was OK
but transmission was terrible. Interrupt latency was my problem. I had to
reduce the baudrate to 2400 and modify the routines so as not to start
transmitting until after the transmit buffer was filled. (Use the USI
counter for this & reset it in the "Add chars to transmit buffer" routine.

It is now quite reliable and my application can use it as if it were a real
UART.

Nigel

<<attachment: winmail.dat>>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]