Example of RTMES Lab. 1 Controls Kukhee Kim June 24, 2010 Example of RTEMS Lab. Controls Department June 24, 2010 Kukhee Kim.

Slides:



Advertisements
Similar presentations
Real-Time Library: RTX
Advertisements

4-1 Timers Timers can be used for  timing  event counting  pulse width measurement  pulse generation  frequency multiplication There are 8 Timers.
C Examples 1.
Chung-Ta King National Tsing Hua University
1 Lab 3 Objectives  Case study: “Hello world” program on motes  Write you first program on mote.
A look at interrupts What are interrupts and why are they needed.
68HC11 Polling and Interrupts
Timers in Hardware ECE152. Overview Why are timers important – Watchdog – Task switching – Accurate time of day Can use polling or interrupts.
Thursday, June 08, 2006 The number of UNIX installations has grown to 10, with more expected. The UNIX Programmer's Manual, 2nd Edition, June, 1972.
A look at interrupts What are interrupts and why are they needed in an embedded system? Equally as important – how are these ideas handled on the Blackfin.
Architectural Support for OS March 29, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
1 Lecture 6 Performance Measurement and Improvement.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
8-Bit Timer/Counter 0 Counter/Timer 0 and 2 (TCNT0, TCNT2) are nearly identical. Differences: -TCNT0 can run off an external 32Khz clock (Tosc) or the.
Read Chapter 3 (David E. Simon, An Embedded Software Primer)
A look at interrupts What are interrupts and why are they needed.
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
The 8051 Microcontroller and Embedded Systems
LAB 7: WDT+ and Low-Power Optimization
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
8051 timer/counter.
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
V 0.91 Polled IO versus Interrupt Driven IO Polled Input/Output (IO) – processor continually checks IO device to see if it is ready for data transfer –Inefficient,
ARM Timers.
1 4-Integrating Peripherals in Embedded Systems. 2 Introduction Single-purpose processors  Performs specific computation task  Custom single-purpose.
System Clocks.
ELEC4601 Microprocessor systems Lab 3 Tutorial
Clock Options and Sleep Modes. Clock Sources Flash Fuse bits can be programmed to choose one of the following Clock sources: 1. External RC Osc. f = 1/(3RC).
1 Lab 1: Introduction. 2 Configure ATMEL AVR Starter Kit 500 (STK500), a prototyping/development board for Lab1. ATmega16 ( V) is the chip used.
Interrupts and reset operations. Overview  Introduction to interrupts – What are they – How are they used  68HC11 interrupt mechanisms – Types of interrupts.
1 LHO 13 The 8051CF020 and the University Daughter Card.
Timers /Counters Programming  The 8051 has 2 timers/counters: ○ timer/counter 0 ○ timer/counter 1 They can be used as 1. The timer is used as a time.
Timer Timer is a device, which counts the input at regular interval (δT) using clock pulses at its input. The counts increment on each pulse and store.
Lab 13 Department of Computer Science and Information Engineering National Taiwan University Lab13 – Interrupt + Timer 2014/12/23 1 /16.
ECGR-6185 µC/OS II Nayana Rao University of North Carolina at Charlotte.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Conclusion Speech. Content Organization Pronunciation Handwriting.
1 68HC11 Timer HC11 or HC12: Chapter HC11 Timer Subsystem  Several timing functions: Basic timing Basic timing Real time interrupts Real time.
Microprocessor and Interfacing Example: Writing a Game Need to Check Keyboard Input.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Digital Control CSE 421.
Arduino Mega Arduino Mega 2560 Arduino Mega 2560.
System Software Design Engineer: Mac Gainor Western Washington University.
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
Lecture 3 CSE 341 – Microprocessors Lecture 3 Md. Omar Faruqe UB 1228
Acceleration Sensing Dec 10, 2004 Zhong-Yi Jin William Chang.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Hardware Needs 18F452 Main Controller CM8870 DTMF Decoder UART in PIC, MAX232 Serial Port Line Level Converter Amplifier for IR Detector Voltage feed into.
MICROCONTROLLER INTERFACING WITH STEPPER MOTOR MADE BY: Pruthvirajsinh Jadeja ( ) COLLEGE:DIET BRANCH:EC.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview: Using Hardware.
Timer Programming in Assembly and C Prepared By:
Introduction In this lab , we will learn
Homework Reading Machine Projects Labs
Digital Control CSE 421.
68HC11 Interrupts & Resets.
Lesson Objectives Aims Key Words Interrupt, Buffer, Priority, Stack
Timer and Interrupts.
Chapter 6 General Purpose Input/Output
8-Bit Timer/Counter 0 Counter/Timer 0 and 2 (TCNT0, TCNT2) are nearly identical. Differences: -TCNT0 can run off an external 32Khz clock (Tosc) or the.
National Tsing Hua University CS4101 Introduction to Embedded Systems Lab 3: Interrupt Prof. Chung-Ta King Department of Computer Science National Tsing.
Computer System Overview
BRX Technical Training
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
Processes David Ferry CSCI 3500 – Operating Systems
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
CS4101 Introduction to Embedded Systems Lab 2: Basic IO and Timer
Embedded Systems Workshop 2
Presentation transcript:

