EE 3170 Microcontroller Applications

Size: px
Start display at page:

Download "EE 3170 Microcontroller Applications"

Transcription

1 Block Diagram of 68HC11A8 EE 3170 Microcontroller Applications Lecture 14: Advanced 68HC11 Hardware- PartI A: Measuring Real-Time in the 68HC11 - Miller Based on slides for ECE3170 by Profs. Davis, Kieckhafer, Tan, and Cischke Interrupt control Clock Mode control A/D ref. voltage Chip power COP Real-Time Interrupt ROM RAM EEPROM Microprocessor Timer & Pulse Accumulator SCI SPI A/D converter Port A Port B Port C Strobe Port D Port E EE3170/CC/Lecture#14-PartIA 1 EE3170/CC/Lecture#14-PartIA 2 Block Diagram of 68HC11A8 68HC11A8 Components COP PULSE ACCUMULATOR MODA/ LIR MODE CONTROL TIMER SYSTEM PORT A MODB/ V STBY PERIODIC INTERRUPT PA7/PAI/OC1 PA6/OC2/OC1 PA5/OC3/OC1 PA4/OC4/OC1 PA3/OC5/OC1 PA2/IC1 PA1/IC2 PA0/IC3 XTAL EXTAL OSCILLATOR CLOCK LOGIC PORT B E BUS EXPANSION ADDRESS PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0 CPU IRQ/ XIRQ STROBE AND HANDSHAKE PARALLEL I/O SINGLE CHIP MODE INTERRUPT LOGIC ADDRESS/DATA CONTROL PORT C RESET R/W AS PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 STRB STRA A15 A14 A13 A12 A11 A10 A9 A8 A7/D7 A6/D6 A5/D5 A4/D4 A3/D3 A2/D2 A1/D1 A0/D0 R/W AS EXPANDED MODE CIRCUITRY ENCLOSED BY DOTTED LINE IS EQUIVALENT TO MC68HC24. SS SCK SPI MOSI MISO PD5/SS PD4/SCK PD3/MOSI PD2/MISO 8 KBYTES ROM 512 BYTES EEPROM 256 BYTES RAM CONTROL PORT D SCI TxD RxD PD1/TxD PD0/RxD A/D CONVERTER PORT E PE7/AN7 PE6/AN6 PE5/AN5 PE4/AN4 PE3/AN3 PE2/AN2 PE1/AN1 PE0/AN0 V DD V SS V RH V RL 1 Memory RAM ROM EEPROM Parallel Input/Output Port B Port C Strobe STRA STRB Programmable Timer & Pulse Accumulator Port A SCI (SPI) Serial Communications (Peripheral) Interface Port D Analog-to-Digital Converter Port E EE3170/CC/Lecture#14-PartIA Figure 1-1 Block Diagram 3 EE3170/CC/Lecture#14-PartIA 4

2 Lecture Overview The 4 Main 68HC11 Timer Functions Real-Time Interrupt Free-Running Counter Input Capture (time stamping) Output Compare (scheduling) Examples RTI Interrupt : Derived Real-Time Clock IC interrupt : Measuring the interval between two events OC interrupt : Generating a slow external clock Real-Time Real-Time (RT) = the perfect, ideal time base of the cosmos (e.g. the master clock of the gods) Ignoring relativistic and quantum effects: RT proceeds at a constant rate of progress RT is a continuous (non-discrete) function RT can not be measured or read precisely RT can only be approximated by a clock clocks have finite precision (tick length) clock accuracy (tick rate) varies a bit over time clock accuracies differ a bit from each other Real Real-Time A system that can guarantee an upper bound (worst case) on latency (response time) for time-critical operations. EE3170/CC/Lecture#14-PartIA 5 EE3170/CC/Lecture#14-PartIA 6 Underlying Time-Base Clock Functions Basic Clock Counter consists of a counter register increments once per crystal oscillator cycle when it overflows it rolls over from FF FF to it asserts an overflow signal Counter acts as the basic time-base for the processor Defines the smallest available precision Various clocks can be derived from the counter Fixed-Period Timer Interrupt: allows processor to update a derived RT clock each interrupt = 1 tick of the RT clock Free Running Counter Software can load the counter value at any time Input Capture (IC) records counter value at instant an input signal arrives used to timestamp arrival of the input signal Output Compare (OC) asserts output signal at a specified counter value used to schedule an output pulse (or command) EE3170/CC/Lecture#14-PartIA 7 EE3170/CC/Lecture#14-PartIA 8

3 Motivations: Real-time Interrupt Clock Perform I/O operations at specific times Time Tracking Use I/O device that causes interrupts periodically An oscillator sets a flag at the end of each period Interrupt service routine can count interrupts to track time Refer to figure 7-7 Function 1: Real-Time Interrupt (RTI) Real-Time Interrupt (RTI) Hardware: an internal I/O device (oscillator) w/ a flag that cause periodic interrupts. Oscillator Rate Control (RTR1 & RTR0) Programmable Counter 4.10ms, 8.19ms, 16.38ms, 32.77ms Real-Time Interrupt Flag (RTIF) Real-Time Interrupt Enable (RTII) Interrupt Vector $FFF0 - $FFF1 Note -TMSK2: Timer Interrupt Mask Reg.; TFLG2: Time Flag Reg.; PACTL: Pulse Accumulator Control Reg. $1024 TOI RTII PR1 PR0 TMSK2 $1025 TOF RTIF TFLG2 $1026 RTR1 RTR0 PACTL EE3170/CC/Lecture#14-PartIA 9 EE3170/CC/Lecture#14-PartIA 10 Function 1 - Real-Time Interrupt (RTI) Warning: there is also RTI (Return from InTerrupt) instruction RTIF Flag is set by Counter Overflow signal RTIF = bit-6 of TFLG2 $1025 RTIF causes interrupt to $FFF0:$FFF1 RTIF is a Direct-Clearing flag (store 1 to clear) RTII bit enables/disables RTIF interrupt RTII- bit 6 of TMSK2 $1024 RTII - 1 RTI is enabled I bit of CC register also enables/disables RTI RTI Frequency Control Relative Frequencies All are derived from processor crystal frequency (usually 8 MHz) E-Clock freq. = crystal freq. / 4 RTI freq. = E-Clock freq. / D = crystal freq. / (4D) where D is a programmable frequency divider RTR0 and RTR1 bits determine value of D RTR0 and RTR1 are bits 0 and 1 of PACTL $1026 EE3170/CC/Lecture#14-PartIA 11 EE3170/CC/Lecture#14-PartIA 12

