Device Database®

Peripheral Simulation

For Evatronix R8051XC (2 DPTR) — Timer 2

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.

Timer/Counter 2 Dialog

Timer/Counter 2

The Keil Debugger simulates all aspects of Timer/Counter 2. The configuration is reflected in the Timer/Counter 2 Dialog that you may open from the Peripherals Menu. You may use the controls in the dialog to override the settings configured by your target program. This allows you to learn how the timer/counter works by interactively changing the configuration settings.

  • Mode settings select the size and auto-reload functions, and select either Timer or Counter operation for Timer 2.
  • Reload controls if and when Timer 2 is reloaded.
  • T2CON (Timer Control Register) holds the run/stop and overflow flag for Timer 2.
  • T2 (Timer/Counter 2) holds the value of Timer/Counter 2.
  • CRC (Capture/Reload/Compare Register) is reload, capture or compare register depending on how Timer 2 is used.
  • T2EX (Timer 2 Capture/Reload Trigger) is an external input (P1.1/AN1/T2EX) for up/down counting or triggering a timer 2 reload.
  • T2 Pin is an external input pin for counter 2(P1.1/AN0/T2).
  • T2PS (Prescaler Select Bit) is set to clock the timer at 1/24 the oscillator frequency. If reset, the timer is clocked at 1/12 the oscillator frequency.
  • TF2 (Timer 2 Overflow Flag) is set when a Timer 2 overflow occurs.
Get more information about the
Peripheral Simulation Capabilities
of the µVision Debugger.