EasyManua.ls Logo

Atmel ATtiny25 User Manual

Atmel ATtiny25
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 #85 background imageLoading...
Page #85 background image
85
7598H–AVR–07/09
ATtiny25/45/85
The Stop condition provides a Timer Enable/Disable function.
14.1.2 General Timer/Counter1 Control Register - GTCCR
Bit 6- PWM1B: Pulse Width Modulator B Enable
When set (one) this bit enables PWM mode based on comparator OCR1B in Timer/Counter1
and the counter value is reset to $00 in the CPU clock cycle after a compare match with OCR1C
register value.
Bits 5,4 - COM1B1, COM1B0: Comparator B Output Mode, Bits 1 and 0
The COM1B1 and COM1B0 control bits determine any output pin action following a compare
match with compare register B in Timer/Counter1. Output pin actions affect pin PB3 (OC1B).
Since this is an alternative function to an I/O port, the corresponding direction control bit must be
set (one) in order to control an output pin. Note that OC1B
is not connected in normal mode.
In PWM mode, these bits have different functions. Refer to Table 14-4 on page 90 for a detailed
description.
0 1 1 1 PCK/64 CK/64
1 0 0 0 PCK/128 CK/128
1 0 0 1 PCK/256 CK/256
1 0 1 0 PCK/512 CK/512
1 0 1 1 PCK/1024 CK/1024
1 1 0 0 PCK/2048 CK/2048
1 1 0 1 PCK/4096 CK/4096
1 1 1 0 PCK/8192 CK/8192
1 1 1 1 PCK/16384 CK/16384
Table 14-2. Timer/Counter1 Prescale Select (Continued)
CS13 CS12 CS11 CS10
Asynchronous
Clocking Mode
Synchronous
Clocking Mode
Bit 7 6 5 4 3 2 1 0
$2C ($4C)
TSM PWM1B COM1B1 COM1B0 FOC1B FOC1A PSR1 PSR0 GTCCR
Read/Write R/W R/W R/W R/W W W R/W R/W
Initial value 0 0 0 0 0 0 0 0
Table 14-3. Comparator B Mode Select
COM1B1 COM1B0 Description
0 0 Timer/Counter Comparator B disconnected from output pin OC1B.
0 1 Toggle the OC1B output line.
1 0 Clear the OC1B output line.
1 1 Set the OC1B output line

Table of Contents

Question and Answer IconNeed help?

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

Atmel ATtiny25 Specifications

General IconGeneral
ArchitectureAVR
Flash Memory2 KB
SRAM128 B
EEPROM128 B
Clock Speed20 MHz
I/O Pins6
PWM Channels2
Operating Voltage1.8V - 5.5V
ADC4 channels, 10-bit
Communication InterfacesSPI, I2C, USART
Operating Temperature Range-40°C to 85°C
Timers8-bit Timer/Counter with PWM, 16-bit Timer/Counter with PWM
Package8-pin PDIP, SOIC-8

Summary

Features

Overview and Pin Configurations

Pinout

Pin configuration details for ATtiny25/45/85, showing pin functions for SOIC and QFN packages.

Overview

Introduces the ATtiny25/45/85 as a low-power AVR microcontroller with RISC architecture.

AVR CPU Core

Architecture & Registers

Covers CPU core, architectural overview, ALU, status, and general purpose registers.

Instruction Execution & Reset/Interrupts

Details instruction timing, reset, and interrupt handling mechanisms.

ATtiny25/45/85 Memories

Flash, SRAM, EEPROM, and I/O Memory

Describes Flash, SRAM, EEPROM, and I/O memory spaces and their characteristics.

System Clock and Clock Options

Clock Sources and Prescalers

Details clock sources (RC, Crystal, PLL) and the system clock prescaler.

Power Management and Sleep Modes

MCU Control Register

Details the MCU Control Register for power management and sleep mode selection.

Sleep Modes (Idle, ADC Noise Reduction, Power-down)

Explains the different sleep modes and their features for power saving.

Power Reduction Register

Describes the PRR for stopping clocks to peripherals to reduce power consumption.

System Control and Reset

Reset Sources

Lists and describes the various reset sources like Power-on, External, Watchdog, and Brown-out.

Brown-out Detection

Details the On-chip Brown-out Detection (BOD) circuit and its configuration.

Interrupts

Interrupt Vectors in ATtiny25/45/85

Lists the interrupt vectors and their definitions for ATtiny25/45/85.

I/O Ports

Ports as General Digital I/O

Covers port configuration, general I/O, and switching between input/output.

Alternate Port Functions

Explains alternate functions of port pins and overriding signals.

Register Description for I/O-Ports

Details the PORTB, DDRB, and PINB registers for I/O port control.

External Interrupts

MCU Control Register – MCUCR

Details the External Interrupt Control Register for interrupt sense control.

General Interrupt Mask Register – GIMSK

Covers the GIMSK for enabling external and pin change interrupts.

8-bit Timer/Counter0 with PWM

Modes of Operation and Registers

Explains operational modes and register descriptions for Timer/Counter0.

Counter and Compare Units

Timer/Counter1 and Dead Time Generator

Details Timer/Counter1 operation and the Dead Time Generator for PWM.

Universal Serial Interface – USI

Functional Descriptions and Registers

Covers USI modes (3-wire, SPI, 2-wire) and register descriptions.

Analog Comparator

ACSR and ADCSRB Registers

Details Analog Comparator Control and Status Registers for configuration and interrupts.

Analog Comparator Multiplexed Input

Explains selecting ADC pins as the negative input to the Analog Comparator.

Analog to Digital Converter

ADC Features and Operation

Lists ADC features and describes its operation, including channel and reference selection.

Starting a Conversion

Explains manual and auto-triggered ADC conversion start methods.

ADC Conversion Result

Details how to read and interpret ADC conversion results in different modes.

debugWIRE On-chip Debug System

Features, Interface, and Registers

Covers debugwire features, physical interface, limitations, and registers.

Memory Programming

Lock Bits and Fuse Bytes

Explains memory lock bits and the functionality of fuse bytes.

Serial Downloading

Details serial programming methods including SPI and HVSP.

High-voltage Serial Programming

Covers programming Flash, EEPROM, Lock bits, and Fuse bits using HVSP.

Electrical Characteristics

Absolute Maximum Ratings*

Lists the stress ratings that may cause permanent damage to the device.

DC Characteristics

Provides DC characteristics across temperature and voltage ranges.

Typical Characteristics

Supply Current (Active, Idle, Power-down)

Shows supply current graphs for different modes versus frequency and VCC.

Pin Characteristics (Pull-up, Driver Strength, Thresholds)

Details pin pull-up, driver strength, and threshold characteristics.

Oscillator and BOD Characteristics

Covers BOD thresholds and internal oscillator frequency characteristics.

Register Summary

Instruction Set Summary

Ordering Information

Package Types

Lists available package types like T5 and PC with their specifications.

Document Revision History

Errata

Related product manuals