MC68HC711G5 MOTOROLA [Motorola, Inc], MC68HC711G5 Datasheet - Page 137

no-image

MC68HC711G5

Manufacturer Part Number
MC68HC711G5
Description
High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcontroller
Manufacturer
MOTOROLA [Motorola, Inc]
Datasheet
Both units can be driven by the E-clock, a scaled E-clock or by external signals applied to the EVI1
and EVI2 pins. However, note that only one scaled value of the E-clock can be selected. For
example, if E/4 is selected as the clock source for EVCNT1, the only E-clock derivatives that can
be chosen as the clock source for EVCNT2 are E and E/4. Alternatively, if E/4 is selected to drive
EVCNT2, then E/4 is the only E-clock derivative that can be selected to drive EVCNT1.
11.3.1 Operation of Pulse Width Modulation Unit in Mode 1
The PWM unit can be clocked by the E-clock, a scaled E-clock, or an external signal applied to the
EVI1 (PH5) pin. Alternatively an external signal on EVI1 can be used to gate the E-clock or scaled
E-clock signal to the counter EVCNT1. The clock source is selected via the INPUT1 selector.
The period of the PWM output signal is determined by the value stored in ECMP1A. When a match
occurs between this compare register and the counter register, EVCNT1, the output unit EVO is
reset and EVCNT1 is cleared (to zero). At the same time, an interrupt signal EVENT1 is generated
which, if enabled, interrupts the CPU.
The duty cycle of the PWM output signal is determined by the relationship between the values stored
in ECMP1B and ECMP1A. The value stored in ECMP1B is the number of clock pulses to be
accumulated by EVCNT1 before the output signal changes state. The output signal then remains
in the new state for the remainder of the period, i.e. until EVCNT1 reaches the value stored in
ECMP1A. The duty cycle can be expressed as a percentage of the period by the following equation:
DUTY CYCLE = 100 x [1 - (ECMP1B)/(ECMP1A)] %
The PWM unit will also work as a pulse accumulator by switching off the output signal to the EVO
pin (PH6) and ignoring ECMP1B.
11.3.2 Operation of Pulse Accumulator Unit in Mode 1
The PA unit can be clocked by the E-clock, a scaled E-clock, or an external signal applied to the EVI2
(PH4) pin. Alternatively an external signal on EVI2 can be used to gate the E-clock or scaled E-clock
signal to the counter EVCNT1. The clock source is selected via the INPUT2 selector.
EVCNT2 counts the pulses coming from the INPUT2 selector. It is cleared by a successful
comparison between itself and the compare register ECMP2A. ECMP2A can be programmed with
any 8-bit value to control the time when the counter is cleared.
ECMP2B can be used to generate an interrupt signal EVENT2 after a required number of input
pulses have been accumulated by EVCNT2. If enabled, EVENT2 will interrupt the CPU.
11.3.3 Register Functions in Mode 1
11.3.3.1
Counter 1 (EVCNT1)
EVCNT1 counts the number of pulses coming from the INPUT1 selector. It is cleared by a successful
comparison between itself and ECMP1A.
MC68HC11G5
EVENT COUNTER
MOTOROLA
11-7

Related parts for MC68HC711G5