Am programming a 16F690 chip using PicBasic Pro. My application is battery powered (3 ea NiMH AA batteries) and I am using a Low Drop Out regulator with very low quiescent power to provide Vdd = 3.3 vdc to the MCU and peripherals. I want to monitor the battery voltage with PICBasic code whenever the chip is not in SLEEP mode and then flash a red LED if the battery voltage has dropped to 3.5 volts. The 16F690 doesn't have a PLVD module. Therefore, I have been studying the Microchip AN879 application note on how to use the ULPWU module of the 16F690 as a Programmable Low-voltage Detect circuit. However, I am struggling trying to figure out how to convert the algorithm described in AN879 to PicBasic.
Do any of you have or can you point me to any PICBasic coding examples to do this or another way to do the battery monitor/low voltage detect function I need in the 16F690??
Bookmarks