I considered using the USI of the Tiny26 as a UART but abandoned the idea as too complex. It would be better to use simple 'bit-banging' code for a 'softUART' that is already written. Atmel's ap note on using the USI as a UART mentioned loading the start bit only into the USI serial register and transmitting it. Then the eight bit data followed by the stop bit. Three seperate interrupt modes for the USI. Then, they mentioned in passing at the end, you need to first invert the order of the bits in the byte because the USI transmits the most-significant bit first while a UART sends the least significant bit first. If you need both a UART and a SPI/I2C, then either a Tiny2313 or a Mega48 might be a better alterative model than the Tiny26. The Mega48 has the ADC like the Tiny26. Digikey has the Mega48 for $1.69, the Tiny26 for $1.55, and the Tiny2313 for $1.42 each in quantity 25 - DIP packages. Alan Probandt Portland, Oregon
Message
Re: ATTiny26: Using USI as UART // Issue
2004-12-04 by alan_probandt
Attachments
- No local attachments were found for this message.