User manual

4.29. Parallel Input /Output Controller (PIO)
The Stamp9261 has a maximum of 39 freely programmable digital I/O ports on its connectors. They
can be configured independently of each other as input or output. These pins are also used by other
peripheral devices.
The SAM9261 Processor comes with 3 PIO controllers, each of them can manage up to 32
programmable I/O ports. Each I/O port is associated with a bit number in the 32 bit register of the user
interface. Each I/O port may be configured for general purpose I/O or assigned to a function of an
integrated peripheral device. In doing so multiplexing with 2 integrated devices is possible. That
means a pin may be used as GPIO,device A or device B.
The following characteristics are individually configurable for each PIO pin:
- PIO enable
- Peripheral A or B enable
- Output enable
- Output level
- Write Enable
- Level change interrupt
- Glitch filter: pulses that are lower than a half clock cycle are ignored
- Open-drain outputs
- Pull-up resistor
All configurations as well as the pin status can be read back by using the appropriate status register.
Multiple pins of each PIO can also be written simultaneously by using the synchronous output register.
A number of the PIO signals are used internally on the Stamp9261. Care has to be taken when
accessing the PIO registers in order not to change the settings of these internal signals otherwise a
system crash is likely to happen.
- 26 -