Hardware Reference
In-Depth Information
OLATx Register
GPIO pins are all configured as inputs after a power-on reset (or use of RESET ). Prior
to configuring pins as outputs, it is usually a good idea to set the required output values.
This is accomplished by writing the OLAT register, for group A or B. For this project, we'll
just write 0x00 to both OLATA and OLATB .
OLATx Register
GPIO
Address
Bit
7
6
5
4
3
2
1
0
A
0x14
R
Y
Y
Y
Y
Y
Y
Y
Y
B
0x15
W
Y
Y
Y
Y
Y
Y
Y
Y
Reset
0
0
0
0
0
0
0
0
OLATx Bit Value
0
Output set to 0
1
Output set to 1
GPPUx Register
A given project should also define a known value for its input pull-up resistors. Setting a
given bit to 1 enables a weak 100 K Ω internal pull-up resistor. This setting affects only the
inputs. The pull-up resistors are configured off after a reset. In our example code, we turn
them on.
GPPUx Register
GPIO
Address
Bit
7
6
5
4
3
2
1
0
A
0x0C
R
Y
Y
Y
Y
Y
Y
Y
Y
B
0x0D
W
Y
Y
Y
Y
Y
Y
Y
Y
Reset
0
0
0
0
0
0
0
0
GPPUx Bit Value
0
Pull-up resistor disabled
1
100 KW pull-up resistor enabled
 
 
Search WWH ::




Custom Search