NoEinstein
Member
I would like to run a battery-powered PicAxe with as little power as possible. As I understand it, running the clock as slowly as possible is one way to reduce power consumption. On the M2 parts, the clock can be set down to 31 kHz by using setfreq. However, I would like to have my PicAxe waiting for an IR signal to be read by the irin command, and it seems the irin command will cause the PicAxe to wait around for the IR signal while running its clock at 4 MHz, which would cause the chip to consume more power.
Is there some way to have the chip run at 31 kHz while waiting for some kind (or any kind) of IR signal, then when the PicAxe detects IR flashes, it jumps to a subroutine that activates an irin command (and thus runs at the required 4 MHz), reads the data, then sets itself back to 31 kHz until the next IR flash is detected? If so, what would be the best way to implement this? A separate phototransistor on a separate pin? Or can an IR detector module be used to do that somehow even with the PicAxe operating at 31 kHz?
Thanks.
Is there some way to have the chip run at 31 kHz while waiting for some kind (or any kind) of IR signal, then when the PicAxe detects IR flashes, it jumps to a subroutine that activates an irin command (and thus runs at the required 4 MHz), reads the data, then sets itself back to 31 kHz until the next IR flash is detected? If so, what would be the best way to implement this? A separate phototransistor on a separate pin? Or can an IR detector module be used to do that somehow even with the PicAxe operating at 31 kHz?
Thanks.