st20-gp6 STMicroelectronics, st20-gp6 Datasheet - Page 94

no-image

st20-gp6

Manufacturer Part Number
st20-gp6
Description
Gps Processor
Manufacturer
STMicroelectronics
Datasheet
ST20-GP6
16 Parallel input/output
The ST20-GP6 device has 16 bits of Parallel Input/Output (PIO), configured in groups (ports) of
eight bits. Each bit is programmable as an output, an input, or a bidirectional pin.
Each group of eight input bits can also be compared against a register and an interrupt generated
when the value is not equal.
Each of the groups of eight bits operates as described in the following section.
16.1 PIO Ports0-1
Each of the eight bits of a PIO port has a corresponding bit in the PIO registers associated with
each port. These registers hold: output data for the port (POut); the input data read from the pin
(PIn); PIO bit configuration register (PC1); and the two input compare function registers (PComp
and PMask).
All of the registers, except the PIn registers, are each mapped onto two additional addresses so
that bits can be set or cleared individually.
The Set_ register allows bits to be set individually. Writing a ‘1’ in this register sets the correspond-
ing bit in the associated register, a ‘0’ leaves the bit unchanged.
The Clear_ register allows bits to be cleared individually. Writing a ‘1’ in this register resets the cor-
responding bit in the associated register, a ‘0’ leaves the bit unchanged.
16.1.1 PIO Data registers
The base addresses for the PIO registers are given in the memory map.
Note that during reset all the registers are reset to '00000000'.
POut register
This register holds output data for the port.
PIn register
The data read from this register will give the logic level present on an input pin of the port at the
start of the read cycle to this register. The read data will be the last value written to the register
regardless of the pin configuration selected.
94/123
POut
Bit
PIn
Bit
7:0
7:0
Bit field
POut7:0
Bit field
PIn7:0
Table 16.1 POut register format - 1 register per port
Table 16.2 PIn register format - 1 register per port
Function
Bits 0 to 7 of output data for the port.
Function
Bits 0 to 7 of input data for the port.
PIO base address + #00
PIO base address + #10
Read/Write
Read only

Related parts for st20-gp6