Sorry for only english .
Here is a ATTiny connected as the above schematic. Clock must be the internal clock. Datasheet says 4.8/9.6MHz . I think 4.8 is enough.
I want help for a program in Bascom .I see that ATTiny13 is not the perfect one for the task .
May be ATTiny25 or ATTiny45 will be good .
The things are :
PIN1 default 0
REF is a voltage external reference manually set (acting as GATE).
If the "Y" > REF -> LED1 ON -> PIN1 ON (relay on)
If PIN2 is >2.2V -> LED2 ON ->PIN1 ON (relay on)
Thanks to all that can help for the program.