DPRG
DPRG List  



[DPRG] AVR Software UART

Subject: [DPRG] AVR Software UART
From: Kipton Moravec kip at kdream.com
Date: Mon Feb 18 10:15:42 CST 2008

I do not know how price or cost is an issue, but NXP has a I2C or SPI to
UART converter. It has 64 byte FIFO and 1 or 2 UARTS. It can interrupt
you when it has data so you do not have to poll. It can have its own
crystal so you can run any baud rate.

Kip


On Mon, 2008-02-18 at 09:31 -0500, DeltaGraph at aol.com wrote:
> Hey Scott,
>  
> Not looking at any provided code..
>  
> Just my two cents:
>  
> Make sure transmit code cannot be interrupted, or at least interrupted
> for very long or your data stream timing might be corrupted. Of
> course, now, any other interrupts must tolerate the millisecond it
> takes to send a byte, after which you might want to allow interrupts,
> that is, if you need to send 10 bytes, probably not good to do it all
> in a loop.
>  
> 1 MHz a pretty slow clock speed for an AVR, depending on what you are
> doing, you might want to go with a faster clock if you can.
>  
> For most of my AVR stuff, I like to have a nice fast periodic timer
> driven interrupt that I can hang multiple processes off of.
>  
> Finally, if you want to allow your code to be interrupted, then get it
> working in an interrupt free environment then go for seeing what
> happens when you switch everything on.
>  
> Of course an oscilloscope is a real friend with doing software UART
> stuff. You will see the glitches...
>  
>  
> Ron
>  
>  
>  
> 
> 
> 
> 
> ______________________________________________________________________
> Delicious ideas to please the pickiest eaters. Watch the video on AOL
> Living.
> _______________________________________________
> DPRGlist mailing list
> DPRGlist at dprg.org
> http://list.dprg.org/mailman/listinfo/dprglist
-- 
Kipton Moravec KE5NGX
"Always do right; this will gratify some people and astonish the rest."
--Mark Twain


More information about the DPRG mailing list

Copyright © 1984 - 2006 Dallas Personal Robotics Group. All rights reserved.
Website Design by NCC

For the latest robot news visit robots.net