Hi, I have a kids toy that uses a photocell. When the photocell is covered up, it plays a sound. When the photocell is exposed to light again, the sound plays again.
How is this being done? I often would like to monitor a low-to-high or high-to-low transition on an analog pin for a microcontroller, but I don't want to keep reading the analog input; that would kill battery consumption. Is there a trick to translating the transition from low voltage (say ~.4V or less) to high voltage (~vcc-0.5), and turning that into a digital wake up from sleep?
I know some fancier microcontroller have ULP processors that can do analog pin reading capabilities. But I'm interested in learning a way to do this with hardware.