215/317
7 - Debugger and PROM Programmer Tutorial for ST72251
ld A, #t_timer
; Initialize TAOCR1 register
ld taoc1hr, A
; (comparison register)
clr taoc1lr
inc A
; A counter reset will happen
ld taoc2hr, A
; before it reaches the value
; in TAOCR2
rim
; Enable maskable interrupts
; Main
; ====
Main:
call StartTasks
; Start kernel
; Though it is a call, it will never return
; Timer A interrupt (every 10ms)
; ==================================
intTim_A:
dec reg1
; Update timing registers
dec reg2
dec reg3
dec reg4
clr taclr
; Reset free running counter
tnz tasr
clr taoc1lr
; Clear OCF1
iret
; Code of task 1
; =================
Task1:
TASK 1
; Code of task 2
; =================
Task2:
TASK 2
; Code of task 3
; =================
Task3:
TASK 3
; Code of task 4
; =================
Task4:
TASK 4
; Vecteurs d'interruption
; =======================
segment 'vectit'
; ($FFE0)
DC.W
0
; skip unused vectors
DC.W
0
DC.W
0
DC.W
0
DC.W
0
DC.W
0
DC.W
0
DC.W
0
DC.W
0
tim_A:
Содержание ST7 Series
Страница 1: ...ST7 8 BIT MCU FAMILY USER GUIDE JANUARY 1999 1 ...
Страница 238: ...238 317 8 C Language and the C Compiler 08 Burn bmp Then use the EPROMer programmer software as described in Chapter 7 ...
Страница 289: ...289 317 10 Second Application a Sailing Computer 10 befor Bs Rw Vw VMG AlphaR AlphaV Before the wind ...