Application Note. RTC Binary Counter An Introduction AN-CM-253

Similar documents
Application Note. Traffic Signal Controller AN-CM-231

Application Note. Basketball Arcade Machine AN-CM-234

Application Note. Serial Line Coding Converters AN-CM-264

Chapter 4: One-Shots, Counters, and Clocks

AN3075 Application note

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

Logic Design. Flip Flops, Registers and Counters

Obsolete Product(s) - Obsolete Product(s)

Enable input provides synchronized operation with other components

AN-822 APPLICATION NOTE

AN Cascading NXP LCD segment drivers. Document information. Keywords

Obsolete Product(s) - Obsolete Product(s)

VT5365. Single-chip optical mouse sensor for wireless applications. Features. Applications. Technical specifications. Description.

L7208. Portable consumer electronics spindle and VCM motor controller. General features. Spindle driver. Description. VCM driver.

Main components Proximity and ambient light sensing (ALS) module

STEVAL-CCM003V1. Graphic panel with ZigBee features based on the STM32 and SPZBE260 module. Features. Description

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Driver circuit for CMOS linear image sensor

TV Synchronism Generation with PIC Microcontroller

Chapter 9 Introduction to Sequential Logic

Driver circuit for InGaAs linear image sensor

AN2421 Application note

IoT Toolbox Mobile Application User Manual

ROBOT-M24LR16E-A. Evaluation board for the M24LR16E-R dual interface EEPROM. Features. Description

IMPORTANT NOTICE. Company name - STMicroelectronics NV is replaced with ST-NXP Wireless.

STEVAL-ICB004V1. Advanced resistive touchscreen controller demonstration board based on the STMPE811. Features. Description

ASYNCHRONOUS COUNTER CIRCUITS

Multi-channel LED driver with integrated boost controller for medium, large LCD panel backlight based on LED7708 and STM32F103C6T6A

GM60028H. DisplayPort transmitter. Features. Applications

IMPORTANT NOTICE. Company name - STMicroelectronics NV is replaced with ST-NXP Wireless.

Using the Synchronized Pulse-Width Modulation etpu Function by:

EVALPM8803-FWD. EVALPM8803-FWD: IEEE802.3at compliant demonstration kit with synchronous active clamp forward PoE converter. Features.

ASNT_PRBS20B_1 18Gbps PRBS7/15 Generator Featuring Jitter Insertion, Selectable Sync, and Output Amplitude Control

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

STEVAL-CCH002V2. HDMI and video switches demonstration board. Features. Description

Decade Counters Mod-5 counter: Decade Counter:

STEVAL-SPBT2ATV2. USB Dongle for the Bluetooth class 2 SPBT2532C2.AT module. Features. Description

Long and Fast Up/Down Counters Pushpinder Kaur CHOUHAN 6 th Jan, 2003

STEVAL-ILL029V1. Front panel demonstration board based on the STLED325 and STM8S. Features. Description

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

MODULE 3. Combinational & Sequential logic

STEVAL-IHM043V1. 6-step BLDC sensorless driver board based on the STM32F051 and L6234. Features. Description

HCS08 SG Family Background Debug Mode Entry

STW High voltage fast-switching NPN power transistor. Features. Application. Description

HT162X HT1620 HT1621 HT1622 HT16220 HT1623 HT1625 HT1626 COM

Main components Proximity and ambient light sensing (ALS) module

Very low-noise, high-efficiency DC-DC conversion circuit

STEVAL-ILL043V1. High end, 75 W high power factor flyback LED driver based on the L6562A with two dimmable strings. Features.

MBI5050 Application Note

STEVAL-IHM021V W, 3-phase inverter based on the L6390 and UltraFASTmesh MOSFET for speed FOC of 3-phase PMSM motor drives. Features.

STEVAL-ILL015V1. High brightness RGB LED array with LED error detection based on the STP24DP05 and STM32. Features. Description

Obsolete Product(s) - Obsolete Product(s)

STV6110A. 8PSK/QPSK low-power 3.3 V satellite tuner IC. Description. Features

IT T35 Digital system desigm y - ii /s - iii

IEC compliant smart meter system for AMI applications based on STM32, ST7570 PLM, and STPMC1/STPMS1 chipset

Netzer AqBiSS Electric Encoders

GM68020H. DisplayPort receiver. Features. Applications

HCF40193B PRESETTABLE UP/DOWN COUNTERS (DUAL CLOCK WITH RESET) BINARY TYPE

STANC0. Stereo HD-PA digitally programmable active noise cancelling audio engine. Features. System. Input and output.

DATASHEET EL1883. Features. Applications. Ordering Information. Demo Board. Pinout. Sync Separator with Horizontal Output. FN7010 Rev 2.

Sequential Logic and Clocked Circuits

