|
[DPRG] AVR Software UART
Subject: [DPRG] AVR Software UART
From: DeltaGraph at aol.com
DeltaGraph at aol.com
Date: Mon Feb 18 08:31:57 CST 2008
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
**************Ideas to please picky eaters. Watch video on AOL Living.
(http://living.aol.com/video/how-to-please-your-picky-eater/rachel-campos-duffy/
2050827?NCID=aolcmp00300000002598)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.dprg.org/pipermail/dprglist/attachments/20080218/883f716a/attachment.html
More information about the DPRG mailing list
|