EasyManua.ls Logo

Atmel AVR ATtiny15L User Manual

Atmel AVR ATtiny15L
85 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #52 background imageLoading...
Page #52 background image
52
ATtiny15L
1187H–AVR–09/07
The Port B Input Pins Address
– PINB
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.
PORT B as General Digital I/O The lower five pins 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 is 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. Pull-
ups for all ports can be disabled also by setting PUD-bit in the MCUCR Register.
Note: 1. n: 4, 3…0, pin number.
On ATtiny15L, PB5 is input or open-drain output. Because this pin is used for 12V pro-
gramming, there is no ESD protection diode limiting the voltage on the pin to
V
CC
+ 0.5V. Thus, special care should be taken to ensure that the voltage on this pin
does not rise above V
CC
+ 1V during normal operation. This may cause the MCU to
reset or enter Programming mode unintentionally.
All Port B pins are connected to a pin change detector that can trigger the pin change
interrupt. See “Pin Change Interrupt” on page 22 for details.
Alternate Functions of Port B The alternate pin functions of Port B are:
RESET
– PORT B, Bit 5
When the RSTDISBL Fuse is unprogrammed, this pin serves as External Reset. When
the RSTDISBL Fuse is programmed, this pin is a general input pin or a open-drain out-
put pin. If DDB5 is cleared (zero), PB5 is configured as an input pin. If DDB5 is set
(one), the pin is a open-drain output.
SCK/INT0/T0 – PORT B, Bit 2
In Serial Programming mode, this pin serves as the serial clock input, SCK.
In Normal mode, this pin can serve as the external interrupt0 input. See the interrupt
description for details on how to enable this interrupt. Note that activity on this pin will
trigger the interrupt even if the pin is configured as an output.
Bit 76543210
$16 PINB5 PINB4 PINB3 PINB2 PINB1 PINB0 PINB
Read/WriteRRRRRRRR
Initial Value 0 0 N/A N/A N/A N/A N/A N/A
Table 22. DDBn Effects on Port B Pins
(1)
DDBn PORTBn I/O Pull-up Comment
0 0 Input No Tri-state (High-Z)
0 1 Input No PUD bit in the MCUCR Register is set.
0 1 Input Yes
PBn will source current if ext. pulled low.
PUD bit in the MCUCR Register is cleared.
1 0 Output No Push-pull Zero Output
1 1 Output No Push-pull One Output

Table of Contents

Other manuals for Atmel AVR ATtiny15L

Question and Answer IconNeed help?

Do you have a question about the Atmel AVR ATtiny15L and is the answer not in the manual?

Atmel AVR ATtiny15L Specifications

General IconGeneral
Architecture8-bit AVR
Flash Memory1 KB
SRAM64 Bytes
I/O Pins6
ADC Channels4
Temperature Range-40°C to +85°C
Operating Voltage2.7V - 6.0V
Timers1 x 8-bit
Package8-pin PDIP, SOIC

Summary

Features

Non-volatile Program and Data Memories

1K Byte Flash Program Memory and 64 Bytes EEPROM.

Description

Block Diagram

Pin Descriptions

ATtiny15L Architectural Overview

The General Purpose Register File

Details the 32 general purpose working registers and their access.

The ALU - Arithmetic Logic Unit

Explains the Arithmetic Logic Unit's operation and integration.

The Flash Program Memory

Describes the 1K byte Flash memory, its organization and endurance.

Reset and Interrupt Handling

Interrupt Handling

External Interrupt

Pin Change Interrupt

The MCU Control Register – MCUCR

Sleep Modes

Defines Idle, ADC Noise Reduction, and Power-down modes.

Tuneable Internal RC Oscillator

Timer/Counters

The Timer/Counter0 Prescaler

Details prescaler options for Timer/Counter0.

The Timer/Counter1 Prescaler

Details prescaler options for Timer/Counter1.

The 8-bit Timer/Counter0

Explains Timer/Counter0 operation, clock sources, and control.

The 8-bit Timer/Counter1

Describes Timer/Counter1, including PWM capabilities.

The Watchdog Timer

EEPROM Read/Write Access

Preventing EEPROM Corruption

Techniques to avoid data corruption during low voltage or reset.

The Analog Comparator

The Analog-to-Digital Converter, Analog Multiplexer, and Gain Stages

I/O Port B

Memory Programming

Electrical Characteristics

Absolute Maximum Ratings

Specifies limits beyond which damage may occur.

Typical Characteristics

ATtiny15L Register Summary

ATtiny15L Instruction Set Summary

Ordering Information

Packaging Information

Related product manuals