Main components Narrow-band OFDM power line networking PRIME compliant system-on-chip

HCF4027B DUAL J-K MASTER SLAVE FLIP-FLOP

MC9211 Computer Organization

Logic Analyzer Triggering Techniques to Capture Elusive Problems

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of

Factory configured macros for the user logic

Training Note TR-06RD. Schedules. Schedule types

Chapter 4. Logic Design

TSIU03, SYSTEM DESIGN. How to Describe a HW Circuit

Obsolete Product(s) - Obsolete Product(s)

STDP4020. DisplayPort receiver. Features. Applications

General purpose low noise wideband amplifier for frequencies between DC and 2.2 GHz

General purpose low noise wideband amplifier for frequencies between DC and 2.2 GHz

UG0651 User Guide. Scaler. February2018

ADC Peripheral in Microcontrollers. Petr Cesak, Jan Fischer, Jaroslav Roztocil

Driver circuit for InGaAs linear image sensor

STEVAL-CCA043V1. 25 Watt mono BTL class-d audio amplifier demonstration board based on the TDA7491MV. Features. Description

Obsolete Product(s) - Obsolete Product(s)

GM69010H DisplayPort, HDMI, and component input receiver Features Applications

Using the HT1628 for Washing Machine Panel Display

STA2051E VESPUCCI 32-BIT SINGLE CHIP BASEBAND CONTROLLER FOR GPS AND TELEMATIC APPLICATIONS 1 FEATURES. Figure 1. Packages

ST10F273M Errata sheet

STEVAL-IHT005V2. Demonstration board with full 3.3 V ACS/Triac control using the STM32F100. Description. Features

STEVAL-ISA001V1. 6W Dual Output Supply using VIPer12A. Features. Blue angel. Applications

Generation and Measurement of Burst Digital Audio Signals with Audio Analyzer UPD

Obsolete Product(s) - Obsolete Product(s)

UG0682 User Guide. Pattern Generator. February 2018

Chapter 6 Digital Circuit 6-5 Department of Mechanical Engineering

INC 253 Digital and electronics laboratory I

M24SR-DISCOVERY. Discovery kit for the M24SR series Dynamic NFC/RFID tag. Features

BUSES IN COMPUTER ARCHITECTURE

STEVAL-IKR001V7D. Sub Ghz transceiver daughterboard with power amplifier based on the SPIRIT1. Features. Description

SignalTap Plus System Analyzer

UM0534 User manual. STEVAL-MKI014V1 demonstration kit for the LIS344ALH. Introduction

MSP430-HG2231 development board Users Manual

STEVAL-ISB008V1. Standalone USB Li-Ion battery charger demonstration board based on the STw4102 and STM32F103C6. Features.

Mask Set Errata for Mask 1M07J

MC54/74F568 MC54/74F569 4-BIT BIDIRECTIONAL COUNTERS (WITH 3-STATE OUTPUTS) 4-BIT BIDIRECTIONAL COUNTERS (WITH 3-STATE OUTPUTS)

POSIWIRE. WS61 with internal magnetic encoder Position Sensor. Cable Extension Position Sensors. Datasheet

Transcription:

Application Note RTC Binary Counter An Introduction AN-CM-253 Abstract This application note introduces the behavior of the GreenPAK's Real-Time Counter (RTC) and outlines a couple common design applications in which the RTC provides added configurability to circuit designers. The RTC macrocell serves as a 47-bit binary counter for lengthy timing applications but can also be modified to work as a 32-bit counter for creating shorter periodic signals. All register information and RTC specifications contained within this document reference the SLG46580/82/83 specifically, but the principles can be applied to other GreenPAK-based RTCs.

Contents Abstract...1 Contents...2 Figures...2 1 Terms and Definitions...3 2 References...3 3 Functionality Explanation...4 4 Integrating I 2 C Reading & Writing with Periodic Signals...5 5 Industry Application...7 6 Conclusion...7 Revision History...8 Figures Figure 1: RTC Block Diagram - GreenPAK Designer...4 Figure 2: RTC Counter Macrocell - SLG46580/82/83 Datasheet...4 Figure 3: Shadow Buffer Register Contents...5 Figure 4: Five-Second Periodic Signal Design using the RTC...6 Figure 5: RTC Properties for Five-Second Clock...6 Figure 6: RTC Five-Second Clock Pulse...6 2 of 9 2018 Dialog Semiconductor

1 Terms and Definitions ICs Integrated circuits LSBs Least significant bits RTC Real-time counter 2 References [1] SLG46580/82/83, Datasheet, Dialog Semiconductor. [2] AN-CM-233, External Oscillator Solutions with GreenPAK, Application Note, Dialog Semiconductor. 3 of 9 2018 Dialog Semiconductor

