WAVEFORM GENERATOR

and

temp,#0001h

;mask

shl

temp,#3

;shift to correct location

ld

temp1,it

;interrupt type bit

and

temp1,#0001h

;mask

shl

temp1,#2

;shift to correct location

or

temp,temp1

;combine into temp

ld

temp1,dp

;disable protection bit

and

temp1,#0001h

;mask

shl

temp1,#1

;shift to correct location

or

temp,temp1

;combine into temp

ld

temp1,eo

;enable output bit

and

temp1,#0001h

;mask

or

temp,temp1

;combine into temp

stb

temp,WG_PROTECT[0];store byte into WG_PROTECT

ret

 

 

;

 

 

;*******************************************

;interrupt routine for WFG

 

;*******************************************

;

 

 

cseg at 0f1a0h

 

;demo board PI interrupt

pusha

 

 

call

wgout

;update WG_OUTPUT register

call

loadregs

;update reload & compare regs

call

protect

;update protection options

call

wgcon

;update WG_CONTROL

popa

 

 

ret

end

9-25

Page 224
Image 224
Intel 8XC196MC, 8XC196MD, 8XC196MH manual Demo board PI interrupt