Renesas M16C/64C User Manual page 465

Table of Contents

Advertisement

M16C/64C Group
22.3.2.4
Compare Function (PMC0)
Values for registers PMC0CPD and PMC0DAT0 are compared. As a result, it can be detected that
the first 1 to 8 bits of the remote control signal are the specific values.
When using the compare function, set the following:
Set the CPEN bit in the PMC0CPC register to 1 (compare enabled).
Select bits to be compared by setting bits CPN2 to CPN0 in the PMC0CPC register (when the
setting value is n, bits n to 0 are compared. n: 0 to 7).
Set the compare data in the PMC0CPD register.
When storing received data, if the compared results match, the CPFLG bit in the PMC0STS register
becomes 1 (compare match).
PMC0 internal input signal
ENFLG bit in the
PMC0CON2 register
PMC0RBIT register
PMC0DAT0 register
PMC0DAT1 register
PMC0CPD register
CPFLG bit in the
PMC0STS register
The above diagram shows an instance in which the following conditions are met:
The CPEN bit in the PMC0CPC register is 1 (compare enabled)
Bits CPN2 to CPN0 in the PMC0CPC register equal 2 (bits 2 to 0 are compared)
Figure 22.8
Receive Buffer and Compare Function
R01UH0092EJ0110 Rev.1.10
Jul 31, 2012
Data 0
Data 1
Data 1
0
1
0000 0000b
0000 0000b
0000 0010b 0000 0110b 0000 0110b
Data 0 is
Data 1 is
stored in
stored in
bit 0
bit 1
0000 0000b
XXXX X110b
22. Remote Control Signal Receiver
Data 0
2
3
4
Data 1 is
Data 0 is
stored in
stored in
bit 2
bit 3
Compare match
Data 1
Data 0
8
9
1111 0110b
Data 1 is
stored in
bit 7
0000 0001b
Data 1 is
stored in
bit 8
Page 432 of 807

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/60 seriesM16c series

Table of Contents