datasheetbank_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

AN246 View Datasheet(PDF) - STMicroelectronics

Part Name
Description
View to exact match
AN246
ST-Microelectronics
STMicroelectronics ST-Microelectronics
AN246 Datasheet PDF : 13 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
AN2466
Pin description of STMPE801
2.5.1
Configuring GPIO registers
The GPIO pin direction can be selected as input or output by writing into the GPDR register
(0x12).
Table 5.
Bit
Reset
value
Bits
7:0
GPIO Direction register
7
IO_7
0
6
IO_6
0
5
IO_5
0
GPDR
4
IO_4
3
IO_3
0
0
2
IO_2
0
1
IO_1
0
Name
GPIO[x]
Description
‘0’: The corresponding GPIO pin is set to Input.
‘1’: The corresponding GPIO pin is set to Output.
0
IO_0
0
The GPIO output state can be set high or low by writing into the corresponding bit in the
GPSR register (0x11).
Table 6.
Bit
Reset
value
Bits
7:0
GPIO State register
7
IO_7
0
6
IO_6
0
5
IO_5
0
GPSR
4
IO_4
3
IO_3
0
0
2
IO_2
0
1
IO_1
0
Name
GPIO[x]
Description
‘0’: The corresponding GPIO output is set LOW
‘1’: The corresponding GPIO output is set HIGH
If the GPIO is configured as an input, the pin state is monitored by reading the
corresponding bit in the GPMR register (0x10).
0
IO_0
0
Table 7.
Bit
Reset
value
Bits
7:0
GPIO Monitor register
7
IO_7
0
6
IO_6
0
5
IO_5
0
GPMR
4
IO_4
3
IO_3
0
0
2
IO_2
0
1
IO_1
0
0
IO_0
0
Name
GPIO[x]
Description
Reading ‘0’: The corresponding GPIO input state is LOW
Reading ‘1’: The corresponding GPIO input state is HIGH
Each GPIO can be individually programmed to generate an interrupt on change of state.
9/13

Share Link: 

datasheetbank.com [ Privacy Policy ] [ Request Datasheet ] [ Contact Us ]