Peripheral Simulation
For Atmel AT91SAM9263 — PIOA-E (32 I/O Lines each)
Simulation support for this peripheral or feature is comprised of:
- Dialog boxes which display and allow you to change peripheral configuration.
- VTREGs (Virtual Target Registers) which support I/O with the peripheral.
These simulation capabilities are described below.
Parallel I/O A Dialog
The PIO Dialog box allows you to configure the parallel I/O port
using checkboxes. Controls in this dialog are presented in groups
which are described below.
PIO/Output/Input Filter/Output Data/Multi Driver/Pull-up/AB
Select/Output Write
-
The PIOA_PSR (PIO Status Register) check boxes indicate
which pins are controlled by the associated peripheral
(0-unchecked) and which pins are controlled by the PIO (1-checked).
Changing the values of these check boxes changed the values of the
PIOA_PER and PIOA_PDR peripheral registers.
-
The PIOA_OSR (Output Status Register) check boxes
indicate the output status (0-unchecked for input, 1-checked for
output) of the corresponding pin. Changing these check boxes writes
to the PIOA_OER or PIOA_ODR peripheral
registers.
-
The PIOA_IFSR (Input Filter Status Register) check boxes
indicate that glitch filtering is enabled (1-checked) for the
corresponding pin. Changing these check boxes writes to the
PIOA_IFER or PIOA_IFDR peripheral registers.
-
The PIOA_ODSR (Output Data Status Register) check boxes
indicate the output value for each port pin. Changing these check
boxes writes to the PIOA_SODR or PIOA_CODR peripheral
registers.
-
The PIOA_MDSR (Multidriver Status Register) check boxes
indicate whether each port pin is open drain (1-checked) or not
(0-unchecked). Changing these check boxes writes to the
PIOA_MDER or PIOA_MDDR peripheral registers.
-
The PIOA_PUSR (Pull-up Status Register) enables or
disables an embedded 100k ohm pull-up resistor for each bit.
-
The PIOA_ABSR (AB Select Status Register) determines
whether the I/O pins are controlled by the PIO controller or the
the corresponding on-chip peripheral.
-
The PIOA_OWSR (Output Write Status Register) displays
the output data mask bits set by writing to PIOA_OWER, or
reset by writing to PIOA_OWDR.
Pin Data Status
-
The PIOA_PDSR (Pin Data Status Register) check boxes
indicate the pin data status of the pins on the simulated MCU.
I/O Pins
-
The Pins check boxes indicate the states of the pins on
the simulated MCU. When used as outputs, these have the same value
as the PIOA_ODSR check boxes. When used as inputs you may
set the level of the input pin to high (1) or low (0).
Interrupt Mask & Status
-
The PIOA_IMR (Interrupt Mask Register) check boxes
indicate the interrupts enabled for each corresponding pin.
Changing these check boxes writes to the PIOA_IER or
PIOA_IDR peripheral registers.
-
The PIOA_ISR (Interrupt Status Register) check boxes
allow you to view the interrupt status registers for the PIOA
pins.
Parallel I/O B Dialog
The PIO B Dialog box allows you to configure the parallel I/O port
using checkboxes. Controls in this dialog are presented in groups
which are described below.
PIO/Output/Input Filter/Output Data/Multi Driver/Pull-up/AB
Select/Output Write
-
The PIOB_PSR (PIO Status Register) check boxes indicate
which pins are controlled by the associated peripheral
(0-unchecked) and which pins are controlled by the PIO (1-checked).
Changing the values of these check boxes changed the values of the
PIOB_PER and PIOB_PDR peripheral registers.
-
The PIOB_OSR (Output Status Register) check boxes
indicate the output status (0-unchecked for input, 1-checked for
output) of the corresponding pin. Changing these check boxes writes
to the PIOB_OER or PIOB_ODR peripheral
registers.
-
The PIOB_IFSR (Input Filter Status Register) check boxes
indicate that glitch filtering is enabled (1-checked) for the
corresponding pin. Changing these check boxes writes to the
PIOB_IFER or PIOB_IFDR peripheral registers.
-
The PIOB_ODSR (Output Data Status Register) check boxes
indicate the output value for each port pin. Changing these check
boxes writes to the PIOB_SODR or PIOB_CODR peripheral
registers.
-
The PIOB_MDSR (Multidriver Status Register) check boxes
indicate whether each port pin is open drain (1-checked) or not
(0-unchecked). Changing these check boxes writes to the
PIOB_MDER or PIOB_MDDR peripheral registers.
-
The PIOB_PUSR (Pull-up Status Register) enables or
disables an embedded 100k ohm pull-up resistor for each bit.
-
The PIOB_ABSR (AB Select Status Register) determines
whether the I/O pins are controlled by the PIO controller or the
the corresponding on-chip peripheral.
-
The PIOB_OWSR (Output Write Status Register) displays
the output data mask bits set by writing to PIOB_OWER, or
reset by writing to PIOB_OWDR.
Pin Data Status
-
The PIOB_PDSR (Pin Data Status Register) check boxes
indicate the pin data status of the pins on the simulated MCU.
I/O Pins
-
The Pins check boxes indicate the states of the pins on
the simulated MCU. When used as outputs, these have the same value
as the PIOB_ODSR check boxes. When used as inputs you may
set the level of the input pin to high (1) or low (0).
Interrupt Mask & Status
-
The PIOB_IMR (Interrupt Mask Register) check boxes
indicate the interrupts enabled for each corresponding pin.
Changing these check boxes writes to the PIOB_IER or
PIOB_IDR peripheral registers.
-
The PIOB_ISR (Interrupt Status Register) check boxes
allow you to view the interrupt status registers for the PIOB
pins.
Parallel I/O C Dialog
The PIO C Dialog box allows you to configure the parallel I/O port
using checkboxes. Controls in this dialog are presented in groups
which are described below.
PIO/Output/Input Filter/Output Data/Multi Driver/Pull-up/AB
Select/Output Write
-
The PIOC_PSR (PIO Status Register) check boxes indicate
which pins are controlled by the associated peripheral
(0-unchecked) and which pins are controlled by the PIO (1-checked).
Changing the values of these check boxes changed the values of the
PIOC_PER and PIOC_PDR peripheral registers.
-
The PIOC_OSR (Output Status Register) check boxes
indicate the output status (0-unchecked for input, 1-checked for
output) of the corresponding pin. Changing these check boxes writes
to the PIOC_OER or PIOC_ODR peripheral
registers.
-
The PIOC_IFSR (Input Filter Status Register) check boxes
indicate that glitch filtering is enabled (1-checked) for the
corresponding pin. Changing these check boxes writes to the
PIOC_IFER or PIOC_IFDR peripheral registers.
-
The PIOC_ODSR (Output Data Status Register) check boxes
indicate the output value for each port pin. Changing these check
boxes writes to the PIOC_SODR or PIOC_CODR peripheral
registers.
-
The PIOC_MDSR (Multidriver Status Register) check boxes
indicate whether each port pin is open drain (1-checked) or not
(0-unchecked). Changing these check boxes writes to the
PIOC_MDER or PIOC_MDDR peripheral registers.
-
The PIOC_PUSR (Pull-up Status Register) enables or
disables an embedded 100k ohm pull-up resistor for each bit.
-
The PIOC_ABSR (AB Select Status Register) determines
whether the I/O pins are controlled by the PIO controller or the
the corresponding on-chip peripheral.
-
The PIOC_OWSR (Output Write Status Register) displays
the output data mask bits set by writing to PIOC_OWER, or
reset by writing to PIOC_OWDR.
Pin Data Status
-
The PIOC_PDSR (Pin Data Status Register) check boxes
indicate the pin data status of the pins on the simulated MCU.
I/O Pins
-
The Pins check boxes indicate the states of the pins on
the simulated MCU. When used as outputs, these have the same value
as the PIOC_ODSR check boxes. When used as inputs you may
set the level of the input pin to high (1) or low (0).
Interrupt Mask & Status
-
The PIOC_IMR (Interrupt Mask Register) check boxes
indicate the interrupts enabled for each corresponding pin.
Changing these check boxes writes to the PIOC_IER or
PIOC_IDR peripheral registers.
-
The PIOC_ISR (Interrupt Status Register) check boxes
allow you to view the interrupt status registers for the PIOC
pins.
Parallel I/O Controller D Dialog
The PIO D Dialog box allows you to configure the parallel I/O port
using checkboxes. Controls in this dialog are presented in groups
which are described below.
PIO/Output/Input Filter/Output Data/Multi Driver/Pull-up/AB
Select/Output Write
-
The PIOD_PSR (PIO Status Register) check boxes indicate
which pins are controlled by the associated peripheral
(0-unchecked) and which pins are controlled by the PIO (1-checked).
Changing the values of these check boxes changed the values of the
PIOD_PER and PIOD_PDR peripheral registers.
-
The PIOD_OSR (Output Status Register) check boxes
indicate the output status (0-unchecked for input, 1-checked for
output) of the corresponding pin. Changing these check boxes writes
to the PIOD_OER or PIOD_ODR peripheral
registers.
-
The PIOD_IFSR (Input Filter Status Register) check boxes
indicate that glitch filtering is enabled (1-checked) for the
corresponding pin. Changing these check boxes writes to the
PIOD_IFER or PIOD_IFDR peripheral registers.
-
The PIOD_ODSR (Output Data Status Register) check boxes
indicate the output value for each port pin. Changing these check
boxes writes to the PIOD_SODR or PIOD_CODR peripheral
registers.
-
The PIOD_MDSR (Multidriver Status Register) check boxes
indicate whether each port pin is open drain (1-checked) or not
(0-unchecked). Changing these check boxes writes to the
PIOD_MDER or PIOD_MDDR peripheral registers.
-
The PIOD_PUSR (Pull-up Status Register) enables or
disables an embedded 100k ohm pull-up resistor for each bit.
-
The PIOD_ABSR (AB Select Status Register) determines
whether the I/O pins are controlled by the PIO controller or the
the corresponding on-chip peripheral.
-
The PIOD_OWSR (Output Write Status Register) displays
the output data mask bits set by writing to PIOD_OWER, or
reset by writing to PIOD_OWDR.
Pin Data Status
-
The PIOD_PDSR (Pin Data Status Register) check boxes
indicate the pin data status of the pins on the simulated MCU.
I/O Pins
-
The Pins check boxes indicate the states of the pins on
the simulated MCU. When used as outputs, these have the same value
as the PIOD_ODSR check boxes. When used as inputs you may
set the level of the input pin to high (1) or low (0).
Interrupt Mask & Status
-
The PIOD_IMR (Interrupt Mask Register) check boxes
indicate the interrupts enabled for each corresponding pin.
Changing these check boxes writes to the PIOD_IER or
PIOD_IDR peripheral registers.
-
The PIOD_ISR (Interrupt Status Register) check boxes
allow you to view the interrupt status registers for the PIOD
pins.
Parallel I/O E Dialog
The PIO E Dialog box allows you to configure the parallel I/O port
using checkboxes. Controls in this dialog are presented in groups
which are described below.
PIO/Output/Input Filter/Output Data/Multi Driver/Pull-up/AB
Select/Output Write
-
The PIOE_PSR (PIO Status Register) check boxes indicate
which pins are controlled by the associated peripheral
(0-unchecked) and which pins are controlled by the PIO (1-checked).
Changing the values of these check boxes changed the values of the
PIOE_PER and PIOE_PDR peripheral registers.
-
The PIOE_OSR (Output Status Register) check boxes
indicate the output status (0-unchecked for input, 1-checked for
output) of the corresponding pin. Changing these check boxes writes
to the PIOE_OER or PIOE_ODR peripheral
registers.
-
The PIOE_IFSR (Input Filter Status Register) check boxes
indicate that glitch filtering is enabled (1-checked) for the
corresponding pin. Changing these check boxes writes to the
PIOE_IFER or PIOE_IFDR peripheral registers.
-
The PIOE_ODSR (Output Data Status Register) check boxes
indicate the output value for each port pin. Changing these check
boxes writes to the PIOE_SODR or PIOE_CODR peripheral
registers.
-
The PIOE_MDSR (Multidriver Status Register) check boxes
indicate whether each port pin is open drain (1-checked) or not
(0-unchecked). Changing these check boxes writes to the
PIOE_MDER or PIOE_MDDR peripheral registers.
-
The PIOE_PUSR (Pull-up Status Register) enables or
disables an embedded 100k ohm pull-up resistor for each bit.
-
The PIOE_ABSR (AB Select Status Register) determines
whether the I/O pins are controlled by the PIO controller or the
the corresponding on-chip peripheral.
-
The PIOE_OWSR (Output Write Status Register) displays
the output data mask bits set by writing to PIOE_OWER, or
reset by writing to PIOE_OWDR.
Pin Data Status
-
The PIOE_PDSR (Pin Data Status Register) check boxes
indicate the pin data status of the pins on the simulated MCU.
I/O Pins
-
The Pins check boxes indicate the states of the pins on
the simulated MCU. When used as outputs, these have the same value
as the PIOE_ODSR check boxes. When used as inputs you may
set the level of the input pin to high (1) or low (0).
Interrupt Mask & Status
-
The PIOE_IMR (Interrupt Mask Register) check boxes
indicate the interrupts enabled for each corresponding pin.
Changing these check boxes writes to the PIOE_IER or
PIOE_IDR peripheral registers.
-
The PIOE_ISR (Interrupt Status Register) check boxes
allow you to view the interrupt status registers for the PIOE
pins.
PORTx VTREG
Data Type: unsigned long
The PORTx VTREGs represent the I/O pins of the
simulated MCU for Port A, Port B, and so on. PORTA represents Port A,
PORTB represents Port B, etc. You may read PORTx to
determine the state of the output pins of that port. For example, in
the command window you may type,
PORTA
to obtain value corresponding to the set pins of Port A. You may
also change the input values of port pins by changing the value of
the VTREG. For example,
PORTA=0x000000F0
sets the upper four port pins of Port A to a value of 1 and all
other port pins to a value of 0. You may use the bitwise operators
AND(&), OR(|) and XOR(^) to change individual bits of the
PORTx VTREGs. For example:
PORTA |= 0x00000001; /* Set PA0 Pin */
PORTB &= ~0x00000200; /* Clr PB9 Pin */
PORTA ^= 0x00800000; /* Toggle PA23 Pin */