ATtiny2313 Internal Peripherals

Created on: 27 February 2013

Part 6 of the ATtiny2313 Tutorial

The ATtiny2313 microcontroller has some internal peripherals that don't connect to external pins. In this part of the course, we look at what these internal peripherals are. Each peripheral will be described in more detail and programmed later in the course.

The previous tutorial in this series showed an overview of the internal peripherals of the ATtiny2313 that do connect to external pins.

EEPROM

The ATtiny2313 has a 128 byte internal EEPROM. The EEPROM can be read and written by a program running on the microcontroller.

Watchdog Timer (WDT)

The ATtiny2313 has a WDT that can be programmed to time out over a 16ms to 8s range. The WDT can also be set on permanently by programming the WDTON fuse.

The watchdog timer operates from a separate internal 128kHz oscillator.

Timers

The timer/counters mentioned in the previous tutorial can be used as internal timers without connecting them to external pins.

Other Internal Peripherals and Functions

The ATtiny2313 also has these features and functions:

  • 2k bytes of on-chip Flash memory – for program storage
  • 128 bytes of SRAM
  • Calibrated internal RC Oscillator – selectable as 8MHz (default) or 4MHz
  • 128kHz internal oscillator for the watchdog timer
  • A clock multiplexer for selecting the system clock from one of several sources: external clock, crystal oscillator, internal RC oscillator or watchdog oscillator
  • System clock prescalar – for dividing the system clock (decreasing the system clock frequency)
  • Circuitry for power management and sleep mode – for power reduction
  • Reset circuitry that includes power-on reset and brown-out detection
  • Internal voltage reference – used for the brown-out detector and can be used by the analog comparator
  • Interrupt Unit – for handling interrupts
  • Interrupts can be generated by most on-chip peripherals
  • Prescalar module for timer/counter 0 and timer/counter 1