Hehe, well, I didn't understand a lot the resistor ladder things in first place, then realized about the limitations, but a lot later (that's why I was trying to do it anyway) but always there is something new to learn
May I ask you both a final question, I am getting some irregularities in the behaviour (timer usually works but sometimes it just hangs) SO, I am thinking about adding some caps to smooth the input, I measured the voltage of the cheap 220V to 5V adaptor I used, and for a 30 mins timeout period looks like this:
As you can see at startup Voltage reaches 10V (I think this is bad for the uC probably) sometimes I get a reset at the start, then it is a bit noisy but near the second 1400 there is a small drop (I turn both leds on 10 mins near the end of timeout). Also the timer in the Attiny need some calibration, it is fairy unprecise = +/-11%
Will this smoothing caps in parallel fix the issue? what do you think?
Or should I replace the supply for another one... like a more expensive one? (this one is very cheap, like 1.6 usd)