Can you use Reset for GPIO? Possible in the ATTiny15, don't know about the 11. ----- Original Message ----- From: "Jose Fuentes" <josecarlosfuentes@yahoo.com.ar> To: <AVR-Chat@yahoogroups.com> Sent: Thursday, November 18, 2004 2:56 PM Subject: Re: [AVR-Chat] SERIAL PORT IN ATTINY > > 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 > > > > > > > > Yahoo! Groups Links > > > > > > AVR-Chat-unsubscribe@yahoogroups.com > > > > > > > > > > > > > > Correo Yahoo! - 6 MB, tecnología antispam ¡gratis! > Suscribite ya http://correo.yahoo.com.ar/ > > > > > Yahoo! Groups Links > > > > > > >
Message
Re: [AVR-Chat] SERIAL PORT IN ATTINY
2004-11-18 by Tony Vandiver
Attachments
- No local attachments were found for this message.