Brownout Detector To Save Variables to EEPROM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Request group membership
By: DDS , created: 2013-03-27 | updated: 2014-08-15

This PASM program constantly measures the pulse width of a 60-Hz clipped signal from a power transformer. This transformer is used to power the propeller circuit. In the event of a power loss (1st lost cycle) or simply turning off the power, the brownout detector clears a variable to 0, signaling your SPIN program to save it's variables to EEPROM memory before losing power. I have included a small demo program to show how I use it. The revised program returns the line frequency of the 60-hz power as a value close to 666_666 = (80_000_000/120Hz)

 

Original File Upload
AttachmentSize
Brownout_Demo_-_Archive__Date_2011.10.13__Time_09.56.zip16.01 KB
Power Fail Cog.jpg1.71 MB