Intel 8XC196MC Microscope & Magnifier User Manual


 
8XC196MC, MD, MH USER’S MANUAL
9-22
ph3: dsw 1 ;P6.4,5 config
eo: dsw 1 ;0=disable output, 1=enable output
dp: dsw 1 ;0=enable protection, 1=disable
it: dsw 1 ;0=falling edge trig, 1=rising edge
es: dsw 1 ;0=edge, 1=sample
ec: dsw 1 ;0=stop cntr, 1=start
dead: dsw 1 ;10-bit dead time
reload: dsw 1
comp1: dsw 1
comp2: dsw 1
comp3: dsw 1
temp: dsw 1
temp1: dsw 1
temp2: dsw 1
;
;
;**************************************************
; first, initialize the values for these variables:
;**************************************************
;
cseg at 0e000h ;demo board RAM
;
di
dpts
ld sp,#200h
ld mode,#0000h ;mode0
ld ec,#0001h ;enable cntr
ld dead,#0010h ;1.6 us
ld op0,#0001h ;active high
ld op1,#0001h ;active high
ld sync,#0001h ;synchronized WG_OUTPUT load
ld pe7,#00000h ;P6.7 in I/O mode
ld pe6,#00000h ;P6.6 in I/O mode
ld p7,#00000h ;P6.7 I/O = 0
ld p6,#00000h ;P6.6 I/O = 0
ld ph1,#0007h ;wfg both outputs
ld ph2,#0007h ;wfg both outputs
ld ph3,#0007h ;wfg both outputs
ld eo,#0001h ;enable outputs
ld dp,#0001h ;disable protection
ld it,#0001h ;rising/high edge trigger
ld es,#0001h ;24-state trigger
ld reload,#1000h ;1.024 ms mode0
ld comp1,#0100h ;64 us
ld comp2,#0200h ;128 us
ld comp3,#0400h ;256 us
;
;************************
; now initialize the WFG
;************************
;
;set up interrupts
;
ldb temp,#00010000b ;
stb temp,PI_MASK[0] ;unmask WG interrupt
ldb temp,#00100000b ;
ldb int_mask1,temp ;
;