Brownout Detector To Save Variables to EEPROM

Warning message

The Propeller Object Exchange system is decommissioned and replaced with a GitHub repository to house the same existing and future Propeller objects. As of 12/5/2019, this site is read-only. You can continue to browse and download objects from here for a limited time; however, please begin using the Parallax Propeller repository for future reference.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1
Request group membership
By: 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
Package icon Brownout_Demo_-_Archive__Date_2011.10.13__Time_09.56.zip16.01 KB
Image icon Power Fail Cog.jpg1.71 MB