6. I/O ports
A96G150 User's manual
48
6
I/O ports
A96G150 has ten groups of I/O ports (P0 ~ P5). Each port can be easily configured by software as I/O
pin, internal pull up and open-drain pin to meet various system configurations and design requirements.
P0 includes a function that can generate interrupt signals according to state of a pin.
6.1
Port register
6.1.1
Data register (Px)
Data register is a bidirectional I/O port. If ports are configured as output ports, data can be written to
the corresponding bit of the Px. If ports are configured as input ports, the data can be read from the
corresponding bit of the Px.
6.1.2
Direction register (PxIO)
Each I/O pin can be independently used as an input or an output through the PxIO register. Bits cleared
in this register will make the corresponding pin of Px to input mode. Set bits of this register will make
the pin to output mode. Almost bits are cleared by a system reset, but some bits are set by a system
reset.
6.1.3
Pull-up register selection register (PxPU)
The on-chip pull-up resistor can be connected to I/O ports individually with a pull-up resistor selection
register (PxPU). The pull-up register selection controls the pull-up resister enable/disable of each port.
When the corresponding bit is 1, the pull-up resister of the pin is enabled. When 0, the pull-up resister
is disabled. All bits are cleared by a system reset.
6.1.4
Open-drain selection register (PxOD)
There are internally open-drain selection registers (PxOD) for P0 ~ P4 and a bit for P5. The open-drain
selection register controls the open-drain enable/disable of each port. Almost ports become push-pull
by a system reset, but some ports become open-drain by a system reset.
6.1.5
De-bounce enable register (PxDB)
P0[7:4], P1[3:0], P4[3:0] support debounce function. Debounce clocks of each ports are fx/1, fx/4,
fx/4096 and LSIRC(128kHz).
6.1.6
Port function selection register (PxFSR)
These registers define alternative functions of ports. Please remember that these registers should be
set properly for alternative port function. A reset clears the PxFSR register to
‘
00H
’
, which makes all
pins to normal I/O ports.
Содержание A96G150
Страница 126: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 126 Figure 43 16 bit Timer Counter Mode Operation Example...
Страница 136: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 136 Figure 51 16 bit Timer Counter Mode Operation Example...
Страница 147: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 147 Figure 59 16 bit Timer Counter Mode Operation Example...
Страница 157: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 157 Figure 67 16 bit Timer Counter Mode Operation Example...
Страница 171: ...A96G150 User s manual 14 12 bit ADC 171 Figure 79 ADC Operation Flow Sequence...
Страница 333: ...A96G150 User s manual Revision history 333 Revision history Revision Date Notes 1 00 2022 06 22 First creation...