This post shows you how to program ATtiny 85 and 45 micro controllers using the Arduino as an ISP. I also explain the advantages of using Attiny chip over Arduino for DIY projects. Read More
To read a voltage we usually need analogue input. Unfortunately, the ATtiny4313 doesn’t have any analog input, which could have made reading voltage so much simpler. I was almost giving up on this feature, until I realize there are analogue comparator on the ATTiny4313 and 2313, which I could use for simple voltage level checking. The comparator in the ATtiny2313 is used to compare a changing voltage with a fixed reference voltage. The comparator pins are 13 (AIN0) and 14 (AIN1).
It wasn’t that straight-forward as I started to program the ATTiny85 and 4313 micro controllers, as I had a few problems programming them.