Developing in C for the ATtiny13A: Introduction
Where I describe the process of developing code for the Microchip ATtiny13A, starting at the chip level.
Introduction
This is the first in a series of posts describing how to begin developing at the chip level (as compared to board level). In this series, I’ll be using a Microchip ATtiny13A, which is a minimal version of an ATmega328P, the microcontroller used in the Arduino Uno R3.
The chip has the following:
- 8 pin plastic dual-in-line package (PDIP), which is easy to use in a breadboard
- low-power CMOS 8-bit microcontroller, great for battery-powered projects
- 1K Bytes of Flash program memory, eno
- 64 Bytes EEPROM
- 64 Bytes Internal SRAM
- 6 general purpose I/O pins (GPIO)
- 4 channel 10-bit ADC
- 1 8-bit timer/counter
- debugWIRE On-chip Debug System
- In-System Programmable via SPI Port
- Internal Calibrated Oscillator
Comparison to the ATmega328P (Arduino Uno R3)
Feature | ATmega328P | ATtiny13A |
---|---|---|
Architecture | 8-bit AVR RISC | 8-bit AVR RISC |
Flash Memory | 32KB | 1KB |
RAM (SRAM) | 2KB | 64 bytes |
EEPROM | 1KB | 64 bytes |
GPIO Pins | 23 | 6 |
Pin Count | 28/32 | 8 |
Timer/Counters | 3 (Two 8-bit, One 16-bit) | 1 (8-bit with prescaler) |
PWM Channels | 6 | 2 |
ADC | 10-bit, 8 channels | 10-bit, 4 channels |
Operating Voltage | 1.8V - 5.5V | 1.8V - 5.5V |
Max Clock Speed | 20 MHz | 20 MHz |
Communication | USART, SPI, I²C | SPI |
Analog Comparator | Yes | Yes |
Watchdog Timer | Yes | Yes |
debugWIRE | Yes | Yes |
Power Modes | 6 modes | Multiple low-power modes |
Brown-out Detection | Yes | Yes (programmable) |
Why is this comparison important?
It is helpful to understand that this chip is significantly less capable than the chip used by the Uno. That said, it perfect for projects which need a “little bit of intelligence”, perhaps, three inputs and three outputs
Comments powered by Talkyard.