Example of RTMES Lab. 1 Controls Kukhee Kim June 24, 2010 Example of RTEMS Lab. Controls Department June 24, 2010 Kukhee Kim

Example of RTMES Lab. 2 Controls Kukhee Kim June 24, 2010 Hello World! Just use printf() >>>> Hello World! <<<< 0x a (10) Execute my function Print out from the function Return from the function

Example of RTMES Lab. 3 Controls Kukhee Kim June 24, 2010 Hello World2 Print out “Hello World2” and Sweep the LED array User function has infinite loop to sweep the LED array When the switch:MSB turns off, the loop will be finished >>>> Hello World2 <<<< 0x f (127) Execute the user function Print out “Hello World” and Sweeps the LED array continuesly When turns off the toggle switch:MSB Take out from the function

Example of RTMES Lab. 4 Controls Kukhee Kim June 24, 2010 Turtle & Rabbit Two tasks run: Turtle & Rabbit Turtle sweeps slowly on the LED array Rabbit sweeps fast on the LED array Need to consider MUTUAL EXCLUSION Need to consider SHADOW register When turns off toggle switch (bit 0), the Turtle will be finished When turns off toggle switch (bit 1), the Rabbit will be finished >>>> Init for turtle and rabbit <<<< >>> Finish Init <<<< 0x a (10) >>>> start turtle <<<< >>>> start rabbit <<<< >>>> finish turtle <<<< >>>> finish rabbit <<<< Execute user function The user function generates two tasks and Return to the Cexp Turtle sweeps slowly, and Rabbit sweeps fast on the LED array Switch bit0 turned off, and turtle finished. Switch bit 1 turned off, and rabbit finished.

Example of RTMES Lab. 5 Controls Kukhee Kim June 24, 2010 Turtle & Rabbit with Watchdog Two tasks run: Turtle & Rabbit Both are almost identical Infinite loop to sweep the LED array Shadow register & Mutual Excusion Hardware watchdog: High-Resolution Timer on the CPU Board Every 1 msec, watchdog wakes the ISR Why choose 1 msec? hardware limitation on the interval (~ 2msec) The ISR re-implement the timer immediately ISR (1kHz) down convert the frequency Every 50 msec, sends event to the Rabbit task Every 200 msec, sends event to the Turtle task Diagnostic Task runs Monitor ISR counter, Rabbit/Turtle counter Monitor the event delay between ISR and individual tasks

Example of RTMES Lab. 6 Controls Kukhee Kim June 24, 2010 ISR Interrupt 1kHz rates Re-implement timer Turtle Task Rabbit Task LED array Protecting Shared Object Mutual Exclusion & Shadow register Sends a RTEMS event, every 200msec Sends a RTEMS event, every 50msec Monitoring ISR and each tasks Measure delay between ISR and individual tasks (sub-usec resolution) Report every 2 seconds Diagnostic Task Turtle & Rabbit with Watchdog 3 usec delay measured

Example of RTMES Lab. 7 Controls Kukhee Kim June 24, 2010 Turtle & Rabbit with Watchdog >>>> Init for turtle and rabbit <<<< >>>> start turtle <<<< >>>> start rabbit <<<< >>> Finish Init <<<< 0x a (10) ISR counter: 0, Turtle calls: 0, Rabbit calls: 0 Turtle delay: usec, Rabbit delay usec counter: 2270, Turtle calls: 11, Rabbit calls: 45 Turtle delay: usec, Rabbit delay usec ISR counter: 4347, Turtle calls: 21, Rabbit calls: 86 Turtle delay: usec, Rabbit delay usec ISR counter: 6424, Turtle calls: 32, Rabbit calls: 128 Turtle delay: usec, Rabbit delay usec ISR counter: 8501, Turtle calls: 42, Rabbit calls: 170 Turtle delay: usec, Rabbit delay usec ISR counter: 10578, Turtle calls: 52, Rabbit calls: 211 Turtle delay: usec, Rabbit delay usec ISR counter: 12655, Turtle calls: 63, Rabbit calls: 253 Turtle delay: usec, Rabbit delay usec ISR counter: 14732, Turtle calls: 73, Rabbit calls: 294 Turtle delay: usec, Rabbit delay usec ISR counter: 16809, Turtle calls: 84, Rabbit calls: 336 Turtle delay: usec, Rabbit delay usec