Intel 8XC196MC User Manual page 223

Table of Contents

Advertisement

8XC196MC, MD, MH USER'S MANUAL
or
temp1,temp
ld
temp,p6
and
temp,#0001h
shl
temp,#6
or
temp1,temp
ld
temp,ph3
and
temp,#0003h
shl
temp,#4h
or
temp1,temp
ld
temp,ph2
and
temp,#0003h
shl
temp,#2h
or
temp1,temp
ld
temp,ph1
and
temp,#0003h
or
temp1,temp
st
temp1,WG_OUTPUT[0]
ret
;
;****************************************
; form WG_CONTROL value
;****************************************
;
wgcon:
ld
temp,mode
and
temp,#0003h
shl
temp,#12
ld
temp1,ec
and
temp1,#0001h
shl
temp1,#10
or
temp,temp1
ld
temp1,dead
and
temp1,#03ffh
or
temp,temp1
st
temp,WG_CONTROL[0]
ret
;
;*****************************************
;load the WG_RELOAD and WG_COMPx registers
;*****************************************
;
loadregs: st
reload,WG_RELOAD[0]
st
comp1,WG_COMP1[0]
st
comp2,WG_COMP2[0]
st
comp3,WG_COMP3[0]
ret
;
;*************************
;load WG_PROTECT options
;*************************
;
protect:ldtemp,es
9-24
;combine
;get p6 bit
;mask
;move to correct location
;combine
;get ph3 bits again
;mask for ph3.0 & 1
;move
;combine1
;get ph2 bits again
;mask for ph2.0 & 1
;move
;combine
;get ph1 bits again
;mask for ph3.0 & 1
;combine, don't need to move
;now store it
;get mode
;mask
;shift to correct location
;start/stop bit
;mask
;shift to correct location
;combine into temp
;get dead time
;mask to 10 bits
;combine into temp
;store WG_CONTROL
;get sample control bit
Get other manuals https://www.bkmanuals.com

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc196md8xc196mh

Table of Contents