3 Functionality Explanation The RTC is comprised of the 15-bit and 32-bit counters shown in Figure 1 and Figure 2. By analyzing the datasheet s macrocell diagram in Figure 2, we can learn more about the configuration registers for this block as well as the associated matrix connections. Figure 1: RTC Block Diagram - GreenPAK Designer Figure 2: RTC Counter Macrocell - SLG46580/82/83 Datasheet This block s operation centers around the 32-bit time counter and the 32-bit alarm DCMP illustrated in Figure 2.The operation is simple: for every rising edge of its clock, the count value held within the time counter registers increments by one until it reaches 2 32-1. Upon reaching this value, the next clock signal causes the counter to overflow to zero and restart its count. When the registers of the time counter match the alarm DCMP registers, the RTC DCMP Out signal will go high. The RTC block operates in the 32-bit configuration as described above when the RTC s 32-bit counter is clocked, through mux selection, by the RTC Clock matrix output. Please note that the RTC s clock input should have an active high pulse width exceeding 1 µs. Assuming a 50% duty cycle, this specification allows for input clock frequencies that are less than or equal to 500 khz. Looking back at Figure 2, we see the inclusion of another 15-bit counter within the RTC macrocell. This counter s output, when selected by the mux as the 32-bit time counter s clock, becomes the 15 least significant bits (LSBs) of a 47-bit counter configuration. The 15-bit counter overflows at 2 15-1 in the same way as previously described for the 32-bit counter. When the 15-bit counter overflows to 0, the 15-bit counter clocks the 32-bit counter and the RTC block outputs a 1 into the matrix through RTC CNT DIV Out. A key feature of the 15-bit counter is that it pairs well with a 32.768 khz crystal oscillator. By selecting 32767 for the Init. counter divider data section of the RTC property window, the user can create 1-second pulses to clock the 32-bit time counter. This trivializes the process of creating arbitrary timing signals with the RTC block as you can simply calculate the desired delay in seconds and set the Alarm DCMP value: registers accordingly. 4 of 9 2018 Dialog Semiconductor

If you take another look at Figure 1 and Figure 2, you can see a matrix output named SYNC that connects to what we call the Shadow Buffer. This 48-bit buffer can be used to both read from and write to the 15-bit and 32-bit counters. Figure 3 shows the register contents for this shadow buffer which are located at the I 2 C addresses from 0x75 to 0x7A. Figure 3: Shadow Buffer Register Contents Register <989> controls the direction of the shadow buffer data transfer. When triggered by a rising edge of SYNC, a digital 1 configures the RTC block to load the counter registers with the data stored inside the shadow buffer. Alternatively, a digital 0 in register <989> stores the current count value of each of the counters in the shadow buffer registers. These register transfers are synchronized to one of two sources selected by register <990>: a rising edge on the SYNC matrix output as previously described or an I 2 C trigger signal. A digital 0 selects the SYNC trigger and vice versa. The I 2 C trigger signal is generated internally by reading (when register <989> is 0 ) or writing (when register <989> is 1 ) to any of the shadow buffer register addresses. The shadow register guarantees a stable I 2 C read from the RTC count registers when triggered via I 2 C. If you were to perform an I 2 C read on the counter registers directly, the register contents might increment during the read time, resulting in an incorrect I 2 C read. By copying the register contents into the shadow buffer, the GreenPAK allows the RTC counters to continue operating while the user reads the shadow buffer registers. For SYNC triggering and I 2 C writing to the counter registers, we recommend stopping the RTC s clock to ensure correct data transfer. Please see the SLG46580/82/83 errata files for more information. 4 Integrating I 2 C Reading & Writing with Periodic Signals To create a periodic signal with the RTC block, the designer needs to configure the RTC block to reset each time the 32-bit count matches the alarm DCMP registers. When not using I 2 C, resetting the counter requires the use of the SYNC input to transfer an initial count value from the shadow buffer to the 15-bit and 32-bit counters. By feeding the RTC DCMP OUT signal to the SYNC input as shown in Figure 4, you can create the 5 second clock pulse shown in Figure 6. Please note that this signal is generated using an external 32.768kHz oscillator. This clock period can be modified for various applications by changing the external clock speed or the Alarm DCMP value displayed in Figure 5. 5 of 9 2018 Dialog Semiconductor

