Menu. >Using a simple timer (e.g., 68HC11/12 s RTI or XMEGA s RTC) >68HC11/12: RTI and TOF together for multitasking

Similar documents
A Practical Approach to Embedded Systems Engineering Workforce Development

TA Certification Course Additional Information Sheet

PUBLIC SPEAKING: Some Thoughts

Appendix L: Online Testing Highlights and Script

CHANCERY SMS 5.0 STUDENT SCHEDULING

I N T E R P R E T H O G A N D E V E L O P HOGAN BUSINESS REASONING INVENTORY. Report for: Martina Mustermann ID: HC Date: May 02, 2017

Fluency YES. an important idea! F.009 Phrases. Objective The student will gain speed and accuracy in reading phrases.

Creating an Online Test. **This document was revised for the use of Plano ISD teachers and staff.

Spring 2015 Achievement Grades 3 to 8 Social Studies and End of Course U.S. History Parent/Teacher Guide to Online Field Test Electronic Practice

WiggleWorks Software Manual PDF0049 (PDF) Houghton Mifflin Harcourt Publishing Company

How to organise Quality Events

POFI 1301 IN, Computer Applications I (Introductory Office 2010) STUDENT INFORMANTION PLAN Spring 2013

MAILCOM Las Vegas. October 2-4, Senior Director, Proposal Management BrightKey, Inc.

User Guide. LSE for You: Graduate Course Choices. London School of Economics and Political Science Houghton Street, London WC2A 2AE

WELCOME PATIENT CHAMPIONS!

Moodle 3.2 Backup and Simple Restore

Filing RTI Application by your own

MAKINO GmbH. Training centres in the following European cities:

Financial Aid Self-Service. Service Preview. January 29, 2009

Guidelines for Project I Delivery and Assessment Department of Industrial and Mechanical Engineering Lebanese American University

wise 2012 digital copy

Bayllocator: A proactive system to predict server utilization and dynamically allocate memory resources using Bayesian networks and ballooning

Intel-powered Classmate PC. SMART Response* Training Foils. Version 2.0

BUFFET THEORY AND PRODUCTION - CHEF 2332 Thursday 1:30pm 7:00pm Northeast Texas Community College - Our Place Restaurant Course Syllabus Fall 2013

Seminar - Organic Computing

Cal s Dinner Card Deals

Houghton Mifflin Online Assessment System Walkthrough Guide

Storytelling Made Simple

Measurement & Analysis in the Real World

Using SAM Central With iread

Quick Reference for itslearning

Welcome to California Colleges, Platform Exploration (6.1) Goal: Students will familiarize themselves with the CaliforniaColleges.edu platform.

Schoology Getting Started Guide for Teachers

Test Administrator User Guide

Longman English Interactive

Master kick-off 2017: Master Electrical Engineering

Achievement Testing Program Guide. Spring Iowa Assessment, Form E Cognitive Abilities Test (CogAT), Form 7

Specification of the Verity Learning Companion and Self-Assessment Tool

Apply Texas. Tracking Student Progress

Preparing for the School Census Autumn 2017 Return preparation guide. English Primary, Nursery and Special Phase Schools Applicable to 7.

ACCESSING STUDENT ACCESS CENTER

teacher, peer, or school) on each page, and a package of stickers on which

OFFICE OF THE UNIVERSITY REGISTRAR FACT SHEET ON LINE WAITLISTING

Using a PLC+Flowchart Programming to Engage STEM Interest

IT Project List. Description

Green Belt Curriculum (This workshop can also be conducted on-site, subject to price change and number of participants)

Presentation Instructions for Presenters at the 2017 AAFS Annual Scientific Meeting

Study Guide for Right of Way Equipment Operator 1

For information only, correct responses are listed in the chart below. Question Number. Correct Response

Analysis of Enzyme Kinetic Data

Your School and You. Guide for Administrators

Environmental Literacy Indicator Tool (Self-Assessment) DRAFT

SCT Banner Financial Aid Needs Analysis Training Workbook January 2005 Release 7

USER ADAPTATION IN E-LEARNING ENVIRONMENTS

A Process-Model Account of Task Interruption and Resumption: When Does Encoding of the Problem State Occur?

Teaching a Laboratory Section

Getting a Sound Bite Across. Heather Long, MD ACMT Annual Scientific Meeting Clearwater, FL March 28, 2015

Preferences...3 Basic Calculator...5 Math/Graphing Tools...5 Help...6 Run System Check...6 Sign Out...8

RESOLVING CONFLICT. The Leadership Excellence Series WHERE LEADERS ARE MADE

Welcome to ACT Brain Boot Camp

CWSEI Teaching Practices Inventory

STUDENT MOODLE ORIENTATION

Eller College of Management. MIS 111 Freshman Honors Showcase

Time Management. To receive regular updates kindly send test to : 1

Administrative Services Manager Information Guide

Managing the Student View of the Grade Center

The Oregon Literacy Framework of September 2009 as it Applies to grades K-3

Analyzing the Usage of IT in SMEs

The D2L eportfolio for Teacher Candidates

An Estimating Method for IT Project Expected Duration Oriented to GERT

Spring 2014 SYLLABUS Michigan State University STT 430: Probability and Statistics for Engineering

LABORATORY : A PROJECT-BASED LEARNING EXAMPLE ON POWER ELECTRONICS

Course Content Concepts

Science Olympiad Competition Model This! Event Guidelines

Marketing Management MBA 706 Mondays 2:00-4:50

