Maker Pro
Maker Pro

Attiny85 vs Pin 1 as an Input

Hey !

working on something that will use an Attiny85.

In a nut shell, I want to detect the presence of something, and via I2C, control 3 LEDs (R,G,B)

So far, I have found most of my information, but still struggling with pin 1.

My planned pin-out is as follow:

1- TCRT5000 sensor
2- Red LED
3- Green LED
4- Gnd
5- SDA for I2C
6- Blue LED
7- SCK for I2C
8- VCC

Now, my problem with pin1, is that it is the reset pin ! Spec sheet mention that it can also be an AnalogIn, which would be suitable for the TCRT5000, but isn't there a chance that I keep resetting the whole thing ?

Can I make sure that it does not happen, other then playing with the fuses, which would require HV to re-program the chip ?
 

Harald Kapp

Moderator
Moderator
Now, my problem with pin1, is that it is the reset pin ! Spec sheet mention that it can also be an AnalogIn, which would be suitable for the TCRT5000, but isn't there a chance that I keep resetting the whole thing ?
When configured as input, Pin 1 loses the RESET capability. This should be of no concern once the circuit is operating properly (incl. working firmware).

Be aware, however, that RESET is required for in-circuit programming of an AVR (Attiny). Once pin 1 is programmed as input, you will no longer be able to re-program the chip in-circuit. You will need to resort to what is called HV-programming (HV = high voltage, 12 V) to re-program the chip.
 
Top