Yahoo Groups archive

AVR-Chat

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

Message

ATtiny13 - re-using SPI pins?

2007-11-01 by Richard Cooke

Hi Folks,

I'm planning on using the ATtiny13 chip because of cost and space
constraints.  I need 2 outputs and 1 A/D input to read the battery
voltage (3V coin cell Lithium) every so often to signal to the end
user that the battery should be changed.  

The chip has 6 I/O pins but one needs to be saved for the RESET pin,
and 3 are used for the SPI lines to program the chip.  I've been using
the Dragon to program/debug other designs so I'd like to keep using that.

So now to my question -(sorry for being long winded) - What can you
"hang off" of the SPI lines to allow the chip to be programmed via the
SPI lines but then after the program starts change the pins to an
output and an A/D input?  I'd like to use one of the pins as an output
to drive a resistor divider with the middle connected to one of the
A/D inputs.

Thanks again,

Richard Cooke

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.