Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

RTC DS12C887 Interrupts

By Ashutosh Bhatt September 9, 2010

RTC DS12C887 has three interrupts, namely, Alarm interrupt, Periodic interrupt & Update interrupt.
 
ALARM INTERRUPT
The alarm interrupt occurs whenever the current time matches the alarm time. When this interrupt occurs, the corresponding flag in the Register C is set. The IRQ pin also goes low only in case the alarm interrupt enable bit is set in the Register B.
 
The alarm interrupt can be programmed to occur at three different rates, namely,  (a) once per day, (b) once per hour, (c) once per minute, and (d) once per second.
 
(A) Once per Day Alarm:
To program the alarm for once per day, we write the desired time for the alarm into the hour alarm, minute alarm and second alarm registers (1,3 and 5 respectively). As the clock keeps the time, when all three bytes of hour, minute and second for the RTC match the values in the alarm hour, minute and second , the AF (alarm flag) bit in register C will go high. In order to use the IRQ pin of RTC for an alarm, the interrupt-enable bit for alarm in register B (AIE) must be set high.
 
(B) Once per Hour Alarm:
To program the alarm interrupt to occur once per hour, we write the value 11xxxxx into the alarm hour. Value 11xxxxx means any hex value between C0H to FFH. Very often, FFH is used.
 
(C) Once per Minute Alarm:
To program the alarm for once per hour, we write value 11xxxxx into both the alarm hour and the alarm minute registers.
 
(D) Once per Second Alarm:
To program the alarm for once per second, we write value FFH into all three registers of alarm i.e. alarm hour, alarm minute and alarm second.
 
PERIODIC INTERRUPT
The second interrupt is the periodic Interrupt. Whenever a periodic interrupt occurs the periodic interrupt flag (PF) will go high, at a rate set by RS3-RS0 bits of register A. This rate can be from once every 500 ms to once every 122 micro seconds. In order to use the IRQ pin of RTC, the periodic interrupt-enable bit in register B (PIE) must be set to high. The following table describes the setting of bits RS3-RS0 of the Register A for the different time period of the periodic interrupt.
 
RS3
RS2
RS1
RS0
Periodic interrupt rate
0
0
0
0
None
0
0
0
1
3.9062 ms
0
0
1
0
7.812 ms
0
0
1
1
122.070 micro sec
0
1
0
0
244.141 micro sec
0
1
0
1
488.281 micro sec
0
1
1
0
976.5625 micro sec
0
1
1
1
1.953125 ms
1
0
0
0
3.90625 ms
1
0
0
1
7.8125 ms
1
0
1
0
15.625 ms
1
0
1
1
31.25 ms
1
1
0
0
62.5 ms
1
1
0
1
125 ms
1
1
1
0
250 ms
1
1
1
1
500 ms
 
UPDATE ENDED INTERRUPT
This interrupt is used to indicate that the values of time date and calendar of the RTC have been updated and are ready to be picked up. The update cycle occurs once every second. Whenever this interrupt occurs the corresponding bit in Register C gets high.

You may also like:

  • battery types
    What are the different battery types for specific applications?
  • battery selection low power design
    What are the battery-selection criteria for low-power design?

  • How to achieve longer MCU battery life with low power…

  • What is MicroPython?

  • What are the different types of temperature sensors and their…

Filed Under: Tutorials
Tagged With: dsc12c887, interrupt
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Snooping Around is All
  • mosfet driver problem in regeneration mode
  • Industrial Relay Board Design for Motorcycle Use
  • connector model question
  • ADEM III ECM — No CAN Signal & Power Supply Issue

RSS Electro-Tech-Online.com Discussions

  • Sump pit water alarm - Kicad 9
  • Pic18f25q10 osccon1 settings swordfish basic
  • Anyone jumped from Easyeda std to Easyeda pro?
  • turbo jet fan - feedback appreciated.
  • More fun with ws2812 this time XC8 and CLC

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • How IoT network topologies work
  • The top five AI startups to watch in 2025
  • STMicroelectronics unveils SoC based on secure MCU
  • Nexperia’s 48 V ESD diodes support higher data rates with ultra-low capacitance design
  • Taoglas releases Patriot antenna with 18 integrated elements covering 600 to 6000 MHz

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe