Extint Interrupts And Protection Circuitry; Programming Example - Intel 8XC196MC User Manual

Table of Contents

Advertisement

9.7.2

EXTINT Interrupts and Protection Circuitry

The protection register contains two bits, disable protection (DP) and enable output (EO), that to-
gether enable and disable the waveform generator's outputs. The EXTINT event generates a sin-
gle short pulse that clears the EO bit, so if software sets the EO bit immediately following an
EXTINT event, the outputs will be disabled only for the time between the EXTINT event and the
CPU write. The CPU can immediately set the EO bit again, even if the EXTINT signal remains
asserted.
9.8

PROGRAMMING EXAMPLE

This example was designed to run on an 8XC196MC demo board, but it can easily be modified
for an evaluation board. The program allows you to test the waveform generator's registers and
observe their effects on the output waveforms. All variables are defined as words and are masked
to the appropriate length before they are written to the registers. (This method is not compact, but
it is easy to code and debug.) When running the program under the reduced instruction set mon-
itor (RISM) software, you can use the following command to change any variable and immedi-
ately see the result on the outputs:
WORD.variable_name
$debug
;Program to test WFG peripheral
;
$nolist
$include (c:\ecm\196mc\mc.inc)
$list
;
; This program allows modifying the WFG input parameters "on the fly"
; on the MC demo board. This allows you to see what is really going on.
;
; First, set up the variables that you want to control:
;
rseg at 40h
;
mode:
dsw 1
op0:
dsw 1
op1:
dsw 1
sync:
dsw 1
pe7:
dsw 1
pe6:
dsw 1
p7:
dsw 1
p6:
dsw 1
ph1:
dsw 1
ph2:
dsw 1
;mode = 0-3
;P6.0,2,4 polarity--0=low, 1=high
;P6.1,3,5 polarity--0=low, 1=high
;0=load now, 1 = synchronized
;P6.7 0=i/o, 1=PWM
;P6.6 0=i/o, 1=PWM
;P6.7 I/O value
;P6.7 I/O value
;P6.0,1 config
;P6.2,3 config
Get other manuals https://www.bkmanuals.com
WAVEFORM GENERATOR
9-21

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc196md8xc196mh

Table of Contents