
BAT32G1x9 user manual | Chapter 10 Timer M
364 / 1149
Rev.1.02
10.3.20
Port mode registers (PMxx, PMCxx).
This is the register that sets the input/output of the port or the analog input.
When using the multiplex port of the timer output pin (Pxx/TMIOD1, Pxx/TMIOC1, etc.) as the output of
the timer, the corresponding port mode register (PMxx, P) must be used for each port MCxx) bit and port
register (Pxx) position "0".
(Example) P10/TMIOD1 as a timer output
Place the PM10 andPMC10 positions of port mode register 1 "0".
Place port register 1 at P10 position "0".
When using the multiplexing port of the timer input pin (P10/TMIOD1, P11/TMIOC1, etc.) as the input to
the timer, the position of the port mode register (PMxx) corresponding to each port must be "1" and each port
The corresponding port mode register (PMCxx) is at position "0". At this point, the bit of the port register (Pxx)
can be "0" or "1".
(Example) P10/TMIOD1 as a timer input
Place the PM10 position of Port Mode Register 1 "1".
Place the PMC10 position of port mode register 1 "0".
Place the P10 position of port register 1 at "0" or "1".
Set the PM1 and PMC1 registers via the 8-bit memory operation instructions. After generating a reset
signal, the value of the register changes to "FFH".
Figure 10-40 Format of Port Mode Register 1 (PM1, PMC1).
Address: 0x40040321
after reset:
FFH R/W
Symbol
7 6 5 4 3 2 1 0
PM1
Address: 0x40040061
After reset:
FFH R/W
Symbol
7 6 5 4 3 2 1 0
PMC1
PMCmn
The input/output mode of the Pmn pin is selected (m=1, n=0~7).
0
Digital inputs/outputs (multiplexing functions other than analog inputs).
1
Analog input
PMmn
The input/output mode of the Pmn pin is selected (m=1, n=0 to 7).
0
Output mode (Output Buffer ON).
1
Input mode (output buffer OFF).
PM17
PM16
PM15
PM14
PM13
PM12
PM11
PM10
PMC17
PMC16
PMC15
PMC14
PMC13
PMC12
PMC11
PMC10