st20-gp6 STMicroelectronics, st20-gp6 Datasheet - Page 95

no-image

st20-gp6

Manufacturer Part Number
st20-gp6
Description
Gps Processor
Manufacturer
STMicroelectronics
Datasheet
16.1.2 PIO bit configuration register
The PC1 register is used to configure each of the PIO port bits as an input or output. Writing a 0
configures the bit as an input, a 1 configures the bit as an output.
16.1.3 PIO Input compare and Compare mask registers
The Input compare register (PComp) holds the value to which the input data from the PIO ports
pins will be compared. If any of the input bits are different from the corresponding bits in the
PComp register and the corresponding bit position in the PIO Compare mask register (PMask) is
set to 1, then the internal interrupt signal for the port will be set to 1.
The compare function is sensitive to changes in levels on the pins and so the change in state on
the input pin must be greater in duration than the interrupt response time for the compare to be
seen as a valid interrupt by an interrupt service routine.
Note that the compare function is operational in all configurations for a PIO bit including the alter-
nate function modes.
PC1
Bit
7:0
PComp
Bit
PMask
Bit
7:0
7:0
Bit field
ConfigData7:0
Bit field
PComp7:0
Bit field
PMask7:0
Table 16.4 PComp register format - 1 register per port
PIO port base address + #30
Function
Configures the PIO bit as an input or an output.
Table 16.5 PMask register format
Table 16.3 PC1 register format
Function
Bit 0 to 7 value to which the input data from the PIO port pins will be
compared.
Function
When set to 1, the compare function for the internal interrupt for the port is
enabled. If the respective bit (0 to 7) of the input is different to the respective
PComp7:0 bit in the PComp register, then an interrupt is generated.
0
1
PIO base address + #50
PIO base address + #60
input
output
Read/Write
Read/Write
Read/Write
ST20-GP6
95/123

Related parts for st20-gp6