User`s guide

Simulator Overview
© 2006 Microchip Technology Inc. DS51519B-page 211
A WDT time-out is simulated when WDT is enabled, proper pre/postscaler is set and
WDT actually overflows. On WDT time-out, the simulator will halt or Reset, depending
on the selection in the Break Options tab of the Settings dialog.
16.3.3.3 14-BIT CORE PERIPHERALS
Along with core support, MPLAB SIM supports the following peripheral modules, in
addition to general purpose I/O. Consult the data sheet for the particular device you are
using for information on which symbols are implemented.
•Timers
CCP/ECCP
Comparators (Limited)
A/D Converter (Limited)
•USART
EEPROM Data Memory
The delays are implemented on all peripherals, but the interrupt latency is not.
Timers
Timer0 (and the interrupt it can generate on overflow) is fully supported, and will incre-
ment by the internal or external clock. Clock input must have a minimum high time of 1
T
CY and a minimum low time of 1 TCY due to stimulus requirements.
Timer1 in its various modes is supported, except when running in counter mode by an
external crystal. MPLAB SIM supports Timer1 interrupts generated on overflow, and
interrupts generated by wake-up from sleep. The external oscillator on RC0/RC1 is not
simulated, but a clock stimulus can be assigned to those pins.
Timer2 and the interrupt that can be generated on overflow are fully supported.
CCP/ECCP
Capture
MPLAB SIM fully supports capture and the interrupt generated.
Compare
MPLAB SIM supports compare mode, its interrupt and the special event trigger
(resetting Timer1 by CCP1).
PWM
PWM output is supported (resolution greater than 1 T
CY only).
Comparators (Limited)
Only comparator modes that do not use Vref are simulated in MPLAB SIM.
Because simulation is to the register level, and not the pin level, bit/pin names will be
read as ‘0’, as required for analog, although injected stimulus may have actually
changed the value to ‘1’.
Toggling a comparator pin will not work since toggling involves reading a value and
inverting it. Since the value always reads ‘0’, the bit/pin never toggles. Instead, use two
statements to toggle a comparator pin, e.g.,
RA1 set low
RA1 set high
Note: Even if peripheral functionality is not supported in the simulator, the
peripheral registers will be available as read/write.