Datasheet

Table Of Contents
Data Sheet ADuC7060/ADuC7061
Rev. D | Page 103 of 108
Table 120. GPxPAR MMR Bit Designations
Bit Name Description
31:15 Reserved.
23:16 GPL[7:0] General I/O port pin functionality lock
registers.
GPL[7:0] = 0, normal operation.
GPL[7:0] = 1, for each GPIO pin, if this bit is
set, writing to the corresponding bit in
GPxCON or GPxDAT register bit has no
effect.
15:8 GPDS[7:0] Drive strength configuration. This bit is
configurable.
GPDS[x] = 0, maximum source current is 2 mA.
GPDS[x] = 1, maximum source current is 4 mA.
7:0
GPPD[7:0]
Pull-Up Disable Port x[7:0].
GPPD[x] = 0, pull-up resistor is active.
GPPD[x] = 1, pull-up resistor is disabled.
GP0CON1 Control Registers
The GP0CON1 write values are as follows: GP0KEY1 = 0x7,
GP0CON1 = user value, and GP0KEY2 = 0x13.
Name: GP0CON1
Address: 0xFFFF0468
Default value: 0x00
Access: Read and write
Function: This register controls the P0.0, P0.1, P0.2, and
P0.3 functionality of the multifunction GPIO
pins.
Table 121. GP0CON1 Write Sequence
Name Value
GP0KEY1 0x7
GP0CON1 User value
GP0KEY2 0x13
Table 122. GP0CON1 MMR Bit Designations
Bit Name Description
7:2 Reserve
d
These bits must always be set to 0.
1 SPII2CS
EL
This bit configures the P0.0 to P0.3 functions
in I
2
C or SPI mode. Note that Bit 0 of GP0CON1
must be set to 0 for this bit to work.
To select the P0.0, P0.1, P0.2, and P0.3
functions in SPI mode, clear this bit to 0.
To select the P0.0, P0.1, P0.2, and P0.3
functions in I
2
C mode, set this bit to 1.
This bit is cleared by default.
0 ADCSEL This bit configures the P0.0 to P0.3 functions
as GPIO pins or as ADC input pins.
To enable P0.0, P0.1, P0.2 and P0.3 functions
as ADC inputs, set this bit to 1.
To enable P0.0, P0.1, P0.2, and P0.3 functions
as digital I/O, clear this bit to 0.
This bit is cleared by default.
Name GP0KEY1
Address: 0xFFFF0464
Default value: 0xXXXX
Access: Write only
Function: When writing to GP0CON1, the value of 0x07
must be written to this register in the
instruction immediately before writing to
GP0CON1.
Name: GP0KEY2
Address: 0xFFFF046C
Default value: 0xXXXX
Access: Write only
Function: When writing to GP0CON1, the value of 0x13
must be written to this register in the instruction
immediately after writing to GP0CON1.