Intel 8XC196MC User Manual page 222

Table of Contents

Advertisement

;load WFG registers
;
call wgout
call loadregs
call protect
call wgcon
;
;enable interrupts & loop here
;
ei
sjmp $
;
;****************************************
; form WG_OUTPUT value from variable data
;****************************************
;
wgout:
ld
temp,op1
and
temp,#0001h
shl
temp,#15
ld
temp1,op0
and
temp1,#0001h
shl
temp1,#14
or
temp1,temp
ld
temp,sync
and
temp,#0001h
shl
temp,#13
or
temp1,temp
ld
temp,pe7
and
temp,#0001h
shl
temp,#12
or
temp1,temp
ld
temp,pe6
and
temp,#0001h
shl
temp,#11
or
temp1,temp
ld
temp,ph3
and
temp,#0004h
shl
temp,#8h
or
temp1,temp
ld
temp,ph2
and
temp,#0004h
shl
temp,#7h
or
temp1,temp
ld
temp,ph1
and
temp,#0004h
shl
temp,#6h
or
temp1,temp
ld
temp,p7
and
temp,#0001h
shl
temp,#7
;initialize WG_OUTPUT register
;initialize reload & compare regs
;initialize protection
;initialize WG_CONTROL
;get op1
;mask
;move bit to correct location
;get op0
;mask
;move bit to correct location
;combine
;get sync bit
;mask
;move to correct location
;combine
;get pe7 bit
;mask
;move to correct location
;combine
;get pe6 bit
;mask
;move to correct location
;combine
;get ph3 bits
;mask for ph3.2
;move
;combine
;get ph2 bits
;mask for ph2.2
;move
;combine
;get ph1 bits
;mask for ph1.2
;move
;combine
;get p7 bit
;mask
;move to correct location
Get other manuals https://www.bkmanuals.com
WAVEFORM GENERATOR
9-23

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc196md8xc196mh

Table of Contents