Lesson-16: Real time clock DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK



Similar documents
Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

AN974 APPLICATION NOTE

Interrupts and the Timer Overflow Interrupts Huang Sections What Happens When You Reset the HCS12?

Timer Value IRQ IACK

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.

Computer and Set of Robots

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Chapter 13. PIC Family Microcontroller

AVR134: Real Time Clock (RTC) using the Asynchronous Timer. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Real-Time Clock. * Real-Time Computing, edited by Duncan A. Mellichamp, Van Nostrand Reinhold

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Monitoring of Intravenous Drip Rate

INTERRUPTS. There are 2 methods for communicating between the microcontroller and the external system: POLLING INTERRUPTS

Operating Systems. Lecture 03. February 11, 2013

8051 MICROCONTROLLER COURSE

A High Resolution Performance Monitoring Software on the Pentium

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

Section 29. Real-Time Clock and Calendar (RTCC)

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

Microprocessor & Assembly Language

AVR Timer/Counter. Prof Prabhat Ranjan DA-IICT, Gandhinagar

Microtronics technologies Mobile:

Serial Communications

Small Hardware Development and Prototyping Board for the SX28

AVR1321: Using the Atmel AVR XMEGA 32-bit Real Time Counter and Battery Backup System. 8-bit Microcontrollers. Application Note.

Flash Microcontroller. Memory Organization. Memory Organization

AN3371 Application note

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Computer-System Architecture

Below is a diagram explaining the data packet and the timing related to the mouse clock while receiving a byte from the PS-2 mouse:

CoE3DJ4 Digital Systems Design. Chapter 4: Timer operation

AN4646 Application note

GPS NTP TIME SERVER Rack Version V2

Timer A (0 and 1) and PWM EE3376

Computer Organization and Components

AXI Performance Monitor v5.0

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan

(Refer Slide Time: 00:01:16 min)

TIMING DIAGRAM O 8085

Overview of the Cortex-M3

Byte code Interpreter for 8051 Microcontroller

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

GPS NTP TIME SERVER Rack Version V2.2x

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

Computer Organization. and Instruction Execution. August 22

Modbus RTU Communications RX/WX and MRX/MWX

PROGRAMMING CONCEPTS AND EMBEDDED PROGRAMMING IN C, C++ and JAVA: Lesson-4: Data Structures: Stacks

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Remote Access. Table Of Contents. Rev: 3.30, 8/03

REAL TIME OPERATING SYSTEMS. Lesson-3:

How to design and implement firmware for embedded systems

71M6521 Energy Meter IC. Real Time Clock Compensation. The Challenge. The RTC in the 71M6521D/F. Theory of Operation APPLICATION NOTE

AN LPC1700 RTC hardware auto calibration. Document information. RTC, Hardware Auto Calibration, LPC1700, Graphic LCD

8-bit Microcontroller. Application Note. AVR415: RC5 IR Remote Control Transmitter. Features. Introduction. Figure 1.

AN108 IMPLEMENTING A REALTIME CLOCK. Relevant Devices. Introduction. Key Points. Overview

AN3307 Application note

GPS NTP Time Server for Intranet Networks DIN RAIL Version

CHAPTER 4 MARIE: An Introduction to a Simple Computer

eztcp Technical Document Modbus/TCP of eztcp Caution: Specifications of this document may be changed without prior notice for improvement.

RENESAS TECHNICAL UPDATE

AN3307 Application note

DP8570A DP8570A Timer Clock Peripheral (TCP)

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Keil C51 Cross Compiler

Allows the user to protect against inadvertent write operations. Device select and address bytes are Acknowledged Data Bytes are not Acknowledged

Embedded Software development Process and Tools: Lesson-4 Linking and Locating Software

Programming Examples. B.1 Overview of Programming Examples. Practical Applications. Instructions Used

74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

ARM Cortex STM series

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

Section 14. Compare/Capture/PWM (CCP)

Hardware and Software Requirements

Freescale Semiconductor, I

Detecting a CPM Overload on the PowerQUICC II

Backup Power Domain. AN Application Note. Introduction

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers

