Keil™, An ARM® Company

Device Database®

Product Information

Device Database®

Evaluation Software

Compliance Testing

Distributors

  • Overview

    Select your country for a list of the
    distributors available in your area.

Peripheral Simulation

For NXP (founded by Philips) P89LPC901 — Analog Comparator

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.

Analog Comparator Dialog

Analog Comparator

The Analog Comparator Dialog controls simulation of the voltage comparator in the device. When enabled, it allows the user to compare voltage sources to generate a logic-level signal to a variety of destinations. The controls in this dialog are separated into several logical groups.

Analog Comparator 1 Group

  • CMP1 (Comparator 1 Control Register) contains the following control bit settings:
  • CE1 (Comparator 1 Enable) is set to enable comparator 1.
  • CMF1 (Comparator 1 Interrupt Flag) is set by the hardware when the comparator output changes state. This triggers the Comparator 1 interrupt, if enabled.
  • CN1 (Comparator Input Select) is set to enable the comparator input.
  • CO1 (Comparator 1 Output) is the output level of the comparator when the comparator is enabled.
  • CIN1A (Comparator Positive Input A) is the positive input voltage A to Comparator 1. This is a shared pin at P0.4.

Reference Group

  • CMPREF (Comparator Reference Pin) contains the voltage reference at pin P0.5.

CINxx VTREG
Data Type: float

CMPREF VTREG
Data Type: float

Get more information about the
Peripheral Simulation Capabilities
of the µVision Debugger.