rti_mult_tof -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ************************************************************************** * rti_mult_proc.asm * RTI Multitasking with TOF Example EEL-4744 EMS * * * Multiple Processes (2) with TOF ******************************************************** * MultiTasking using Real-Time Interrupt * Port B Port A * Process#1: Continuously Increment Hold * Process#2: Hold Continuously Decrement * Switching between Processes will occur * EVERY 8.192 msecs (=16k=16384=$4000 E-cycles) * * USE TIMER OVERFLOW AS TIME BASE & Extend the Timer with a * 16-bit Extension * * USE 4.0 MHZ CRYSTAL FOR 68HCl2 CLOCK ******************************************************** * SYMBOL DEFINITIONS ******************************************************** PORTA EQU $0000 ; Input Port A DDRA EQU $0002 ; Data Direction Port A PORTB EQU $0001 ; Output Port B DDRB EQU $0003 ; Data Direction Port B RTICTL EQU $0014 ; RTI Interrupt Control Register RTIFLG EQU $0015 ; RTI Interrupt Flag Register ; TSCR EQU $0086 ; Timer System Control Register TMSK2 EQU $008D ; Timer Mask Register 2 TFLG2 EQU $008F ; Timer Flag Register 2 ; * I/O Patterns OUTPAT1 EQU $0F ;OUTPUT Pattern for PORTB OUTPAT2 EQU $F0 ;OUTPUT Pattern for PORTA ; * MASKS BIT7 EQU %10000000 INV7 EQU %01111111 BIT6 EQU %01000000 % * Others StSize EQU $40 * ******************************************************** * DATA SECTION ******************************************************** ORG $900 PID DS.B 1 ;Process ID SP1 DS.B 2 ;Stack Pointer for Process#1 SP2 DS.B 2 ;Stack Pointer for Process#2 ; TCNTEXT DS.W 1...
View Full Document

Page1 / 5

rti_mult_tof -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online