![Atmel AT90S8414 Скачать руководство пользователя страница 61](http://html1.mh-extra.com/html/atmel/at90s8414/at90s8414_manual_3003427061.webp)
AT90S8414
Preliminary
4-61
Table 17: Port B Pins Alternate Functions
Port Pin
Alternate Functions
PB0
T0 (Timer/Counter 0 external counter input)
PB1
T1 (Timer/Counter 1 external counter input)
PB2
AIN0 (Analog comparator positive input)
PB3
AIN1 (Analog comparator negative input)
PB4
(SPI Slave Select input)
PB5
MOSI (SPI Bus Master Output/Slave Input)
PB6
MISO (SPI Bus Master Input/Slave Output)
PB7
SCK (SPI Bus Serial Clock)
When the pins are used for the alternate function the DDRB and PORTB register has to be set according to the alternate
function description.
THE PORT B DATA REGISTER - PORTB
Bit
7
6
5
4
3
2
1
0
$18
PORTB7
PORTB6
PORTB5
PORTB4
PORTB3
PORTB2
PORTB1
PORTB0
PORTB
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Initial value
0
0
0
0
0
0
0
0
THE PORT B DATA DIRECTION REGISTER - DDRB
Bit
7
6
5
4
3
2
1
0
$17
DDB7
DDB6
DDB5
DDB4
DDB3
DDB2
DDB1
DDB0
DDRB
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Initial value
0
0
0
0
0
0
0
0
THE PORT B INPUT PINS ADDRESS - PINB
Bit
7
6
5
4
3
2
1
0
$16
PINB7
PINB6
PINB5
PINB4
PINB3
PINB2
PINB1
PINB0
PINB
Read/Write
R
R
R
R
R
R
R
R
Initial value
Hi-Z
Hi-Z
Hi-Z
Hi-Z
Hi-Z
Hi-Z
Hi-Z
Hi-Z
The Port B Input Pins address - PINB - is not a register, and this address enables access to the physical value on each Port
B pin. When reading PORTB, the PORTB Data Latch is read, and when reading PINB, the logical values present on the
pins are read.
PORTB AS GENERAL DIGITAL I/O
All 8 bits in port B are equal when used as digital I/O pins.
PBn, General I/O pin: The DDBn bit in the DDRB register selects the direction of this pin, if DDBn is set (one), PBn is
configured as an output pin. If DDBn is cleared (zero), PBn is configured as an input pin. If PORTBn is set (one) when
the pin configured as an input pin, the MOS pull up resistor is activated. To switch the pull up resistor off, the PORTBn
has to be cleared (zero) or the pin has to be configured as an output pin.
Содержание AT90S8414
Страница 4: ...4 4 AT90S8414 Preliminary...
Страница 6: ...4 6 AT90S8414 Preliminary Block Diagram Figure 1 The AT90S8414 Block Diagram...
Страница 65: ...AT90S8414 Preliminary 4 65 Figure 50 PORTB Schematic Diagram Pin PB5 Figure 51 PORTB Schematic Diagram Pin PB6...
Страница 68: ...4 68 AT90S8414 Preliminary Figure 53 PORTC Schematic Diagram Pins PC0 PC7...
Страница 87: ...AT90S8414 Preliminary 4 87...