MIPS interrupt continued

Slides:



Advertisements
Similar presentations
While Loops and If-Else Structures
Advertisements

JED Microprocessors Pty Ltd Presenting the JED T430 low-cost Projector Controllers Nov 22nd, 2009.
Embedded Sumo 1T4 – 1T5 UTRA.
Add and Use a Sensor & Autonomous For FIRST Robotics
Control Panel in Lecture Theatre Learning Environment Services.
VEX and Robot C Chris Patterson Presented by Modified by J. Andazola.
TIK-20 Computer and Information Science April 3, TIK20 - West Hill C.I. - Spring 2009.
True BASIC Ch. 6 Practice Questions. What is the output? PRINT X LET X = -1 PRINT X FOR X = 4 TO 5 STEP 2 PRINT X NEXT X PRINT X END.
Basic Stamp II is kinda cool Bytes of EEPROM(non-volatile) - Clock speed of 20 MHz. - Holds 600 lines of code in EEPROM - executes an average of.
Lecture 12 Another loop for repetition The while loop construct © 2007 Daniel Valentine. All rights reserved. Published by Elsevier.
Motor Control of an Oscillating Pendulum Nick Myers and Chirag Patel March 9, 2004 Advised by: Dr. James Irwin and Mr. Jose Sanchez Bradley University.
Writing an Embedded Controller. It usually consists of two parts – Initialization – A main loop More challenging than HW3 because HW3 is stateless, the.
Week 10 Today 1.Homework presentations and critique. 2.Review digital and analog inputs. 3.DIY - jumpers, soldering etc.
Introduction to PIC-C. Required Software PIC-C Compiler Firmware Downloader Driver for the USB->Serial Adapter.
Connecting and Configuring Clickers. InterWrite PRS - Clicker 2-line LCD Display See data entered Confirmation answer received Variety of question types.
Lecture 8: Choosing the Correct Loop. do … while Repetition Statement Similar to the while statement Condition for repetition only tested after the body.
EZ-Additive Synthesizer By Max Bastien 12/14/07. Problem Statement Mystery of keyboards reproducing a wide range of sounds from any particular instrument.
ME 142 Engineering Computation I Debugging Techniques.
Digital Electronics Board-of-Education : Input. Board of Education - Input This presentation will explain, both from a hardware and software perspective,
Wall Encounter By Made easy by Dwayne Abuel.
Introduction to PIC-C. Installing PIC-C Goto Username/pass = guest/cpecmu Download and install:  IDEUTIL  PCWHD.
HW4. A TV controller Let’s use this lecture to start to develop a simple TV controller together.
While and If-Else Loops ROBOTC Software. While Loops While loop is a structure within ROBOTC Allows a section of code to be repeated as long as a certain.
AND Gate Inputs Output Input A (Switch) Input B (Switch) Output Y (Lamp) 0 (Open) 0 (OFF) A B Lamp.
4) Design the logic to control the motor on a simple remote control car. There are two buttons on the remote control for the motor. If neither button is.
VEX and Robot C Chris Patterson Frisco ISD CTE Center Presented by.
1 Lecture 19: Unix signals and Terminal management n what is a signal n signal handling u kernel u user n signal generation n signal example usage n terminal.
:Blink Blink: Er. Sahil Khanna
The Past Simple vs The Past Continuous
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Decision Making: while loops and Boolean Logic. While Loops A while loop is a structure within ROBOTC which allows a section of code to be repeated as.
Sensor Information: while loops and Boolean Logic.
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
Chapter Objectives In this chapter, you will learn:
The Electronic Die Using the PICAXE 08
Writing an Embedded Controller
Loops BIS1523 – Lecture 10.
ROBOTC for VEX Online Professional Development
Lesson 4 - Challenges.
Get Your Project Started with Arduino
The deadline establish a priority among interrupt requests.
You have 5 minutes to look over your table of sensor and outputs ready for a spot check on the different symbols Start Timer 5 mins
Wireless Relay HDL-MPR02-RF.18.
Arduino Part 1 Topics: Microcontrollers Programming Basics
Arduino.
Arduino Basics Connect Arduino to USB port
AVR Addressing Modes Subject: Microcontoller & Interfacing
Introduction to Events
Lamp Error reset Method to solve “Lamp Error” problem
Welcome to the World of Podium
Timer Instructions Overview
Chapter 8 The Loops By: Mr. Baha Hanene.
CSCI1600: Embedded and Real Time Software
Iteration: Beyond the Basic PERFORM
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
if-else Structures Principles of Engineering
Wireless Embedded Systems
CTY SAR FCPS Shawn Lupoli, Elliot Tan
While Loops and If-Else Structures
Arduino Uno circuit basics
While Loops and If-Else Structures
ECE 352 Digital System Fundamentals
While Loops And If-Else Structures
Interface ckt for demo Outputs Inputs V PIN 0 10K PIN 4 GND GND
HW4.
Interrupts.
ECE 3567 Microcontrollers Lab
Presentation transcript:

MIPS interrupt continued

Let’s use this lecture to start to develop a simple TV controller together. What is left should be finished in homework 4.

TV controller It accepts simple commands like vol+/-, channel +/-, channel digit input (0-99), sleep timer, and power on/off. When there is no input, roughly every 3 seconds, print out the current state of the TV, in the format of Current second, Power On (of Off), Channel (current channel watching), volume (current volume), Sleep timer remaining. For example, “At 100 second, Power On, Channel 10, Volume 30, sleep timer 120 sec remaining.” If power is off, only output “At 100 sec, Power off.”

I didn’t find a timer facility in SPIM, so the time is approximated using delay loops.

Specifications Initialization. When the code is run, the initial state is Power on Channel 0 (0-99) Volume 50 (0-99) Sleep timer off

Specifications Power key (should be ‘p’ on the key board) When power key is pressed, if the power is currently off, turn on the TV immediately by printing “Power On!” When power key is pressed, if the power is currently on, turn on the TV immediately by printing “Power Off!”

Specification Channel +/-. Should use ‘u’ as + and ‘d’ as -. Once pressed, change the current watching channel accordingly (but not out of range of 0-99), and print out, for example, “Channel 30.”

Specifications Vol +/-. Should use ‘l’ as + and ‘k’ as -. Once pressed, change the current volume accordingly (but not out of range of 0-99), and print out, for example, “Volume 30.”

Specification Digit input. Use 0-9 key on key board. Used to change channels. Once a digit key is pressed, print out the intended channel immediately. For example, `1’ is pressed, print out “1-” immediately. The controller should be expecting another digit input for another 2 seconds. If any other key is pressed during these two seconds, abort the digit input. For example, if `1’ is pressed at 1000 second and `channel +’ is pressed at 1001 second, the controller should perform the channel + function and “forget” about the digit input. If no other key is pressed during the two seconds, the controller switches to channel 1. If another digit key is pressed within the two seconds, for example, `2’ is pressed, the controller switches to channel 12 immediately.

Specifications Sleep timer. Should use ‘s’ key on the keyboard. When sleep timer key is pressed, if the sleep timer is off, set the sleep timer to be 10 sec. If the sleep timer is on, increment the sleep timer by 10 sec. If after that the sleep timer exceeds 200 sec, set the sleep timer to be off. Show the status of the sleep timer after processing the input immediately. If the sleep timer is on, it decrements by 1 every second. Once it becomes 0, turn the TV off immediately and print out “Power Off Due To Sleep Timer!”

Structure of the main loop Check for new key board input and process the input. If power is on, check if sleep timer hits 0. Loop for 0.01 second. Print out the status if 3 seconds elapsed since last status print. Jump to the beginning of the loop.