Learning Lesson Study Course

Android App Development for Beginners

Starting an Interim SBA

Home Access Center. Connecting Parents to Fulton County Schools

WE ARE STORYT ELLERS!

OFFICE OF HUMAN RESOURCES SAMPLE WEB CONFERENCE OR ON-CAMPUS INTERVIEW QUESTIONS

PDA (Personal Digital Assistant) Activity Packet

Campus Improvement Plan Elementary/Intermediate Campus: Deretchin Elementary Rating: Met Standard

Lesson plan for Maze Game 1: Using vector representations to move through a maze Time for activity: homework for 20 minutes

Computers Change the World

Circular No.: PMEX/MKT, BD &CSS/2014/19 April 22, Ethics and Financial Literacy Events by Institute of Capital Markets

PRESENTED BY EDLY: FOR THE LOVE OF ABILITY

Instructor. Darlene Diaz. Office SCC-SC-124. Phone (714) Course Information

Moodle Student User Guide

IMPROVED MANUFACTURING PROGRAM ALIGNMENT W/ PBOS

D Road Maps 6. A Guide to Learning System Dynamics. System Dynamics in Education Project

Excel Intermediate

LMS - LEARNING MANAGEMENT SYSTEM END USER GUIDE

UDW+ Student Data Dictionary Version 1.7 Program Services Office & Decision Support Group

Office of Semester Conversion Cal Poly Pomona

STANDARDIZED COURSE SYLLABUS

BSBCMM401A Make a presentation

Presented by The Solutions Group

Cognitive Modeling. Tower of Hanoi: Description. Tower of Hanoi: The Task. Lecture 5: Models of Problem Solving. Frank Keller.

Transcription:

Multi-Tasking Menu >Using a simple timer (e.g., 68HC11/12 s RTI or XMEGA s RTC) Outline the steps in multitasking Multitask with single process Simulate single process example >68HC11/12: RTI and TOF together for multitasking Look into my... See examples on web-site: RTI_Step.asm, RTI_1Process.asm, RTI_Mult_Proc.asm, RTI_Mult_Proc2.asm, RTI_Mult_TOF.asm 1 Multi-Tasking: Saving Context When any single running process is paused, its context must be saved >Context is the entire state of a process; it must contain all of the information necessary to return to the process after the interruption When a process is resumed, the context is restored; thus the only thing that should have changed with respect to the process is that time will have advanced 2 1

Stack Usage by the Interrupt (e.g., RTI) >For the XMEGA, RTC is equivalent, but TC can also be used Since XMEGA interrupts push nothing other than PC onto the stack, you will need to do this yourself Stack Pointer After Interrupt Stack Pointer Before Interrupt CCR ACCB ACCA IX H IX L IY H IY L PC H PC L 3 P1: Context for P1 includes P2: Context for P2 includes PN: 4 2

Assume P1 is running and RTI interrupts P1: Context for P1 includes Inside RTI_ISR the stack contains: CCR, B, A, IX, IY & PC for P1 Let s assume RTI_ISR knows that PID=1 Save SP (for P1) into SP 1, i.e., SP SP 1 Then if RTI_ISR wants to go to P2 Let SP SP 2 (SP for P2) Change PID to correspond to P2 RTI_ISR clears RTIF, executes RTI inst. This restores the stack of P2 5 Now P2 is running and RTI interrupts P2: Context for P2 includes Inside RTI_ISR the stack contains: CCR, B, A, IX, IY & PC for P2 Let s assume RTI_ISR knows that PID=2 Save SP (for P2) into SP 2, i.e., SP SP 2 Then if RTI_ISR wants to go to P i Let SP SP i (SP for P i ) Change PID to correspond to P i RTI_ISR clears RTIF, executes RTI inst. This restores the stack of Pi 6 3

Assume PN is running and RTI interrupts PN: Context for PN includes Inside RTI_ISR the stack contains: CCR, B, A, IX, IY & PC for PN Let s assume RTI_ISR knows that PID=n Save SP (for PN) into SP N, i.e., SP SP N Then if RTI_ISR wants to go back to P1 Let SP SP 1 (SP for P1) Change PID to correspond to P1 RTI_ISR clears RTIF, executes RTI inst. This restores the stack of P1 7 P1: Context for P1 includes Q: How do we get things started? A: In the main program: Setup RTI interrupt vector ($FFF0) or pseudo vector ($00EE) Setup variables & constants Create a dummy stack for each process: CCR, B, A, IX, IY, & PC (entry point for P1) Setup RTI system Setup any global variables Enable interrupts Jump to the first process you want to run 8 4

Multi-Tasking needs to allocate PID (Process ID), Stack, and Stack Pointer for each Process. Assume PID = 1 and PS1 is running with Stack1. PS2 is running with Stack2 until the next RTI. Interrupt by RTI (Save the current status of PS1 into Stack1 [automatic]) Return from Interrupt (Restore the previous status of PS2 from Stack2 [automatic]) Inside ISR Clear RTI Flag Update SP1 because PID = 1 Choose PS2 as the next process Set SP = SP2 Set PID = 2 9 Multi-Tasking Examples > Outline the steps > Do it with single process >Simulate single process RTI_Step.asm RTI_1Process.asm > A multitasking example > Another multitasking example >RTI with TOF (i.e., two interrupts working together): RTI_Mult_Proc.asm RTI_Mult_TOF.asm RTI_Mult_Proc2.asm 10 5

The End! 11 6