ATTINY5-MAH Atmel, ATTINY5-MAH Datasheet - Page 43

IC MCU AVR 512B FLASH 8UDFN

ATTINY5-MAH

Manufacturer Part Number
ATTINY5-MAH
Description
IC MCU AVR 512B FLASH 8UDFN
Manufacturer
Atmel
Series
AVR® ATtinyr
Datasheets

Specifications of ATTINY5-MAH

Core Processor
AVR
Core Size
8-Bit
Speed
12MHz
Peripherals
POR, PWM, WDT
Number Of I /o
4
Program Memory Size
512B (256 x 16)
Program Memory Type
FLASH
Ram Size
32 x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 5.5 V
Data Converters
A/D 4x8b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
8-UFDFN Exposed Pad
Core
AVR8
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Connectivity
-
Lead Free Status / Rohs Status
 Details
10.2.2
10.2.3
8127D–AVR–02/10
Toggling the Pin
Break-Before-Make Switching
The DDxn bit in the DDRx Register selects the direction of this pin. If DDxn is written logic one,
Pxn is configured as an output pin. If DDxn is written logic zero, Pxn is configured as an input
pin.
If PORTxn is written logic one when the pin is configured as an output pin, the port pin is driven
high (one). If PORTxn is written logic zero when the pin is configured as an output pin, the port
pin is driven low (zero).
The pull-up resistor is activated, if the PUExn is written logic one. To switch the pull-up resistor
off, PUExn has to be written logic zero.
Table 10-1
Table 10-1.
Port pins are tri-stated when a reset condition becomes active, even when no clocks are
running.
Writing a logic one to PINxn toggles the value of PORTxn, independent on the value of DDRxn.
Note that the SBI instruction can be used to toggle one single bit in a port.
In Break-Before-Make mode, switching the DDRxn bit from input to output introduces an imme-
diate tri-state period lasting one system clock cycle, as indicated in
the system clock is 4 MHz and the DDRxn is written to make an output, an immediate tri-state
period of 250 ns is introduced before the value of PORTxn is seen on the port pin.
To avoid glitches it is recommended that the maximum DDRxn toggle frequency is two system
clock cycles. The Break-Before-Make mode applies to the entire port and it is activated by the
BBMx bit. For more details, see
When switching the DDRxn bit from output to input no immediate tri-state period is introduced.
DDxn
0
0
1
1
1
1
PORTxn
summarizes the control signals for the pin value.
Port Pin Configurations
X
X
0
0
1
1
PUExn
0
1
0
1
0
1
I/O
Input
Input
Output
Output
Output
Output
“PORTCR – Port Control Register” on page
Pull-up
No
Yes
No
Yes
No
Yes
Sources current if pulled low externally
Output high (source)
Output high (source) and internal pull-up active
Comment
Tri-state (hi-Z)
Output low (sink)
NOT RECOMMENDED.
Output low (sink) and internal pull-up active.
Sources current through the internal pull-up
resistor and consumes power constantly
Figure
ATtiny4/5/9/10
10-3. For example, if
51.
43

Related parts for ATTINY5-MAH