216/317
7 - Debugger and PROM Programmer Tutorial for ST72251
DC.W
intTim_A
; Timer A: ($FFF2)
DC.W
0
DC.W
0
DC.W
0
DC.W
0
DC.W
0
res:
DC.W
reset
; vecteur de reset ($FFFE)
END
7.6.4.2 ADC source file
(Acana.asm)
The analog to digital conversion handling is done in this short file:
ST7/
;=============================================================
;=
Analog to digital conversion
=
;=============================================================
; relocatable sub-routine to initialise the ADC and to run a
; conversion
; The program which calls this routine selects the channel to
; be converted by loading the accumulator with the channel number
#include "REGISTER.INC"
PUBLIC acana
EXTERN watch.b
SEGMENT 'rom'
WORDS
; ADC initialization
; ==================
acana:
; On entry, A contains the channel selector bit
add A, #$20
; Make up the ADC control word : set ADON: A/D
converter on
ld adccsr, a
; Start the conversion
; Analog to digital conversion
; ======================
bclacana:
ld a, #watch
; Load the watchdog
ld wdgr, a
btjf adccsr,#COCO,bclacana ; wait for the acquisition
ret
; Conversion finished.
END
Содержание 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 ...