Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

RTC DS12C887 Interrupts

By Ashutosh Bhatt

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.


Filed Under: Tutorials
Tagged With: dsc12c887, interrupt
 

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.

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!


Featured Tutorials

  • Introduction to Brain Waves & its Types (Part 1/13)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)
  • Performing Experiments with Brainwaves (Part 3/13)
  • Amplification of EEG Signal and Interfacing with Arduino (Part 4/13)
  • Controlling Led brightness using Meditation and attention level (Part 5/13)
  • Control Motor’s Speed using Meditation and Attention Level of Brain (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • What are the battery-selection criteria for low-power design?
  • Key factors to optimize power consumption in an embedded device
  • EdgeLock A5000 Secure Authenticator
  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
  • Introduction to Brain Waves & its Types (Part 1/13)

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Pull up via GPIO
  • Variable Phase shift control circuit for PWM circuit
  • Fpga wake up
  • Vco cadencd
  • Thyristor Gate Drive

RSS Electro-Tech-Online.com Discussions

  • HV Diodes
  • DIY bluetooth speaker
  • Question about ultrasonic mist maker
  • Disabled son needs advice please
  • RF modules which can handle high number of bytes per second
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 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 | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering