Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re: question about serial port bit banging

2005-12-28 by James Washer

I've got my avr-gcc mega8 full-duplex SW uart working.. just need to optimize it a bit now.. Thanks's for the kind offer of your code. Once I get mine where I want it, I'll take a look at yours. I'm fairly new to microcontrollers, so I like to take a stab at everything myself, before I borrow code.
thanks again
 - jim

On Wed, 28 Dec 2005 16:44:41 -0000
"Gary Dion" <gdion@engineer.com> wrote:

> 
> Hi Jim.  
> 
> Should you be using the AVR GCC compiler, you are welcome to some 
> code I wrote to implement a full-duplex software UART.  The function 
> is set up to be called at 4x the baud rate you want.  I run it at 
> 4800 baud (ie. it's called at 19.2kHz) for a GPS receiver, but 9600 
> works just fine too (when called at 38.4kHz).  This is on an ATmega8 
> running at 14.7456mHz and I haven't had any problems.
> 
> But to answer your question: 
> In TTL (I/O pin), idle is high, and the start bit is low.
> In RS-232, idle is low, and the start bit is high.
> You can find this and more on page 134 of the ATmega8 manual.
> 
> -Gary
> 
> --- In AVR-Chat@yahoogroups.com, James Washer <washer@t...> wrote:
> >
> > I need to implement a bit-bang serial port. It's my understanding 
> the RS232 "idles" high, which would mean the logic level out of a 
> max232 would be low. The start bit would then be logic high to the 
> AVR.. Is this correct?
> > 
> > thanks
> > 
> >  - jim
> >
> 
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.