4 RTI Frequency Control Want RTI period to be long (several ms) otherwise processor spends too much time in ISR don t necessarily need extreme accuracy Frequency Divider Values (with 8 MHz crystal) RTR1 RTR0 D RTI period ms ms ms ms. The Programmable Timer HC11 contains a hardware timer: can measure time for both inputs and outputs (time measurement) Its characteristics are programmable w/ software It uses interrupt system and has several interrupt vectors Free-Running Counter 16-bit Up-Counter clocked by an oscillator $ $FFFF Roll-Over (Overflow) TOF Time base for all timer functions Timer Input Capture (IC) 16-bit Capture Registers TIC1 - TIC3 Measure elapsed times between events Timer Output Compare (OC) 16-bit Compare Registers TOC1 - TOC5 Control timing of events EE3170/CC/Lecture#14-PartIA 13 EE3170/CC/Lecture#14-PartIA 14 Function 2: Free-Running Counter Function 2: Free-Running Counter (TCTN) Free Running Counter A rollover 16-bit up-counter Value stored in 16-bit TCNT $100E:$100F TOF Interrupt PR1 PR0 Counter can be accessed for several purposes read by a program time-stamp an input accurately schedule an output Note: Free running counter is a completely separate hardware device from the RTI counter. TOI (Interrupt TOF enable) (Timer overflow flag) Free-running counter Prescaler E Clock EE3170/CC/Lecture#14-PartIA 15 EE3170/CC/Lecture#14-PartIA 16

5 TCNT 16-bit Counter Located at $100E-100F Rate determined by PR1 and PR0 (bits 0 and 1) in TMSK2 register ($1024) Overflow from FFFF to 0 sets the TOF flag (bit 7) of the TFLG2 register ($1025) causing an interrupt of the TOI mask (bit 7) of the TMSK2 register is 1 Free-Running Counter Control TOF - Timer Overflow Bit bit 7 of TFLG2 $1025 set when TCNT rolls over from FFFF to 0000 TOI - Timer Overflow Interrupt Enable Bit bit 7 of TMSK2 $1024 =1 Interrupt Enabled PR0 and PR1 set frequency of TCNT increment PR0 and PR1 = bits 0 and 1 of TMSK2 $1024 PR0 and PR1 set number of E-clock cycles per TCNT increment EE3170/CC/Lecture#14-PartIA 17 EE3170/CC/Lecture#14-PartIA 18 Frequency Control For TCNT to have very high accuracy Want fine granularity TCNT frequency = E-clock freq./d = crytal freq. / 4D Free-Running Counter Register Summary TCNT - Counter value register 16 $100E:$100F TOF = Counter Overflow Flag Bit TCNT precision (with 8 MHz crystal) PR1 PR0 D TCNT Prec TOF period μs 32.8 ms μs ms μs ms μs ms TOI - Counter Overflow Interrupt Bit PR0 and PR1 - Counter Frequency Control Bits EE3170/CC/Lecture#14-PartIA 19 EE3170/CC/Lecture#14-PartIA 20

6 How Can We Use TCNT? With software can read TCNT e.g. ldd $100E can create fixed time delay shown in text (p : figure 7-15) Directly control or monitor I/O IC = Input Capture = Time-stamping of inputs (figure 7-12) OC = Output compare = Scheduling of output signals (figure 7-13) Can stamp and schedule signals with hardware accuracy within μs Function 3 - Input Capture (IC) When an ICx input arrives TICx ( 3 of them) register gets a copy of the counter value in TCNT IC1 pin loads the TIC1 $1010:$1011 IC2 pin loads the TIC2 $1012:$1013 IC3 pin loads the TIC3 $1014:$1015 Thus TICx register captures the time that ICx arrived. Software can not write to the TICx registers. it can only read them IC arrivals can also cause interrupts. EE3170/CC/Lecture#14-PartIA 21 EE3170/CC/Lecture#14-PartIA 22 Input Capture Input Capture Input Capture Hardware ICx interrupt Free-running counter EDGxB EDGxA ICx Input-Capture Flags: IC1F, IC2F, IC3F - IC Flag Bits IC1F, IC2F, IC3F - bits 2,1,0 of TFLG1 $1023 Bit ICxF is set when signal ICx arrives $1023 OC1F OC2F OC3F OC4F OC5F IC1F IC2F IC3F TFLG1 ICxI (Interrupt ICxF enable) (ICx flag) TICx Edge control Interrupt-Enable: IC1I, IC2I, IC3I - IC Interrupt Enable Bits IC1I, IC2I, IC3I - bits 2,1,0 of TMSK1 $1022 If bit ICxI = 1, then ICxF interrupt is enabled $1022 OC1I OC2I OC3I OC4I OC5I IC1I IC2I IC3I TMSK1 EE3170/CC/Lecture#14-PartIA 23 EE3170/CC/Lecture#14-PartIA 24

7 Input Capture Interrupt (table 7-2) Vector Address Interrupt Device FFEA - FFEB Timer Input Capture 3 FFEC - FFED Timer Input Capture 2 FFEE - FFEF Timer Input Capture 1 Input Capture (IC) Edge Control EDGxB, EDGxA - edge control bits for ICx pin bits 5 0 of TCTL2 $1021 determine which edge transition on pin ICx triggers time capture EDGxB EDGxA Active Pin Transition 0 0 capture disabled 0 1 capture on rising edge 1 0 capture on falling edge 1 1 capture on both edges EE3170/CC/Lecture#14-PartIA 25 EE3170/CC/Lecture#14-PartIA 26 Function 4 - Output Compare Function 4 - Output Compare Function Free-running counter The program stores a value into a 16-bit Timer OMx OLx Output Compare (TOC) register. Hardware comparators continuously compare the Comparator OCx TOC registers to TCNT. if the TCNT register = a TOC register. then assert a signal on an OC output pin TCNT rolls over the equality will eventually occur. OCx interrupt TOCx Action control The TOC =TCNT event can also cause an interrupt. OCxI (Interrupt OCxF enable) (OCx flag) EE3170/CC/Lecture#14-PartIA 27 EE3170/CC/Lecture#14-PartIA 28

