EasyManua.ls Logo

Atmel ATtiny85 User Manual

Atmel ATtiny85
196 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 #124 background imageLoading...
Page #124 background image
124
7598H–AVR–07/09
ATtiny25/45/85
Bits 3:0 – MUX3:0: Analog Channel and Gain Selection Bits
The value of these bits selects which combination of analog inputs are connected to the ADC. In
case of differential input (ADC0 - ADC1 or ADC2 - ADC3), gain selection is also made with these
bits. Selecting ADC2 or ADC0 as both inputs to the differential gain stage enables offset mea-
surements. Selecting the single-ended channel ADC4 enables the temperature sensor. Refer to
Table 18-4 for details. If these bits are changed during a conversion, the change will not go into
effect until this conversion is complete (ADIF in ADCSRA is set).
18.7.6 ADC Control and Status Register A – ADCSRA
Bit 7 – ADEN: ADC Enable
Writing this bit to one enables the ADC. By writing it to zero, the ADC is turned off. Turning the
ADC off while a conversion is in progress, will terminate this conversion.
Bit 6 – ADSC: ADC Start Conversion
In Single Conversion mode, write this bit to one to start each conversion. In Free Running mode,
write this bit to one to start the first conversion.
Table 18-4. Input Channel Selections
MUX3..0
Single Ended
Input
Positive
Differential Input
Negative
Differential Input Gain
0000 ADC0 (PB5)
N/A
0001 ADC1 (PB2)
0010 ADC2 (PB4)
0011 ADC3 (PB3)
0100
N/A
ADC2 (PB3) ADC2 (PB3) 1x
0101
(1)
1. For offset calibration only . See “Operation” on page 112.
ADC2 (PB3) ADC2 (PB3) 20x
0110 ADC2 (PB3) ADC3 (PB4) 1x
0111 ADC2 (PB3) ADC3 (PB4) 20x
1000 ADC0 (PB5) ADC0 (PB5) 1x
1001 ADC0 (PB5) ADC0 (PB5) 20x
1010 ADC0 (PB5) ADC1 (PB2) 1x
1011 ADC0 (PB5) ADC1 (PB2) 20x
1100 1.1V/2.56V
N/A
1101 0V
1110 N/A
1111 ADC4
(2)
2. For Temperature Sensor
Bit 76543210
ADEN ADSC ADATE ADIF ADIE ADPS2 ADPS1 ADPS0 ADCSRA
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

Table of Contents

Question and Answer IconNeed help?

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

Atmel ATtiny85 Specifications

General IconGeneral
Architecture8-bit AVR
Flash Memory8 KB
SRAM512 B
EEPROM512 B
Clock Speed20 MHz
GPIO Pins6
ADC Channels4
ADC Resolution10-bit
Timers2 (8-bit)
PWM Channels2
Operating Voltage2.7V - 5.5V
Communication InterfacesSPI, I2C
PackageDIP-8, SOIC-8
Operating Temperature-40°C to 85°C

Summary

ATtiny25/45/85 Features Overview

High-Performance AVR Microcontroller

Details on the advanced RISC architecture and its benefits for performance.

Non-volatile Program and Data Memories

Information on Flash, EEPROM, and SRAM capacities and endurance.

Peripheral Features

Overview of integrated peripherals like Timers, ADC, and USI.

ATtiny25/45/85 Pin Configuration

ATtiny25/45/85 Block Diagram

ATtiny25/45/85 Pin Descriptions

AVR CPU Core

Architectural Overview

Explanation of the Harvard architecture and pipelining.

Reset and Interrupt Handling

Explanation of reset sources and interrupt vector handling.

AVR ATtiny25/45/85 Memories

In-System Re-programmable Flash Program Memory

Details on Flash memory size, endurance, and programming.

SRAM Data Memory Organization

Description of SRAM organization and addressing modes.

EEPROM Data Memory

Information on EEPROM capacity, endurance, and access.

System Clock and Clock Options

System Clock Prescaler

Explanation of the Clock Prescale Register (CLKPR) for clock frequency control.

Power Management and Sleep Modes

Minimizing Power Consumption

Strategies for reducing power consumption in the device.

System Control and Reset

Reset Sources

Overview of the four reset sources: Power-on, External, Watchdog, Brown-out.

Power-on Reset (POR)

Details on the POR circuit, detection level, and start-up timing.

Brown-out Detection (BOD)

Information on the on-chip BOD circuit and selectable trigger levels.

Watchdog Timer

Details on the Watchdog Timer operation, configuration, and reset.

Interrupts

I/O Ports

External Interrupts

8-bit Timer/Counter0 with PWM

Modes of Operation

Explanation of Normal, CTC, Fast PWM, and Phase Correct PWM modes.

Counter and Compare Units

Timer/Counter1 in PWM Mode

Details on generating PWM waveforms with Timer/Counter1.

Universal Serial Interface (USI)

Analog Comparator

Analog to Digital Converter (ADC)

ADC Features

Overview of ADC resolution, conversion time, and input channels.

ADC Operation

Explanation of the ADC conversion process and voltage references.

Starting a Conversion

Methods for initiating ADC conversions, including auto-triggering.

ADC Conversion Result

Details on how the conversion result is presented and interpreted.

debugWIRE On-chip Debug System

Self-Programming the Flash

Memory Programming

High-voltage Serial Programming

Procedures for programming Flash, EEPROM, Lock bits, and Fuses.

Electrical Characteristics

Related product manuals