Peripheral Simulation
For Silicon Laboratories, Inc. C8051F121 — Capture/Compare
Simulation support for this peripheral or feature is comprised of:
- Dialog boxes which display and allow you to change peripheral configuration.
- VTREGs (Virtual Target Registers) which support I/O with the peripheral.
These simulation capabilities are described below.
Capture / Compare Register Dialog
The Capture/Compare Register Dialog controls simulation all of the
six operation modes of the PCA0 capture/compare module.
Selected Module
-
Mode is the mode for the selected capture compare
register.
-
PCA0CPn (PCA Capture Module Register) hold the
data used for capture and compare functions.
-
PCA0CPMn (PCA0 Capture/Compare Mode
Registers)
-
CCFn (Module n Capture/Compare Flag) is
set when a match or capture occurs fro module n.
-
PWM16n (16-bit Pulse Width Modulation Enable) is
set to select 16-bit PWM. If reset, 8-bit PWM is selected.
-
ECOMn (Comparator Function Enable) is set to
enable the comparator function.
-
CAPPn (Capture Positive Function Enable) is set
to enable the positive edge capture function.
-
CAPNn (Capture Positive Function Enable) is set
to enable the negative edge capture function.
-
MATn (Match Function Enable) is set to enable the
match function.
-
TOGn (Toggle Function Enable) is set to toggle
the CEXn pin when a match occurs.
-
PWMn (Pulse Width Modulation Mode Enable) is set
to enable Pulse Width Modulation output on the CEXn
pin.
-
ECCFn (Capture/Compare Flag Interrupt Enable) is
set to enable the compare/capture flag interrupt.
CPxN VTREG
Data Type: float
CPxN is the negative input voltage for Comparator x.
x is the Comparator number, 0 or 1. Typing the following
command in the debugger's Command Window sets the negative input
voltage for Comparator 1 to 1.5 volts:
CP1N = 5.5
You may display the Comparator 0 negative input voltage in the
debugger's Output Window by typing the following command:
CP0N
CPxP VTREG
Data Type: float
CPxN is the positive input voltage for Comparator x.
x is the Comparator number, 0 or 1. Typing the following
command in the debugger's Command Window sets the positive input
voltage for Comparator 0 to 0.75 volts:
CP0P = 0.75
You may display the Comparator 1 positive input voltage in the
debugger's Output Window by typing the following command:
CP1P