8 Output Compare (OC) Time Registers Input Capture and Output Capture Ports There are 5 OC output bits (OC1 OC5) Scheduled output time for pin OCx is stored in register TOCx. Time for OC1 pin in TOC1 $1016:$1017 Time for OC2 pin in TOC2 $1018:$1019 Time for OC3 pin in TOC3 $101A:$101B Time for OC4 pin in TOC4 $101C:$101D Time for OC5 pin in TOC5 $101E:$101F IC and OC both use PORTA PA7 is bidirectional controlled by DDRA7 PA7/PAI/OC1 PA6/OC2/OC1 PA5/OC3/OC1 PA4/OC4/OC1 PA3/OC5/OC1 PA2/IC1 PA1/IC2 PA0/IC3 PULSE ACCUMULATOR Input Capture Pins Port A (DDRA7 = 0) Output Capture Pins Port A (DDRA7 = 1) PORT A TIMER SYSTEM COP PERIODIC INTERRUPT $1000 OC1 OC2 OC3 OC4 OC5 IC1 IC2 IC3 PORTA $1026 DDRA7 PACTL EE3170/CC/Lecture#14-PartIA 29 EE3170/CC/Lecture#14-PartIA 30 Output Compare Output Compare Hardware OCxF = OC flag bit for pin OCx OC1F OC5F = bits 7 3 of TFLG1 $1023 OCxF bit is set when TOCx register = TCNT register $1023 OC1F OC2F OC3F OC4F OC5F IC1F IC2F IC3F TFLG1 OCxI = OC Interrupt enable bit for pin OCx OC1I OC5I = bits 7 3 of TMSK1 $1022 if OCxI = 1 then OCx interrupt is enabled $1022 OC1I OC2I OC3I OC4I OC5I IC1I IC2I IC3I TMSK1 Output Compare (OC) Action Control OMx and OLx - action control bits for OCx pin OM2,OL2 OM5,OL5 = bits 7 0 of TCTL1 $1020 OM1,OL1 = a special case OMx and OLx determine output on pin OCx Omx Olx Action Taken on Compare 0 0 OC output disabled (disconnect) 0 1 Toggle current pin output (complement) 1 0 Set output pin low 1 1 Set output pin high EE3170/CC/Lecture#14-PartIA 31 EE3170/CC/Lecture#14-PartIA 32

9 Output Compare Interrupt (table 7-2) Vector Address Interrupt Device FFE0 - FFE1 Timer Output Compare 5 FFE2 - FFE3 Timer Output Compare 4 FFE4 - FFE5 Timer Output Compare 3 FFE6 - FFE7 Timer Output Compare 2 FFE8 - FFE9 Timer Output Compare 1 RTI Interrupt Example RTI counts up to a certain time then Sets RTIF Flag (bit6 of TFLG2 $1025) If RTII bit (bit6 of TMSK2 $1024) is set, then causes RTI Interrupt Period determined by RTR1, RTR0 bits RTR1 RTR0 D RTI period (8 MHz) ) ms ms ms ms. EE3170/CC/Lecture#14-PartIA 33 EE3170/CC/Lecture#14-PartIA 34 RTI Example RTI Example Typical Application: running a real-time clock (rtclk) Pick maximum period (32.8 ms) Maintain a 32-bit derived real-time clock 16-bit rollover period = 32.8ms x 2 16 = 35.8 minutes 32-bit rollover period = 32.8ms x 2 32 = 4.5 years /initialization //init SP //init rti int period //enable rti int /end INIT LDS $2FFF LDAA #$03 * Set RTI Period STAA PACTL * To 32.8 ms LDAA #$40 * Enable RTI STAA #TMSK2 CLI EE3170/CC/Lecture#14-PartIA 35 EE3170/CC/Lecture#14-PartIA 36

10 RTI Example IC3 Interrupt RTIISR /clear RTI Flag /inc rtclk low-order = 0? Y /inc rtclk high-order return N RTISR LDAA #$40 STAA TFLG2 RET LDD RTC_LO ADDD #1 STD RTC_LO * Inc RTC_LO BNE RET * Test for Rollover LDD RTC_HI ADDD #1 * Inc RTC_HI STD RTC_HI RTI Input Capture uses counter TCNT Records the TCNT value as an input arrives For input ICx, it stores in 16-bit register TICx Sets ICxF flag If ICxI bit is set, then causes TICx interrupt EDGxB, EDGxA define capture edge EDGxB EDGxA Active Pin Transition 0 0 capture disabled 0 1 capture on rising edge 1 0 capture on falling edge 1 1 capture on both edges EE3170/CC/Lecture#14-PartIA 37 EE3170/CC/Lecture#14-PartIA 38 IC3 Interrupt Typical Application -- Measuring Interval Between Events Calculate time between 2 rising edges on IC3. Pick maximum TCNT tick interval (8 μs) TCNT clock period set by bits PR1, PR0 PR1 PR0 D TCNT Prec TOF period μs 32.8 ms μs ms μs ms μs ms OC2 Interrupt Output Compare uses counter TCNT Flags when TOCx register = TCNT value For input OCx, it value is in 16-bit register TOCx Sets OCxF flag If OCxI bit is set, then causes TOCx interrupt OMx and OLx define action taken at pin OCx OMx OLx Action Taken on Compare 0 0 OC output disabled 0 1 Toggle current pin output 1 0 Set output pin low 1 1 Set output pin high EE3170/CC/Lecture#14-PartIA 39 EE3170/CC/Lecture#14-PartIA 40

11 OC2 Interrupt Typical Application -- Generate Slow External Clock Toggle OC2 each $2000 ticks of TCNT. Pick maximum TCNT tick interval (8 μs). TCNT clock period set by bits PR1, PR0 PR1 PR0 D TCNT Prec TOF period μs 32.8 ms μs ms μs ms μs ms EE3170/CC/Lecture#14-PartIA 41

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications Block Diagram of 68HC11A8 EE 3170 Microcontroller Applications Lecture 14: Advanced 68HC11 Hardware- Part II: Serial Communications Interfacing - Miller 7.10 Interrupt control Clock Mode control A/D ref.

More information

Capstone Design Course. Lecture-2: The Timer

Capstone Design Course. Lecture-2: The Timer Capstone Design Course Lecture-2: The Timer By Syed Masud Mahmud, Ph.D. Copyright 2002 by Syed Masud Mahmud 1 The Timer The 68HC11 has a 16-Bit Free Running Timer. The count value of the timer is available

More information

Introduction to Mechatronics. Fall Instructor: Professor Charles Ume. Interrupts and Resets

Introduction to Mechatronics. Fall Instructor: Professor Charles Ume. Interrupts and Resets ME645 Introduction to Mechatronics Fall 24 Instructor: Professor Charles Ume Interrupts and Resets Reason for Interrupts You might want instructions executed immediately after internal request and/or request

