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.

 

Hardware:

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.

More information about the RTC and power distribution cards can be found here cards/rtc.html, here cards/pd25.html, and here: cards/pd15.html.

 

Resources:

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 Year
For 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     : the alarm output is floating
  on      : the alarm output if forced low
  enabled : the system is armed and waiting for an alarm
Reading state allows the additional state of:
  alarm   : an alarm occurred and the alarm output is low

 

Examples:

Set the date and time on the RTC card from system time

        dpset rtc time `date --rfc-3339='seconds' -u`
Set system date from RTC clock time
        sudo date --rfc-3339='seconds' -u -s `dpget rtc time`
Set the alarm time and enable the alarm.
        dpset rtc alarm 11 02:00:00
        dpset rtc state enabled  # machine turns off 

 

FPGA Defined Peripherals
User Interface
FPGA Configuration
FPGA Buttons & LEDs
Host Tx/Rx Interface
AVR Interface
Stereo Audio Amplifier
Text LCD and Keypad
Quad WS2812 Interface
Quad Slide Pot
IR Recv/Xmit
6 Digit LCD
RC Decoder
Keyfob RF Decoder
Rotary Encoder Interface
Quad Touch Interface
Motion Control
Dual DC Motor Controller
Dual Quadrature Decoder
Quad 13 Bit Servo
Bipolar Stepper Controller
Unipolar Stepper Controller
Simple Input / Output
Quad Binary Output
Quad Binary Input
Quad GPIO
Octal Input/Output
32 Channel Binary Output
32 Channel Binary Input
Quad Serial Output
Octal Serial Output
Sensors
Octal 12-bit ADC
Quad Ping))) Interface
Pololu QTR Interface
Octal SRF04 Interface
Instrumentation
Generic I2C
Generic SPI
Octal 8-Bit DAC
Quad Digital Potentiometer
Quad PWM Output
Quad PWM Input
Quad Event Counter
Real Time Clock
Dual Pulse Generator
  

Interface Cards
Control Cards
FPGA Card
MEGA88 AVR Card
User Interface
Stereo Audio Amplifier
IR Recv/xmit
Six Digit LCD Display
Keyfob RF Receiver
Rotary Encoder
Quad Switch Card
Text LCD / keypad
Quad Slide Pot
Quad Touch Interface
Motion Control
Dual 7-amp H-bridge
Quad Open Drain Driver
Quad 10 Amp Relay Card
Input / Output
Octal 8-Bit DAC
Quad Digital Potentiometer
Octal 12-bit ADC
Octal SRF04
Quad GPIO
I2C Prototyping
SPI Prototyping
USB 2.0 Hub
Real Time Clock
Octal Input/Output
32 Channel Input
32 Channel Output
Accessories
Power Distribution Card
15 Amp Power Distribution
5 Volt Switching Regulator
ATX Power Break-Out Card
Disk Drive Power Break-Out
MP43 Aluminum Mounting Plate
WW4 Large Prototyping Card
WW2 Prototyping Card
WW1 Small Prototyping Card
SMP SMD Prototyping Card