Tin13 and ADC Channels Question

Hi all,

I'm mucking about with an ATTINY 13A at the moment and I have a few questions regarding the ADC channels.

I understand that PB5 is the reset line for flashing. So once the uC is programmed, a fuse needs to be set to disable that reset. However if we do this it means the uC can’t be flashed any more without special equipment (which I don't have). Is disabling this reset purely to stop the uC accidentaly resetting during operation if a voltage is fed to PB5? If so, what happens if PB5 is used to only output a voltage instead of reading one? Can I get away with not setting the fuse if I only use PB5 as an output?

Second quesiton that I thought of as I was typing the above paragraph - I need two ADC inputs for reading voltages (via a voltage divider network on each pin), and two outputs to provide Vdd out (so the voltage the uC is running off). Is using PB2, 3 and 4 (plus hopefully 5) the way to go? I know ADC channels can be used to read input voltages, but I've never output anything other than PWM from a uC so this is a little alien to me. Right pins? Can they even output Vdd? Head in the clouds again?

Any advice would be appreciated.


- Matt

I’m not sure about the tiny13, but with the tiny25/45/85 you can use PB5 as an I/O pin as long there’s nothing pulling it below 0.5V.

It’s also worth mentioning that PB5 is a “weak” I/O pin and can only source or sink like 2 or 3 mA.

Thanks for the reply. I don't need high current at all (it'd just be serving as an on/off signal) so it wouldn't be a problem. That being said I've figured out a way to implement my circuit with on 3 ADCs so my PB5 problem will hopefully be a non-issue.

So using PB2, 3 and 4 should be fine for supplying an output voltage upto Vdd?