More information

M68HC11E Family. Data Sheet M68HC11. Microcontrollers M68HC11E/D Rev. 5 6/2003 MOTOROLA.COM/SEMICONDUCTORS

M68HC11E Family. Data Sheet M68HC11. Microcontrollers M68HC11E/D Rev. 5 6/2003 MOTOROLA.COM/SEMICONDUCTORS M68HCE Family Data Sheet M68HC Microcontrollers M68HCE/D Rev. 5 6/23 MOTOROLA.COM/SEMICONDUCTORS MC68HCE Family Data Sheet To provide the most up-to-date information, the revision of our documents on

More information

M68HC11E/D REV 3.1 HC11M68HC 1M68HC11M. M68HC11E Family Technical Data. HCMOS Microcontroller Unit

M68HC11E/D REV 3.1 HC11M68HC 1M68HC11M. M68HC11E Family Technical Data. HCMOS Microcontroller Unit M68HC11E/D REV 3.1 68HC11M6 HC11M68HC 1M68HC11M M68HC11E Family Technical Data HCMOS Microcontroller Unit blank MC68HC11E Family Technical Data Motorola reserves the right to make changes without further

More information

Interrupts. Interrupts Resets Low Power Modes. Resets Low Power Modes

Interrupts. Interrupts Resets Low Power Modes. Resets Low Power Modes Interrupts Resets Low Power Modes Drop everything and get your priorities straight! Alan Claghorn Chris Golder Raja Shah Outline Interrupts Why use interrupts? Types of interrupts Interrupt Flow Priorities

More information

M68HC11 E SERIES HCMOS MICROCONTROLLER UNIT

M68HC11 E SERIES HCMOS MICROCONTROLLER UNIT M68HC11 E SERIES HCMOS MICROCONTROLLER UNIT Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding

More information

ECE/CE 3720: Embedded System Design

ECE/CE 3720: Embedded System Design Basic Components of Input Capture Slide 1 ECE/CE 3720: Embedded System Design Chris J. Myers Lecture 12: Input Capture Slide 3 Basic Principles of Input Capture Basic Principles of Input Capture (cont)

More information

ME 4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume.

ME 4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume. ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics Instructor: Professor Charles Ume Timers Lecture Outline General Description of Main Timer Input Capture Concept

More information

ME 4447 / ME 6405: Introduction to Mechatronics

ME 4447 / ME 6405: Introduction to Mechatronics ME 4447 / ME 6405: Introduction to Mechatronics Interrupts and Resets Rohan Bansal Edward Chyau Anirudh Rudraraju Interrupts and Resets 1 Telephone Analogy How do we know if someone is calling? Use polling

More information

M68HC11K/D HC11M68HC 1M68HC11M. M68HC11K Family Technical Data. HCMOS Microcontroller Unit

M68HC11K/D HC11M68HC 1M68HC11M. M68HC11K Family Technical Data. HCMOS Microcontroller Unit M68HC11K/D 68HC11M6 HC11M68HC 1M68HC11M HCMOS Microcontroller Unit nc. blank nc. MC68HC11K Family Motorola reserves the right to make changes without further notice to any products herein. Motorola makes

More information

Ryerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 2003

Ryerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 2003 Ryerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 23 Name: Student Number: Time limit: 3 hours Section: Examiners: K Clowes,

More information

SECTION 5 RESETS AND INTERRUPTS

SECTION 5 RESETS AND INTERRUPTS SECTION RESETS AND INTERRUPTS Resets and interrupt operations load the program counter with a vector that points to a new location from which instructions are to be fetched. A reset immediately stops execution

More information

HC12 Built-In Hardware

HC12 Built-In Hardware HC12 Built-In Hardware The HC12 has a number of useful pieces of hardware built into the chip. Different versions of the HC12 have slightly different pieces of hardware. We are using the MC68HC912B32 chip

More information

EB193. Motorola Semiconductor Engineering Bulletin. Replacing 68HC11A Series MCUs with 68HC11E Series MCUs. Freescale Semiconductor, I.

EB193. Motorola Semiconductor Engineering Bulletin. Replacing 68HC11A Series MCUs with 68HC11E Series MCUs. Freescale Semiconductor, I. nc. Order this document by /D Rev. 1.0 Motorola Semiconductor Replacing 68HC11A Series MCUs with 68HC11E Series MCUs By C.Q. Nguyen, Bob King, and John Suchyta Austin, Texas Introduction This information

More information

Freescale Semiconductor, I MC68HC11A8. HCMOS Single-Chip Microcontroller

Freescale Semiconductor, I MC68HC11A8. HCMOS Single-Chip Microcontroller nc. MC8HCA8 HCMOS Single-Chip Microcontroller Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding

More information

Interrupt and Timer ISRs. Student's name & ID: Partner's name(s) & ID(s): Your Section number & TA's name

Interrupt and Timer ISRs. Student's name & ID: Partner's name(s) & ID(s): Your Section number & TA's name MPS Interrupt Lab Exercise Interrupt and Timer ISRs Student's name & ID: Partner's name(s) & ID(s): Your Section number & TA's name Notes: You must work on this assignment with your partner. Hand in a

More information

EE 308 Spring A software delay

EE 308 Spring A software delay A software delay To enter a software delay, put in a nested loop, just like in assembly. Write a function delay(num) which will delay for num milliseconds void delay(unsigned int num) volatile unsigned

More information

EE 308 Spring A software delay. To enter a software delay, put in a nested loop, just like in assembly.

EE 308 Spring A software delay. To enter a software delay, put in a nested loop, just like in assembly. More on Programming the 9S12 in C Huang Sections 5.2 through 5.4 Introduction to the MC9S12 Hardware Subsystems Huang Sections 8.2-8.6 ECT_16B8C Block User Guide A summary of MC9S12 hardware subsystems

More information

EB380. Migrating from the MC68HC811E2 to the MC68HC711E9. Freescale Semiconductor, I. Introduction. Migrating to the MC68HC711E9

EB380. Migrating from the MC68HC811E2 to the MC68HC711E9. Freescale Semiconductor, I. Introduction. Migrating to the MC68HC711E9 nc. Semiconductor Products Sector Engineering Bulletin Order this document by /D Migrating from the MC68HC811E2 to the MC68HC711E9 By Timothy J. Airaudi Applications Engineering, Microcontroller Division

More information

ECE/CE 3720: Embedded System Design

