One week wait()

15 May 2018

Hi everyone,

I've got a LPC1768 with the application board. I'm trying to activate a solenoid valve with the microcontroller but from 2 times a day to 1 time a week. I read I can't use the "wait" or "timeout" functions because of the 30 minutes maximum. Does anyone have an idea of what the solution can be? I'd like to minimize the power consumption (I'll use battery) and use interruptions if that's possible. Thanks a lot for your help

16 May 2018

Use the Real-Time Clock (RTC) features of the LPC1768. Refer to Chapter 27 of the LPC176x User manual UM10360:

  • Measures the passage of time to maintain a calendar and clock. Provides seconds, minutes, hours, day of month, month, year, day of week, and day of year.
  • Ultra-low power design to support battery powered systems. Less than 1 microamp required for battery operation. Uses power from the CPU power supply when it is present.
  • The RTC interrupt can wake up the device from deep-sleep, power-down, or deep power-down modes.