Keil Logo

Peripheral Simulation

For Silicon Laboratories, Inc. C8051F368 — Comparator

Simulation support for this peripheral or feature is comprised of:

  • Dialog boxes which display and allow you to change peripheral configuration.

These simulation capabilities are described below.

Comparator Dialog

Comparator

The Comparator Dialog controls simulation of the two voltage comparators in the device. When enabled, it allows the user to compare voltage sources to generate a logic-level signal to a variety of destinations.

Comparator 0

  • CPT0CN (Comparator 0 Control Register) contains the following control bit settings:
  • CP0EN (Comparator 0 Output Enable Bit) is set to enable comparator 0.
  • CP0OUT (Comparator 0 Output State Flag) is set when the voltage on CP0P is greater than CP0N.
  • CP0RIF (Comparator 0 Rising-Edge Interrupt Flag) is set when a Comparator 0 rising edge interrupt occurs.
  • CP0FIF (Comparator 0 Falling-Edge Interrupt Flag) is set when a Comparator 0 falling edge interrupt occurs.
  • CORSEF (Comparator 0 Reset Flag) is set to reset Comparator 0.
  • CP0HYP (Comparator 0 Positive Hysteresis Control Bits) selects 0, 2, 4 or 10 mV of positive hysteresis.
  • CP0HYN (Comparator 0 Negative Hysteresis Control Bits) selects 0, 2, 4 or 10 mV of negative hysteresis.
  • CPT0MX (Comparator 0 MUX Selection Register) contains the positive and negative input controls for CMX0P and CMX0N.
  • CMX0P (Comparator 0 Positive Input MUX Select) selects the port pins to be used for positive input.
  • CMX0N (Comparator 0 Negative Input MUX Select) selects the port pins to be used for negative input.
  • CP0P (Comparator 0 Positive Input Voltage) displays the Comparator 0 negative input voltage.
  • CP0N (Comparator 0 Negative Input Voltage) displays the Comparator 0 positive input voltage.
  • CPT0MD (Comparator 0 Mode Selection Register) selects the Comparator 0 response time.
  • CP0RIE (Comparator Rising-Edge Interrupt Enable) is set to enable the comparator rising-edge interrupt.
  • CP0FIE (Comparator Falling-Edge Interrupt Enable) is set to enable the comparator falling-edge interrupt.
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.