Техническая Спецификация для Atmel Xplained Pro Evaluation Kit ATSAMD20-XPRO ATSAMD20-XPRO
Модели
ATSAMD20-XPRO
285
Atmel | SMART SAM D20 [DATASHEET]
Atmel-42129K–SAM-D20_datasheet–06/2014
desired input value can be read from the (y / 32) bit in register IN as soon as the INEN bit in the Pin Configuration register
(PINCFGy) is written to one. Refer to
(PINCFGy) is written to one. Refer to
By default, the input synchronizer is clocked only when an input read is requested, which will delay the read operation by
two CLK_PORT cycles. To remove that delay, the input synchronizers for each group of eight pins can be configured to
be always active, but this comes at the expense of higher power consumption. This is controlled by writing a one to the
corresponding SAMPLINGn bit group of the CTRL register, where n = (y / 32) / 8.
two CLK_PORT cycles. To remove that delay, the input synchronizers for each group of eight pins can be configured to
be always active, but this comes at the expense of higher power consumption. This is controlled by writing a one to the
corresponding SAMPLINGn bit group of the CTRL register, where n = (y / 32) / 8.
To use pin y as one of the available peripheral functions for that pin, configure it by writing a one to the corresponding
PMUXEN bit of the PINCFGy register. The PINCFGy register for pin y is at byte offset (PINCFG0 + (y / 32)).
PMUXEN bit of the PINCFGy register. The PINCFGy register for pin y is at byte offset (PINCFG0 + (y / 32)).
The peripheral function can be selected by writing to the PMUXO or PMUXE bit group in the PMUXn register. The
PMUXO/PMUXE bit group is at byte offset (PMUX0 + (y / 32) / 2), in bits 3:0 if y is even and in bits 7:4 if y is odd.
PMUXO/PMUXE bit group is at byte offset (PMUX0 + (y / 32) / 2), in bits 3:0 if y is even and in bits 7:4 if y is odd.
The chosen peripheral must also be configured and enabled.
21.6.4 I/O Pin Configuration
The Pin Configuration register (PINCFGy) is used for additional I/O pin configuration. A pin can be set in a totem-pole,
open-drain or pull configuration.
open-drain or pull configuration.
Because pull configuration is done through the Pin Configuration register, all intermediate PORT states during switching
of pin direction and pin values are avoided.
of pin direction and pin values are avoided.
The I/O pin configurations are described further in this chapter, and summarized in
.
21.6.4.1 Pin Configurations Summary
Table 21-1. Pin Configurations Summary
DIR
INEN
PULLEN
OUT
Configuration
0
0
0
X
Reset or analog I/O; all digital disabled
0
0
1
0
Pull-down; input disabled
0
0
1
1
Pull-up; input disabled
0
1
0
X
Input
0
1
1
0
Input with pull-down
0
1
1
1
Input with pull-up
1
0
X
X
Output; input disabled
1
1
X
X
Output; input enabled