Figure 4: Five-Second Periodic Signal Design using the RTC Figure 5: RTC Properties for Five-Second Clock Figure 6: RTC Five-Second Clock Pulse On occasion, a designer might want to perform an I 2 C read to check the current count of their periodic signal. This requires the user to follow a procedure as shown below: Follow the previously outlined procedure for generating periodic signals. Initialize read mode for the RTC block by changing reg <989> to 0. Change the trigger from SYNC to the I 2 C trigger by setting reg<990> to 1. Perform the I 2 C read of the desired addresses. Revert the trigger back to SYNC by setting reg <990> to 0. Reset the contents of the shadow buffer to the default values. Set the RTC block to write mode by changing reg <989> to 1. Following these steps should enable you to read the register contents of the RTC while generating a periodic signal. It is important to note that the feedback mechanism is disrupted during I 2 C reads. If the time counter registers increment above the alarm DCMP registers during an I 2 C read, the SYNC input s rising edge won t trigger a counter reset. This behavior can be detected and rectified by analyzing the results of each I 2 C read. If any read is close to the alarm DCMP compare value and there isn t enough time to reset the device s settings back to its original periodic behavior, the software can manually generate the I 2 C commands to trigger the RTC reset. 6 of 9 2018 Dialog Semiconductor

5 Industry Application The features explained in this application note can be customized for many different applications ranging from Bluetooth beacons to household electronics. You might have a temperature sensor, for example, that you want to wake up every hour to sample data. Similarly, you might want to put a Bluetooth beacon to sleep to conserve power. This block can periodically wake up the Bluetooth device to transmit its presence to nearby Bluetooth-compatible devices. This block can also keep track of the life expectancy for various electronic devices. For example, many smoke detector and carbon monoxide alarms have a lifespan of about 10 years. This block provides designers with a simple, configurable, and low power timing solution for alerting homeowners of the need to replace their devices. When clocked at 3.3V by a 32.768kHz oscillator, the use of the RTC block increases the SLG46580/82/83 s current consumption by about 250nA. Please note that this value doesn t include the current consumption due to the clock source and GPIO switching, if applicable. For additional information regarding the creation of an external oscillator circuit using GreenPAK, please see AN- CM-233. 6 Conclusion The RTC block provides a low power and cost-effective timing solution for designers to create both extended signals and short periodic alerts. When combined with the other GreenPAK logic elements, this block provides increased configurability to designers as they attempt to minimize current consumption, decrease PCB size, and reduce BOM costs for their applications. 7 of 9 2018 Dialog Semiconductor

Revision History Revision Date Description 1.0 29-Aug-2018 Initial Version 8 of 9 2018 Dialog Semiconductor

Status Definitions Status DRAFT APPROVED or unmarked Definition The content of this document is under review and subject to formal approval, which may result in modifications or additions. The content of this document has been approved for publication. Disclaimer Inf ormation in this document is believed to be accurate and reliable. However, Dialog Semiconductor does not give any representations or warranties, expressed or implied, as to the accuracy or completeness of such information. Dialog Semiconductor furthermore takes no responsibility whatsoever for the content in this document if provided by any information source outside of Dialog Semiconductor. Dialog Semiconductor reserves the right to change without notice the information published in this document, including without limitation the specif ication and the design of the related semiconductor products, software and applications. Applications, software, and semiconductor products described in this document are for illustrative purposes only. Dialog Semiconductor makes no representation or warranty that such applications, software and semiconductor products will be suitable for the specified use without further testing or modification. Unless otherwise agreed in writing, such testing or modification is the sole responsibility of the c ustomer and Dialog Semiconductor excludes all liability in this respect. Customer notes that nothing in this document may be construed as a license for customer to use the Dialog Semiconductor products, software and applications referred to in this document. Such license must be separately sought by customer with Dialog Semiconductor. All use of Dialog Semiconductor products, software and applications referred to in this document are subject to Dialog Semiconductor s Standard Terms and Conditions of Sale, available on the company website (www.dialog-semiconductor.com) unless otherwise stated. Dialog and the Dialog logo are trademarks of Dialog Semiconductor plc or its subsidiaries. All other product or service names are the property of their respective owners. 2018 Dialog Semiconductor. All rights reserved. Contacting Dialog Semiconductor United Kingdom (Headquarters) Dialog Semiconductor (UK) LTD Phone: +44 1793 757700 North America Dialog Semiconductor Inc. Phone: +1 408 845 8500 Hong Kong Dialog Semiconductor Hong Kong Phone: +852 2607 4271 China (Shenzhen) Dialog Semiconductor China Phone: +86 755 2981 3669 Germany Dialog Semiconductor GmbH Phone: +49 7021 805-0 Japan Dialog Semiconductor K. K. Phone: +81 3 5769 5100 Korea Dialog Semiconductor Korea Phone: +82 2 3469 8200 China (Shanghai) Dialog Semiconductor China Phone: +86 21 5424 9058 The Netherlands Dialog Semiconductor B.V. Phone: +31 73 640 8822 Taiwan Dialog Semiconductor Taiwan Phone: +886 281 786 222 Email: enquiry @diasemi.com Web site: www.dialog-semiconductor.com 9 of 9 2018 Dialog Semiconductor