Timer Value IRQ IACK



Similar documents
DAC Digital To Analog Converter

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

Operating Systems. Lecture 03. February 11, 2013

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

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

Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details

Serial Communications

AN4646 Application note

LADDER LOGIC/ FLOWCHART PROGRAMMING DIFFERENCES AND EXAMPLES

8254 PROGRAMMABLE INTERVAL TIMER

Implementing Ada.Real_Time.Clock and Absolute Delays in Real-Time Kernels

Pulse Width Modulation

Scheduling 0 : Levels. High level scheduling: Medium level scheduling: Low level scheduling

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

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

The following information can be output as speech: status of the teacher / student connection. time markers of the timers.

Loop Bandwidth and Clock Data Recovery (CDR) in Oscilloscope Measurements. Application Note

DP8570A DP8570A Timer Clock Peripheral (TCP)

FPGA Implementation of a Hybrid On-line Process Monitoring in PC Based Real-Time Systems*

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Chapter 6: From Digital-to-Analog and Back Again

Small Hardware Development and Prototyping Board for the SX28

8051 MICROCONTROLLER COURSE

Operating Systems 4 th Class

CSE2102 Digital Design II - Topics CSE Digital Design II

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

Systems I: Computer Organization and Architecture

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

UC CubeSat Main MCU Software Requirements Specification

Microtronics technologies Mobile:

Multifunction devices

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

High-Stability Time Adjustment with Real-Time Clock Module

Automating witfi STEP7 in LAD and FBD

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

Software engineering for real-time systems

Timer A (0 and 1) and PWM EE3376

Storage. The text highlighted in green in these slides contain external hyperlinks. 1 / 14

A High Resolution Performance Monitoring Software on the Pentium

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

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

Module 8. Industrial Embedded and Communication Systems. Version 2 EE IIT, Kharagpur 1

25. AM radio receiver

Linux Scheduler. Linux Scheduler

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

How to design and implement firmware for embedded systems

ES_LPC4357/53/37/33. Errata sheet LPC4357/53/37/33. Document information

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

Computer Organization and Components

ECONseries Low Cost USB DAQ

Linux scheduler history. We will be talking about the O(1) scheduler

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

Single Phase Two-Channel Interleaved PFC Operating in CrM

MONOCHROME RGB YCbCr VIDEO DIGITIZER

AN3252 Application note

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

Automating with STEP7 in LAD and FBD

TivaWare Utilities Library

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

National CR16C Family On-Chip Emulation. Contents. Technical Notes V

Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

USER MANUAL EXTROLLER

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

DS Real Time Clock FEATURES PIN ASSIGNMENT PIN DESCRIPTION

Basics of Digital Recording

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

Analog/Digital Conversion. Analog Signals. Digital Signals. Analog vs. Digital. Interfacing a microprocessor-based system to the real world.

UNIVERSITY OF WISCONSIN-MADISON Computer Sciences Department A. Arpaci-Dusseau

Synchronization of sampling in distributed signal processing systems

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

DS1307ZN. 64 x 8 Serial Real-Time Clock

Beam Loss Monitor Software Guide

Crazy Alarm Clock L A K S H M I M E Y Y A P P A N J A M E S K A Y E W I L L I A M D I E H L C O N G C H E N

Real-Time Operating Systems.

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

Atmel Norway XMEGA Introduction

VADC Versatile Analog to Digital Converter. XMC Microcontrollers August 2014

Jorix kernel: real-time scheduling

PCI230+ & PCI260+ MULTI-FUNCTION ANALOG AND DIGITAL INPUT/OUTPUT BOARDS

Flexible Active Shutter Control Interface using the MC1323x

Comparing RTOS to Infinite Loop Designs

Dr. Alexander Walsch IN 2244 Part V WS 2013/14 Technische Universität München

AVR1301: Using the XMEGA DAC. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

System Considerations

Measuring Resistance Using Digital I/O

PART B QUESTIONS AND ANSWERS UNIT I

Data Cables. Schmitt TTL LABORATORY ELECTRONICS II

SYSTEM ecos Embedded Configurable Operating System

Performance Evaluation of Software Architectures

The Real-Time Operating System ucos-ii

A Digital Timer Implementation using 7 Segment Displays

DS1104 R&D Controller Board

