|Demand Peripherals Robotics and Automation Made Easy|
RTC: Real-Time Clock
The Real-Time Clock peripheral and battery-backed RTC card let you keep time when your device is powered off. when used with one of the DPI power distribution cards, the RTC peripheral and card let you set a wake time at which power is restored to your system.
The RTC peripheral must be paired with the RTC card. The card contains a NXP PCF2123 RTC chip and a CR2032 battery. You can set and get time from the card, and you can enable and set a wakeup time. An open-drain output on the card goes low when the alarm time is reached. This output is meant to connect to the remote input on a power distribution card. The combination of the RTC card and PD25 card lets you power down your robot and have it wake up at a later time.
time : the current time. The time resource is the current time in the RTC chip. Use dpset to set the time and dpget to retrieve it. The time format is:
Weekday Month Monthday Hour24:Minute:Second TimeZone YearFor example:
Sat Sep 10 14:42:00 PDT 2018
alarm : wake time. The alarm resource is the time at which the alarm output on the RTC card will go low. The alarm output goes low only if the state is 'enabled'. The format for the alarm time is the same as that of the time resource. This resource works with both dpset and dpcat.
state : state of the alarm. The state resource lets you enable or disable the alarm. Using dpset you can set the state to 'off' or 'enabled'. The states visible using dpget are 'off', 'enabled', and 'triggered'. A triggered state means that the alarm has triggered and the alarm output on the RTC card is low.
Set the date and time on the RTC card
dpset rtc time Sat Sep 10 14:42:00 PDT 2018Set the alarm time and enable the alarm.
dpset rtc alarm Sun Sep 11 02:02:00 PDT 2018 dpset rtc state enabled