AT90S8515

Manufacturer Part NumberAT90S8515
Description8-bit microcontroller with 8K bytes in-system programmable flash, 2.7-6.0V
ManufacturerATMEL Corporation
AT90S8515 datasheet
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Page 61
62
Page 62
63
Page 63
64
Page 64
65
Page 65
66
Page 66
67
Page 67
68
Page 68
69
Page 69
70
Page 70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Page 63/112:

I/O Ports

Download datasheet (3Mb)Embed
PrevNext

I/O Ports

Port A
Port A Data Register – PORTA
Port A Data Direction Register
– DDRA
Port A Input Pins Address –
PINA
Port A as General Digital I/O
0841G–09/01
All AVR ports have true read-modify-write functionality when used as general digital I/O
ports. This means that the direction of one port pin can be changed without unintention-
ally changing the direction of any other pin with the SBI and CBI instructions. The same
applies for changing drive value (if configured as output) or the enabling/disabling of
pull-up resistors (if configured as input).
Port A is an 8-bit bi-directional I/O port.
Three I/O memory address locations are allocated for the Port A, one each for the Data
Register – PORTA, $1B($3B), Data Direction Register – DDRA, $1A($3A) and the Port
A Input Pins – PINA, $19($39). The Port A Input Pins address is read-only, while the
Data Register and the Data Direction Register are read/write.
All port pins have individually selectable pull-up resistors. The Port A output buffers can
sink 20 mA and thus drive LED displays directly. When pins PA0 to PA7 are used as
inputs and are externally pulled low, they will source current if the internal pull-up resis-
tors are activated.
The Port A pins have alternate functions related to the optional external data SRAM.
Port A can be configured to be the multiplexed low-order address/data bus during
accesses to the external data memory. In this mode, Port A has internal pull-up
resistors.
When Port A is set to the alternate function by the SRE (external SRAM enable) bit in
the MCUCR (MCU Control Register), the alternate settings override the Data Direction
Register.
Bit
7
6
5
$1B ($3B)
PORTA7
PORTA6
PORTA5
Read/Write
R/W
R/W
R/W
Initial Value
0
0
0
Bit
7
6
5
$1A ($3A)
DDA7
DDA6
DDA5
Read/Write
R/W
R/W
R/W
Initial Value
0
0
0
Bit
7
6
5
$19 ($39)
PINA7
PINA6
PINA5
Read/Write
R
R
R
Initial Value
N/A
N/A
N/A
The Port A Input Pins address (PINA) is not a register; this address enables access to
the physical value on each Port A pin. When reading PORTA, the Port A Data Latch is
read and when reading PINA, the logical values present on the pins are read.
All eight pins in Port A have equal functionality when used as digital I/O pins.
PAn, general I/O pin: The DDAn bit in the DDRA register selects the direction of this pin.
If DDAn is set (one), PAn is configured as an output pin. If DDAn is cleared (zero), PAn
is configured as an input pin. If PORTAn is set (one) when the pin is configured as an
input pin, the MOS pull-up resistor is activated. To switch the pull-up resistor off, the
AT90S8515
4
3
2
1
PORTA4
PORTA3
PORTA2
PORTA1
R/W
R/W
R/W
R/W
0
0
0
0
4
3
2
1
DDA4
DDA3
DDA2
DDA1
R/W
R/W
R/W
R/W
0
0
0
0
4
3
2
1
PINA4
PINA3
PINA2
PINA1
R
R
R
R
N/A
N/A
N/A
N/A
0
PORTA0
PORTA
R/W
0
0
DDA0
DDRA
R/W
0
0
PINA0
PINA
R
N/A
63