Simulating Power Supply Sequences for Power Manager Devices Using PAC-Designer LogiBuilder

Configuring the FlexTimer for Position and Speed Measurement with an Encoder

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

CoE3DJ4 Digital Systems Design. Chapter 4: Timer operation

ETEC Digital Controls PIC Lab 10 Pulse Width Modulation

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

Chapter I Model801, Model802 Functions and Features

A PC-BASED TIME INTERVAL COUNTER WITH 200 PS RESOLUTION

Transcription:

Real Time Clocks & s Programming with Real-time clocks Real-time clock is just another source of interrupts. Should have high priority in real-time systems Timing jitter must be accommodated or tolerated Software related use of s Single event scheduled for future time e.g. timeout for communications Regular scheduling of events e.g. time-slice multi-tasking 75

Devices Single shot operation Provides single interrupt after specied timeout Value 0 t IRQ IACK counter is loaded with the desired value and then set running. an interrupt occurs when the counter reaches zero. 76

Devices Continuous operation Provides regular interrupts at specied intervals Value 0 t IRQ IACK each time zero is reached, the counter is re-loaded with the interval value and countdown continues. 77

Devices System Clock May be consulted at any time, giving an absolute value for system time. Max Value 0 t IRQ IACK pre-load value is set to maximum. interrupt routine is responsible for keeping count of number of full sequences. 78

68230 Peripheral Interface / 24 bit counter provides extra timing information in single shot mode Enable $FFFFFF Value PRE-LOAD $000000 t IRQ IACK in fact this is really another continuous mode with a very long second cycle. 79

Sharing a Countdown While running as a system clock the timer may be accessed by many routines. sharing for single-shot or periodic interrupts is somewhat harder. Tick based timer queues Value 0 t IRQ the timer triggers an interrupt at regular intervals pending timer events are stored in a queue on each tick the interrupt routine checks to see if another timer event is due tick based queues offer limited resolution 80

Queues For accurate timing we must use a difference based timer queue: ptr to timeout queue funct ptr 1 funct ptr 2 funct ptr 3 timeout 1 timeout 2 timeout 3 absolute time of first event each queue entry contains a pointer to an event service routine timeout values are the time differences between adjacent events we need only know the absolute time for the rst event 81

Queues Value 0 t timeout 1 tim.2 timeout 3 IRQ IACK each time the counter reaches zero timeout n +1is automatically loaded into the counter interrupt routine loads timeout n +2into the pre-load registers interrupt routine adjusts absolute time register interrupt routine starts function n 82

Queues Queue manipulation Adding an event nd place in queue calculate difference timeout re-calculate difference timeout for following event Adding an event behind the rst queue element here we must modify the pre-load registers during counting Adding an event at the front of the queue we must re-start the timer with a new counter value 83

Queues Queue manipulation Periodic events we need an extra eld to indicate periodic events ptr to timeout queue funct ptr 1 funct ptr 2 funct ptr 3 timeout 1 timeout 2 timeout 3 S P period 2 S absolute time of first event periodic events must be added back into the queue when serviced 84

Hardware &s Timing accuracy is limited by unpredictable and variable response times timing jitter. For many hardware related problems, a greater accuracy is required. We can achieve this by connecting the hardware directly to the timer. input from hardware start/stop timer external clock input counts pulses enable timer output to hardware event strobes square wave generation 85

Hardware-Attached Timing Digital lter illustrating hardware attached timing S/H ADC DAC Analogue L.P.F. R.T. Processor INT Analogue L.P.F. provides separate regular strobe signals for different devices S/H ADC INT DAC 86

Hardware-Attached Timing Sharing a timer for hardware-attached applications: IRQ to controlled hardware devices 3 EN 8 line decoder Zero Detect PULSE OUT Pre-load Registers Counter Registers Device Select Register The 68230 PI/T provides a single congurable timer input line and a single timer output line 1. a device select register indicates which device receives next strobe the decoder activates the required strobe line when enabled 1 this doubles as the interrupt request 87

Hardware-Attached s the device select eld must be added to our timer queue information ptr to timeout queue absolute time of first event funct ptr 1 funct ptr 2 funct ptr 3 device sel 1 device sel 2 device sel 3 timeout 1 timeout 2 timeout 3 S P period 2 S the device select register is updated by the master service routine after the interrupt is cleared 88