Yahoo Groups archive

AVR-Chat

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

Message

Re: [AVR-Chat] SERIAL PORT IN ATTINY

2004-11-18 by Jose Fuentes

Thanks to everybody for the help!  I didn't realize
that using a XTAL I have only one pin left.  Not sure
but maybe would be better to use I2C to communicate
because it doesn't require a XTAL.

Regards,
Jose


> 8 pin chip, VCC, Gnd, X1, X2, TXD, RXD, Reset..  One
> pin left.



 --- Dave VanHorn <dvanhorn@dvanhorn.org> escribió: 
> 
> At 08:49 AM 11/18/2004, Jose Fuentes wrote:
> 
> 
> >I want to use a Attiny11 (price under 0.54) and
> >implement a serial port.  Since it doesn't have a
> >USART I have to write the software to allow the
> >microcontroller to send and receive data.  If
> somebody
> >has done something like this in assembly or C
> please
> >let me know.  Attiny11 only has 1KB FLASH and 32
> >general purpose registers.
> >Thanks.
> 
> You may be a bit hosed here.
> The T11's RC osc isn't calibrated, so you'd have to
> use a resonator or xtal 
> at the cost of two pins.   If that works for you,
> then set up an int at the 
> baud rate.
> 
> Receive:
> Put RXD on the hardware int pin (PB1)
> When you see the start bit, set the timer to int you
> in half a bit time.
> When that int fires, sample the data. If still low,
> you have a valid start 
> bit, and the next 8 timer ints simply sample and
> shift.
> If you want, you can pay attention to the stop bit,
> one more int, should be 
> "idle".
> 
> Transmit:
> TXD on any pin.
> Set the int to fire at the baud rate.
> Send a start bit, 8 data, and one stop..
> 
> 
> It's not that awful, but that means you have only
> two more pins available 
> on the chip, and one of them is reset..
> 
> 8 pin chip, VCC, Gnd, X1, X2, TXD, RXD, Reset..  One
> pin left.
> 
> Don't spend it all in one place!
> 
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> 
> $9.95 domain names from Yahoo!. Register anything.
>
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/dN_tlB/TM
>
--------------------------------------------------------------------~->
> 
> 
>  
> Yahoo! Groups Links
> 
> 
>     AVR-Chat-unsubscribe@yahoogroups.com
> 
>  
> 
> 
> 
>  

Correo Yahoo! - 6 MB, tecnología antispam ¡gratis! 
 Suscribite ya http://correo.yahoo.com.ar/

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.