This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to remember the number of power switch

How to remember the number of power switch,
Note:the power is main power,if the power off time is too long,MCU was stop working. sod ,off time less then 400ms,and MCU have a big cap to save power.
question:
if on/off power switch 1 times MCU output 500Hz on/off power switch 2 times MCU output 1000Hz ....................................
anyone have a method?
thx you .

Parents
  • Saving to data on power down usually implement a separation of mcu vcc to the rest using a low Vf diode and a buffer cap, an analog comparator or adc of the mcu detect the voltage drop on the main supply indicating a power switched off. At first power on just do 500Hz, if a short power off detected then switch mode to 1000 Hz, another one switched back to 500Hz, and so on.

    A side note, disable all I/O immediately at power off detected - do not let your high current led driver drain the buffer cap to fast.. :->

Reply
  • Saving to data on power down usually implement a separation of mcu vcc to the rest using a low Vf diode and a buffer cap, an analog comparator or adc of the mcu detect the voltage drop on the main supply indicating a power switched off. At first power on just do 500Hz, if a short power off detected then switch mode to 1000 Hz, another one switched back to 500Hz, and so on.

    A side note, disable all I/O immediately at power off detected - do not let your high current led driver drain the buffer cap to fast.. :->

Children