ECE/CE 3720: Embedded System Design Sequence of Events During Interrupt 1. Hardwere needs service (busy-to-done) transition. 2. Flag is set in one of the I/O status registers. (a) Interrupting event sets the flag (ex., STAF=1). Slide 1 ECE/CE

More information

AN Kbyte Addressing with the M68HC11. Overview

AN Kbyte Addressing with the M68HC11. Overview Order this document by /D 128-Kbyte Addressing with the M68HC11 By Ross Mitchell MCU Applications Engineering Freescale Ltd. East Kilbride, Scotland Overview The maximum direct addressing capability of

More information

EXCEPTIONS ON THE 9S12

EXCEPTIONS ON THE 9S12 EXCEPTIONS ON THE 9S12 Exceptions are the way a processor responds to things other than the normal sequence of instructions in memory. Exceptions consist of such things as Reset and Interrupts. Interrupts

More information

ECE/CS 3720: Embedded System Design (ECE 6960/2 and CS 6968)

ECE/CS 3720: Embedded System Design (ECE 6960/2 and CS 6968) Sequence of Events During Interrupt 1. Hardwere needs service (busy-to-done) transition. 2. Flag is set in one of the I/O status registers. (a) Interrupting event sets the flag (ex., STAF=1). Slide 1 ECE/CS

More information

EE Embedded Systems Design. Lessons Exceptions - Resets and Interrupts

EE Embedded Systems Design. Lessons Exceptions - Resets and Interrupts EE4800-03 Embedded Systems Design Lessons 7-10 - Exceptions - Resets and Interrupts 1 - Exceptions - Resets and Interrupts Polling vs. Interrupts Exceptions: Resets and Interrupts 68HC12 Exceptions Resets

More information

Interrupt and Timer ISRs. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

Interrupt and Timer ISRs. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name MPSD Interrupt Lab Exercise Interrupt and Timer ISRs Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name Notes: You must work on this assignment with your partner. Hand in

More information

What happens when an HC12 gets in unmasked interrupt:

What happens when an HC12 gets in unmasked interrupt: What happens when an HC12 gets in unmasked interrupt: 1. Completes current instruction 2. Clears instruction queue 3. Calculates return address 4. Stacks return address and contents of CPU registers 5.

More information

Chapter 14. Motorola MC68HC11 Family MCU Architecture

Chapter 14. Motorola MC68HC11 Family MCU Architecture Chapter 14 Motorola MC68HC11 Family MCU Architecture Lesson 1 68HC11 MCU Architecture overview 2 Outline CPU Registers, MCU Architecture overview Address and Data Buses Execution Unit- ALU Ports 3 CPU

More information

Menu. XMEGA 16-bit Timer/Counter Type 0 and Type 1 EEL 3744 EEL 3744

Menu. XMEGA 16-bit Timer/Counter Type 0 and Type 1 EEL 3744 EEL 3744 Menu Main Timer System for > XMEGA Timer System > 68HC11/12 Real-Time Interrupt/Counter (RTI/RTC) >68HC11/12 RTI Hardware and Registers RTI Programming Examples Use RTI interrupt; use RTIF & polling Free-running

More information

Introduction to the MC9S12 Hardware Subsystems

Introduction to the MC9S12 Hardware Subsystems Setting and clearing bits in C Using pointers in C o Program to count the number of negative numbers in an area of memory Introduction to the MC9S12 Hardware Subsystems o The MC9S12 timer subsystem Operators

More information

68HC11 Notes. Version Oct 30, Andrew J. Blauch School of Engineering

68HC11 Notes. Version Oct 30, Andrew J. Blauch School of Engineering 68HC11 Notes Version 1.1.1 Oct 30, 2006 Andrew J. Blauch School of Engineering 68HC11 Notes i DISCLAIMER: All software is provided as is and without any express or implied warranties, including, without

More information

HC11 MC68HC11F1. Technical Data

HC11 MC68HC11F1. Technical Data HC11 MC68HC11F1 Technical Data Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability

More information

EE4390 Microprocessors. Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System

EE4390 Microprocessors. Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System EE4390 Microprocessors Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System 1 Overview 68HC12 hardware overview Subsystems Memory System 2 68HC12 Hardware Overview "Copyright of Motorola,

More information

MC68HC12 Parallel I/O

MC68HC12 Parallel I/O EEL 4744C: Microprocessor Applications Lecture 6 Part 2 MC68HC12 Parallel I/O Dr. Tao Li 1 Software and Hardware Engineering (new version): Chapter 11 Or SHE (old version): Chapter 7 And Reading Assignment

More information

timer 1 Fri Oct 13 13:00:

timer 1 Fri Oct 13 13:00: timer 1 Fri Oct 1 1:00: 1.1 Introduction SECTION CAPTURE/COMPARE TIMER This section describes the operation of the 1-bit capture/compare timer. Figure -1 shows the structure of the timer module. Figure

More information

What Happens When You Reset the MC9S12?

What Happens When You Reset the MC9S12? What Happens When You Reset the MC9S12? What happens to the MC9S12 when you turn on power or push the reset button? How does the MC9S12 know which instruction to execute first? On reset the MC9S12 loads

More information

Roberto Muscedere Images and Text Portions 2003 Prentice Hall 1

Roberto Muscedere Images and Text Portions 2003 Prentice Hall 1 Microcomputer Structure and Operation Chapter 5 A Microprocessor ( P) contains the controller, ALU and internal registers A Microcomputer ( C) contains a microprocessor, memory (RAM, ROM, etc), input and

More information

EE 308 Spring Exam 1 Feb. 27