Event counters in NOVA

Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362

DS1104 R&D Controller Board

8-bit Microcontroller. Application Note. AVR400: Low Cost A/D Converter

An Introduction to the ARM 7 Architecture

The Real-Time Operating System ucos-ii

AN3252 Application note

8051 hardware summary

Keil Debugger Tutorial

Modbus Protocol. PDF format version of the MODBUS Protocol. The original was found at:

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

How To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player

AN141 SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES. 1. Introduction. 2. Overview of the SMBus Specification. 2.1.

Introduction to Operating Systems. Perspective of the Computer. System Software. Indiana University Chen Yu

8254 PROGRAMMABLE INTERVAL TIMER

Commissioning IDENTControl Compact IC-KP2-2HB17-2V1D Profinet Protocol with a Siemens S7 PLC

2.0 Command and Data Handling Subsystem

CSE2102 Digital Design II - Topics CSE Digital Design II

Transcription:

DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK Lesson-16: Real time clock 1

Real Time Clock (RTC) A clock, which is based on the interrupts at preset intervals. An interrupt service routine executes on each timeout (overflow) of this clock. This timing device once started never resets or never reloaded with another value. Once it is set, it is not modified later. 2

RTC Used in a system to save the time and date. Used in a system to initiate return of control to the system (OS) after the set system clock periods 3

RTC Application Assume that a hardware timer of an RTC for calendar is programmed to interrupt after every 5.15 ms (=1 day period/ 2 24 ) Assume each tick (interrupt) a service routine runs and updates at a memory location. Within one day (86400 s) there will be 2 24 ticks, the memory location will reach 0x000000 after reaching the maximum value 0xFFFFFF. 4

RTC with 5.5 ms tick Within 256 days there will be 2 32 ticks, the memory location will reach 0x00000000 after reaching the maximum value 0xFFFFFFFF. A battery is used to protect the memory for long period 5

RTC for implementing a software timer RTC for implementing a software timer A hardware 16-bit timer ticks from processor clock after 0.5 µs. It will overflow and execute an overflow interrupt service routine after 2 15 µs = 32.768 ms. The interrupt service routine can generate a port bit output after every time it runs or can call a software routine or send a message for a task. If n = 30, the RTC initiated software will run every 30 32.768 ms, which is close to 1 s. 6

68HC11 microcontroller RTC Pulse Accumulator Control Register, PACTL and two lowest significance bits, RT1-RT0 (1st and 0th). PACTL is write only. If the RT1-RT0 pair is set =0-0, an RTC interrupt can occur after 2 13 pulses of the E clock. If the E clock pulses are of 2 MHz and T is 0.5 µs, the interrupt from a real time clock occurs after every 4.096 ms. 7

68HC11 microcontroller RTC 68HC11 microcontroller RTC If the RT1-RT0 pair is 01, an interrupt can occur after 2 14 pulses of the E clock, that is, after 8.192 ms. If the RT1-RT0 pair is 10, the interrupt can occur after 2 15 pulses of the E clock, that is after 16.384 ms. If the RT1-RT0 pair is 11, an interrupt can occur after 2 16 pulses of the E clock, that is, after 32.768 ms. The real time clock is based on a free running counter. RT1-RT0 bits control its rate factor 8

68HC11 microcontroller RTC RTC disabled or enabled by the I bit in the CC (clock control) register Interrupts from real time clocks are also locally masked by the 6th bit, RTI in timer interrupt mask register2, TMASK2. 9

Unmask and reset to mask of real time interrupt RTI is set to unmask and reset to mask the real time interrupt locally. If RTI and I bits permit the interrupt request for real time, the microcontroller fetches the lower and higher bytes of the interrupt servicing routine address from the addresses 0xFFF0 (higher byte) and 0xFFF1 (lower byte) 10

Summary 11

We learnt A real time clock (RTC) provides the system clock to generate the system interrupts An interrupt service routine executes on each tick (timeout or overflow) of this clock. This timing device once started is generally never reset or never reloaded to another value 12

End of Lesson 16 of Chapter 3 13