NEC mPD780852 Series Preliminary User's Manual page 233

8-bit single-chip microcontrollers
Table of Contents

Advertisement

(2) Compare register n0 (MCMPn0)
MCMPn0 is an 8-bit register that can rewrite compare values through specification of bit 4 (TENn) of the compare
control register n (MCMPCn).
RESET input clears this register to 00H and clears hardware to 0.
MCMPn0 is a register that supports read/write only for 8-bit access instructions. MCMPn0 continuously compares
its value with the MCNT value. When the above two values match, a match signal of the sin side of meter n
is generated.
(3) Compare register n1 (MCMPn1)
MCMPn1 is an 8-bit register that can rewrite compare values through specification of bit 4 (TENn) of the compare
control register n (MCMPCn).
RESET input clears this register to 00H and clears hardware to 0.
MCMPn1 is a register that supports read/write only for 8-bit access instructions. MCMPn1 continuously compares
its value with the MCNT value. When the above two values match, a match signal of the cos side of meter n
is generated.
(4) 1-bit addition circuit
The 1-bit addition circuit repeats 1-bit addition/non-addition to PWM output alternately upon MCNT overflow
output, and enables the state of PWM output between current compare value and the next compare value.
This circuit is controlled by bits 2 and 3 (ADBn0 and ADBn1) of the MCMPCn register.
(5) Output controller
The output controller consists of a P-ch and N-ch drivers and can drive a meter in H bridge configuration by
connecting a coil.
When a meter is driven in half bridge configuration, the unused pins can be used as normal output port pins.
The relation of the duty factor of the PWM signal output from the SMnm pin is indicated by the following expression
(n = 1 to 4, m = 0, 1).
Set value of MCMPnm × cycle of MCNT count clock
PWM (duty) =
Set value of MCMPnm
=
Cautions 1. MCMPn0 and MCMPn1 cannot be read or written by a 16-bit access instruction.
2. MCMPn0 and MCMPn1 are in master-slave configuration, and MCNT is compared with
a slave register. The PWM pulse is not output until the first overflow occurs after the
counting operation has been started because the compare data is not transferred to
the slave.
CHAPTER 18 METER CONTROLLER/DRIVER
255 × cycle of MCNT count clock
× 100%
255
Preliminary User's Manual U14581EJ3V0UM00
× 100%
233

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpd780851Mpd780851aMpd780852aMpd78f0852

Table of Contents