Keil Logo

Peripheral Simulation

For NXP (founded by Philips) P89LPC908 — Analog Comparator (Cmp1: 1I/1O)

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.
  • CIN1B (Comparator Positive Input B) is the positive input voltage B to Comparator 1.

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.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.