EE 308 Spring Exam 1 Feb. 27 Exam 1 Feb. 27 You will be able to use all of the Motorola data manuals on the exam. No calculators will be allowed for the exam. Numbers Decimal to Hex (signed and unsigned) Hex to Decimal (signed and

More information

The MC9S12 Timer Output Compare Function Making an event happen at specific time on the HC12 The MC9S12 Output Compare Function

The MC9S12 Timer Output Compare Function Making an event happen at specific time on the HC12 The MC9S12 Output Compare Function The MC9S12 Timer Output Compare Function Making an event happen at specific time on the HC12 The MC9S12 Output Compare Function o Registers used to enable the output compare function o Using the MC9S12

More information

68HC11 Opera,ng Modes

68HC11 Opera,ng Modes 68HC11 Opera,ng Modes Modes Single- Chip Expanded Mul,plexed Special Bootstrap Special Test Minimal Circuit Layout: Single Chip Timing Diagrams Timing Laboratory 2 Debrief Exercise 1: Serial TX Generally

More information

The MC9S12 Input Capture Function

The MC9S12 Input Capture Function The MC9S12 Input Capture Function The MC9S12 allows you to capture the time an external event occurs on any of the eight Port T PTT pins An external event is either a rising edge or a falling edge To use

More information

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1 M68HC08 Microcontroller The MC68HC908GP32 Babak Kia Adjunct Professor Boston University College of Engineering Email: bkia -at- bu.edu ENG SC757 - Advanced Microprocessor Design General Description The

More information

Hardware Version 1.0 Monitor Version 1.2. English Release October

Hardware Version 1.0 Monitor Version 1.2. English Release October Hardware Version 1.0 Monitor Version 1.2 English Release October 7 1999 Copyright (C)1996-98 by MCT Elektronikladen GbR Hohe Str. 9-13 D-04107 Leipzig Telefon: +49-(0)341-2118354 Fax: +49-(0)341-2118355

More information

538 Lecture Notes Week 5

538 Lecture Notes Week 5 538 Lecture Notes Week 5 (October 4, 2017) 1/18 538 Lecture Notes Week 5 Announements Midterm: Tuesday, October 25 Answers to last week's questions 1. With the diagram shown for a port (single bit), what

More information

538 Lecture Notes Week 5

538 Lecture Notes Week 5 538 Lecture Notes Week 5 (Sept. 30, 2013) 1/15 538 Lecture Notes Week 5 Answers to last week's questions 1. With the diagram shown for a port (single bit), what happens if the Direction Register is read?

More information

Using Input Capture on the 9S12

Using Input Capture on the 9S12 The 9S12 Input Capture Function Huang Sections 8.1-8.5 ECT_16B8C Block User Guide o Interrupts on the 9S12 o Capturing the time of an external event o The 9S12 Input Capture Function o Registers used to

More information

ECE3120: Computer Systems Chapter 8: Timer Module

ECE3120: Computer Systems Chapter 8: Timer Module ECE32: Computer Systems Chapter 8: Timer Module Manjeera Jeedigunta http://blogs.cae.tntech.edu/msjeedigun2 Email: msjeedigun2@tntech.edu Tel: 93-372-68, Prescott Hall 2 Why are Timer Functions Important?

More information

Input/Output Modes Chapter 8

Input/Output Modes Chapter 8 Input/Output Modes Chapter 8 Microcomputers can communicate with a variety of I/O devices This information can be either data or control Data is usually encoded in numeric or alphanumeric forms such as

More information

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications EE 317 Microcontroller Applications Lecture 5 : Instruction Subset & Machine Language: Introduction to the Motorola 68HC11 - Miller 2.1 & 2.2 Based on slides for ECE317 by Profs. Davis, Kieckhafer, Tan,

More information

Capturing the Time of an External Event Input Capture Subsystem

Capturing the Time of an External Event Input Capture Subsystem Capturing the Time of an External Event Input Capture Subsystem One way to determine the time of an external event is to wait for the event to occur, the read the TCNT register: For example, to determine

More information

Chapter 6 PROGRAMMING THE TIMERS

Chapter 6 PROGRAMMING THE TIMERS Chapter 6 PROGRAMMING THE TIMERS Lesson 3 Real Time Clocked Interrupts and Software Timers 2 Real Time Clock Interrupt 3 Real Time interrupts Prescaling Pre-scaling by RT1-RT0 bits for 4 or 8 or 16 2 13

More information

EE4390 Microprocessors

EE4390 Microprocessors EE4390 Microprocessors Lessons 23, 24 - Exceptions - Resets and Interrupts Revised: Aug 1, 2003 1 - Exceptions - Resets and Interrupts Polling vs. Interrupts Exceptions: Resets and Interrupts 68HC12 Exceptions

More information

MC68HC11F1 MC68HC11FC0

MC68HC11F1 MC68HC11FC0 Order this document by MC68HC11FTS/D ATA Technical Summary 8-Bit Microcontroller MC68HC11F1 MC68HC11FC0 1 Introduction The MC68HC11F1 is a high-performance member of the M68HC11 family of microcontroller

More information

Lecture 10 I/O and Interrupts

Lecture 10 I/O and Interrupts CPE 390: Microprocessor Systems Spring 2018 Lecture 10 I/O and Interrupts Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 Adapted from

More information

EEL 4744C: Microprocessor Applications. Lecture 7. Part 2. M68HC12 Interrupt. Dr. Tao Li 1

EEL 4744C: Microprocessor Applications. Lecture 7. Part 2. M68HC12 Interrupt. Dr. Tao Li 1 EEL 4744C: Microprocessor Applications Lecture 7 Part 2 M68HC12 Interrupt Dr. Tao Li 1 Reading Assignment Software and Hardware Engineering (New version): Chapter 12 or SHE (old version) Chapter 8 And

More information

Lab 9: On-Board Time Generation and Interrupts

Lab 9: On-Board Time Generation and Interrupts Lab 9: On-Board Time Generation and Interrupts Summary: Develop a program and hardware interface that will utilize externally triggered interrupts and the onboard timer functions of the 68HC12. Learning

More information

Lecture 15 February 20, 2012 Introduction to the MC9S12 Timer Subsystem What Happens when you Reset the MC9S12. Introduction to Interrupts

Lecture 15 February 20, 2012 Introduction to the MC9S12 Timer Subsystem What Happens when you Reset the MC9S12. Introduction to Interrupts Lecture 15 February 20, 2012 Introduction to the MC9S12 Timer Subsystem What Happens when you eset the MC9S12 Introduction to Interrupts The MC9S12 has a 16-bit free-running counter to determine the time

More information

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction Order this document by /D Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas Introduction More and more applications are requiring liquid crystal displays

More information

ECE 372 Microcontroller Design Parallel IO Ports - Interrupts. ECE 372 Microcontroller Design Parallel IO Ports - Interrupts

ECE 372 Microcontroller Design Parallel IO Ports - Interrupts. ECE 372 Microcontroller Design Parallel IO Ports - Interrupts Interrupts An interrupt can be compared with a phone call interrupting your task which you will resume when the call is finished You can mask an interrupt just as you can decide not to answer any phone

More information

C4 C9, C12 C18. Maxim Integrated Products 1

C4 C9, C12 C18. Maxim Integrated Products 1 General Description The LD module is an assembled and tested PC board intended for use with Maxim s low-voltage dataacquisition evaluation kits (V kits). The module uses Motorola s MCLFN microcontroller

More information

Timing Generation and Measurements

Timing Generation and Measurements Timing Generation and Measurements Lab #7 Robert McManus & Junsang Cho April 2, 2004 Timing Generation and Measurements 1. Objective To gain experience using input capture to measure pulse width. To gain

More information

ECE 367 -Experiment #1 Fall 2012

ECE 367 -Experiment #1 Fall 2012 Due at the beginning of lab during week 3 (9/1/2012) Introduction ECE 367 -Experiment #1 Fall 2012 The goal of this experiment is the acquaint you with the Technological Arts nanocore12 microcontroller

More information

High Performance M68HC11 System Design Using The WSI PSD4XX and PSD5XX Families

High Performance M68HC11 System Design Using The WSI PSD4XX and PSD5XX Families APPLICATION NOTE Order this document by: AN1242/D High Performance M68HC11 System Design Using The WSI PSD4XX and PSD5XX Families by John Bodnar INTRODUCTION This application note covers conversion from

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller The 8051, Motorola and PIC families are the 3 leading sellers in the microcontroller market. The 8051 microcontroller was originally developed by Intel in the late 1970 s. Today many

More information

Coe538 Final Study Guide 2016 (Questions & Answers)

Coe538 Final Study Guide 2016 (Questions & Answers) Coe538 Study Guide 1 of 8 Coe538 Final Study Guide 2016 (Questions & Answers) This version contains questions AND answers. This study guide is meant to help you review coe538 and prepare for the final.

More information

ECE/CS 5780/6780: Embedded System Design

ECE/CS 5780/6780: Embedded System Design ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 10: Interrupts in the 6812 Scott R. Little (Lecture 10: 6812 Interrupts) ECE/CS 5780/6780 1 / 35 General Features of Interrupts All interrupting

More information

General Features of Interrupts. ECE/CS 5780/6780: Embedded System Design. Stack Before and After an Interrupt. Sequence of Events During Interrupt

General Features of Interrupts. ECE/CS 5780/6780: Embedded System Design. Stack Before and After an Interrupt. Sequence of Events During Interrupt General Features of Interrupts ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 10: Interrupts in the 6812 All interrupting systems must have the: Ability for the hardware to request action

More information

EE 308 Spring Hello, World!

EE 308 Spring Hello, World! Hello, World! Here is the standard hello, world program: #include main() { printf("hello, world\r\n"); To write the hello, world program, you need to use the printf() function. The printf() function

More information

Module Introduction. PURPOSE: The intent of this module is to explain MCU processing of reset and interrupt exception events.

Module Introduction. PURPOSE: The intent of this module is to explain MCU processing of reset and interrupt exception events. Module Introduction PURPOSE: The intent of this module is to explain MCU processing of reset and interrupt exception events. OBJECTIVES: - Describe the difference between resets and interrupts. - Identify

More information

Technical Summary 8-Bit Microcontroller

Technical Summary 8-Bit Microcontroller SEMICONDUCTOR TECHNICAL DATA Order this document by TS/D M68HC11 KA Series Technical Summary 8-Bit Microcontroller 1 Introduction The family of microcontrollers are enhanced derivatives of the MC68HC11F1

More information

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications EE 3170 Microcontroller Applications Lecture 4 : Processors, Computers, and Controllers - 1.2 (reading assignment), 1.3-1.5 Based on slides for ECE3170 by Profs. Kieckhafer, Davis, Tan, and Cischke Outline

More information

Topics. Interfacing chips

Topics. Interfacing chips 8086 Interfacing ICs 2 Topics Interfacing chips Programmable Communication Interface PCI (8251) Programmable Interval Timer (8253) Programmable Peripheral Interfacing - PPI (8255) Programmable DMA controller

More information

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

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide Introduction the Serial Communications Huang Sections 9.2,.2 SCI Block User Guide SPI Block User Guide Parallel Data Transfer Suppose you need to transfer data from one HCS2 to another. How can you do

More information

University of Florida EEL 4744 Fall 1998 Dr. Eric M. Schwartz

University of Florida EEL 4744 Fall 1998 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 15 October 199 Professor in ECE 31-Dec-9 12:22 PM Page 1/ Instructions: Show all work on the front of the test papers. If you need more room, make a clearly

More information

Module 3. Embedded Systems I/O. Version 2 EE IIT, Kharagpur 1

Module 3. Embedded Systems I/O. Version 2 EE IIT, Kharagpur 1 Module 3 Embedded Systems I/O Version 2 EE IIT, Kharagpur 1 Lesson 15 Interrupts Version 2 EE IIT, Kharagpur 2 Instructional Objectives After going through this lesson the student would learn Interrupts

More information

MC68HC05J1A/D Rev. 1.0 HC 5 MC68HC05J1A MC68HCL05J1A MC68HSC05J1A. HCMOS Microcontroller Units TECHNICAL DATA

MC68HC05J1A/D Rev. 1.0 HC 5 MC68HC05J1A MC68HCL05J1A MC68HSC05J1A. HCMOS Microcontroller Units TECHNICAL DATA MC68HC0J1A/D Rev. 1.0 HC MC68HC0J1A MC68HCL0J1A MC68HSC0J1A HCMOS Microcontroller Units TECHNICAL DATA Technical Data Motorola reserves the right to make changes without further notice to any products

More information

3. The MC6802 MICROPROCESSOR

3. The MC6802 MICROPROCESSOR 3. The MC6802 MICROPROCESSOR This chapter provides hardware detail on the Motorola MC6802 microprocessor to enable the reader to use of this microprocessor. It is important to learn the operation and interfacing

More information

Go Gators! Relax! May the Schwartz be with you!

Go Gators! Relax! May the Schwartz be with you! Page 1/12 Exam 1 Instructions: Turn off cell phones beepers and other noise making devices. Show all work on the front of the test papers. If you need more room make a clearly indicated note on the front

More information

CS/ECE 5780/6780: Embedded System Design

CS/ECE 5780/6780: Embedded System Design CS/ECE 5780/6780: Embedded System Design John Regehr Lecture 10: Interrupts in the 6812 General Features of Interrupts All interrupting systems must have the: Ability for the hardware to request action

More information

Tutorial Introduction

Tutorial Introduction Tutorial Introduction PURPOSE: - To explain MCU processing of reset and and interrupt events OBJECTIVES: - Describe the differences between resets and interrupts. - Identify different sources of resets

More information

EE345L Spring 2004 Final Version 3 Page 1 of 8

EE345L Spring 2004 Final Version 3 Page 1 of 8 EE345L Spring 2004 Final Version 3 Page 1 of 8 Jonathan W. Valvano May 12, 2004, 9am-12noon This is a closed book exam. You must put your answers in the boxes on the answer pages. You have 3 hours, so

More information

General Features of Interrupts. ECE/CS 5780/6780: Embedded System Design. Sequence of Events During Interrupt. Stack Before and After an Interrupt

General Features of Interrupts. ECE/CS 5780/6780: Embedded System Design. Sequence of Events During Interrupt. Stack Before and After an Interrupt General Features of Interrupts ECE/CS 5780/6780: Embedded System Design Chris J. Myers Lecture 9: Interrupts in the 6812 All interrupting systems must have the: Ability for the hardware to request action

More information

Input and Output Ports. How do you get data into a computer from the outside?

Input and Output Ports. How do you get data into a computer from the outside? Input and Output Ports How do you get data into a computer from the outside? SIMPLIFIED INPUT PORT D 7 Any read from address $0000 gets signals from outside H C 2 D a t a D D D4 D3 S i g n a l s F r o

More information

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this? Introduction the Serial Communications Huang Sections 9.2, 10.2, 11.2 SCI Block User Guide SPI Block User Guide IIC Block User Guide o Parallel vs Serial Communication o Synchronous and Asynchronous Serial

More information

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture Department of Electrical Engineering Lecture 4 The 8051 Architecture 1 In this Lecture Overview General physical & operational features Block diagram Pin assignments Logic symbol Hardware description Pin

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Stefan Kowalewski, 4. November 25 Introduction to Embedded Systems Part 2: Microcontrollers. Basics 2. Structure/elements 3. Digital I/O 4. Interrupts 5. Timers/Counters Introduction to Embedded Systems

More information

Interfacing the HI7190 to a Microcontroller

Interfacing the HI7190 to a Microcontroller Interfacing the to a Microcontroller Application Note September 1995 AN9527 Authors: Stephen LaJeunesse and John Kornblum Introduction The Intersil is a 24-bit monolithic instrumentation sigma delta A/D

More information

Topic 11: Timer ISMAIL ARIFFIN FKE UTM SKUDAI JOHOR

Topic 11: Timer ISMAIL ARIFFIN FKE UTM SKUDAI JOHOR Topic 11: Timer ISMAIL ARIFFIN FKE UTM SKUDAI JOHOR Introduction Timer s objective Timer features Timer Registers - Understand function of each bit Initialization Introduction o In micro-p, we use counter

More information

MOXSYN. General Description. Features. Symbol

MOXSYN. General Description. Features. Symbol MOXSYN C68MX11 CPU General Description The C68MX11 CPU core is based on the Motorola M68HC11 microcontroller controller, but has an enhanced full 16 bit architecture, thus requiring less clock cycles for

More information

C SC 230 Computer Architecture and Assembly Language April 2000 Exam Sample Solutions

C SC 230 Computer Architecture and Assembly Language April 2000 Exam Sample Solutions C SC 230 Computer Architecture and Assembly Language April 2000 Exam Sample Solutions 1. (12 marks) Circle the correct answer for each of the following: The 8-bit two's complement representation of -15

More information

EE 308/MENG 483 Spring 2017

EE 308/MENG 483 Spring 2017 Exam II Review April 2017 Introduction to the MC9S12 Timer Subsystem The MC9S12 has a 16-bit counter that runs with a 24 MHz. The clock starts at 0x0000, counts up until it gets to 0xFFFF. It takes 2.7307

More information

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an Microcontroller Basics MP2-1 week lecture topics 2 Microcontroller basics - Clock generation, PLL - Address space, addressing modes - Central Processing Unit (CPU) - General Purpose Input/Output (GPIO)

More information

TIM_16B8C Block User Guide

TIM_16B8C Block User Guide DOCUMENT NUMBE S12TIM16B8CV1/D TIM_16B8C Block User Guide Original elease Date: 28 Jul 2 evised: 11 Oct 21 Motorola, Inc Motorola reserves the right to make changes without further notice to any products

More information

Interrupt vectors for the 68HC912B32. The interrupt vectors for the MC9S12DP256 are located in memory from 0xFF80 to 0xFFFF.

Interrupt vectors for the 68HC912B32. The interrupt vectors for the MC9S12DP256 are located in memory from 0xFF80 to 0xFFFF. Interrupts The Real Time Interrupt Interrupt vectors for the 68HC912B32 The interrupt vectors for the MC9S12DP256 are located in memory from 0xFF80 to 0xFFFF. These vectors are programmed into Flash EEPROM

More information

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications Lecture Overview EE 3170 Microcontroller Applications Lecture 7 : Instruction Subset & Machine Language: Conditions & Branches in Motorola 68HC11 - Miller 2.2 & 2.3 & 2.4 Based on slides for ECE3170 by

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller 1 Salient Features (1). 8 bit microcontroller originally developed by Intel in 1980. (2). High-performance CMOS Technology. (3). Contains Total 40 pins. (4). Address bus is of 16 bit

More information

Lecture #13 Interrupts Embedded System Engineering Philip Koopman Monday, 29-Feb-2016

Lecture #13 Interrupts Embedded System Engineering Philip Koopman Monday, 29-Feb-2016 Lecture #13 Interrupts 18-348 Embedded System Engineering Philip Koopman Monday, 29-Feb-2016 Electrical& Computer ENGINEERING Copyright 2006-2016, Philip Koopman, All Rights Reserved Example: Electronic

More information

Menu. Polling Example

Menu. Polling Example Menu Interrupt motivation (polling example) Interrupt description Interrupt-driven I/O > Interrupt Protocol > Preemptive-Resume Priority Interrupts > Vectored Interrupt Resets and Interrupts in XMEGA,

More information

spi 1 Fri Oct 13 13:04:

spi 1 Fri Oct 13 13:04: spi 1 Fri Oct 1 1:: 1.1 Introduction SECTION SERIAL PERIPHERAL INTERFACE (SPI) The SPI module allows full-duplex, synchronous, serial communication with peripheral devices.. Features Features of the SPI

More information

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications EE 37 Microcontroller Applications Lecture 8: Instruction Subset & Machine Language: A Brief Tour of the 68HC Instruction Set - Miller 2.4 & 5.2-5.3 & Appendix A Based on slides for ECE37 by Profs. Davis,

More information