I want to do the following. My energy usage meter (don't know the exact correct wording) strobes a pulse every single Wh passed through. I already catch that strobe using a LDR connected to an I/O board that has a dedicated counter on that input and it works like a charm.
Now I want to get rid of the I/O board and replace it with an attiny. To be able to experiment with this, I built a simple experimentation-board with a attiny861a (the final version will probably be implemented on an attiny85, but that doesn't matter for the question), with a few leds connected and two push buttons, externally pulled up to Vcc using 22 kOhms resistors, to get some experience.
I also made a very simple program, that catches pin changes on the relevant pins using pcint, counts the numbers of presses and flashes the leds the counts of presses on the button.
Exactly like foreseen, the count increases with 1-5 with each press, yes I know I should apply debouncing with push buttons ;-)
Now the all-important question is, what will happen if I connect the LDR instead of the push button? I would expect no "debounce" issues here actually. I'd like to not do debouncing (according to the texts found here), so I will capture ANY strobe and not miss a single one.
What do you think? Suggestions?
I will test with the LDR, but it's a but difficult because all the kWh meters are taken by the existing stuff ;-) Simply flashing a torch at a LDR won't do I'm afraid ;-)