BAT32G1x9 user manual | Chapter 2 Pin function
34 / 1149
Rev.1.02
2.3.2
Port register (Pxx).
This is the register that sets the value of the port output latch in bits. The pin level is read in input mode and the
value of the port's output latch is read in output mode. After generating a reset signal, the value of these registers
changes to "00H".
Register address = base a offset address; The base address of the port register is 0x40040000, and
the offset address is shown in the figure below.
Figure2-2: format of the port register
symbol
7
6
5
4
3
2
1
0
address
After reset
R/W
P0
0
P06
P05
P04
P03
P02
P01
P00
0x300 00H (output latch) R/W
P1
P17
P16
P15
P14
P13
P12
P11
P10
0x301 00H (output latch) R/W
P2
P27
P26
P25
P24
P23
P22
P21
P20
0x302 00H (output latch) R/W
P3
0
0
0
0
0
0
P31
P30
0x303 00H (output latch) R/W
P4
P47
P46
P45
P44
P43
P42
P41
P40
0x304 00H (output latch) R/W
P5
P57
P56
P55
P54
P53
P52
P51
P50
0x305 00H (output latch) R/W
P6
P67
P66
P65
P64
P63
P62
P61
P60
0x306 00H (output latch) R/W
P7
P77
P76
P75
P74
P73
P72
P71
P70
0x307 00H (output latch) R/W
P8
P87
P86
P85
P84
P83
P82
P81
P80
0x308 00H (output latch) R/W
P10
0
0
0
0
0
P102
P101
P100
0x30A 00H (output latch) R/W
P11
0
0
0
0
0
0
P111
P110
0x30B 00H (output latch) R/W
P12
0
0
0
P124
P123
P122
P121
P120
0x30C Indefinite value
R/W
Note1
P13
P137
P136
0
0
0
0
0
P130
0x30D 00H (output latch) R/W
P14
P147
P146
P145
P144
P143
P142
P141
P140
0x30E 00H (output latch) R/W
P15
0
P156
P155
P154
P153
P152
P151
P150
0x30F 00H (output latch) R/W
Pmn
Input/output
of the
Pmn pin
Control of output data (output mode)
Reading of input data (input mode)
0
Output '0'.
Enter a low level.
1
Output "1".
Enter high.
Note: 1.P121~P124
are read-only bits.
2. The initial value must be set for the unassigned bits.