Features of the tinyAVR
Specifications | ATtiny204 | ATtiny404 | ATtiny804 | ATtiny1604 |
---|---|---|---|---|
Flash (program memory) | 2048 bytes | 4096 bytes | 8192 bytes | 16384 bytes |
Flash w/Optiboot | 1536 bytes | 3584 bytes | 7680 bytes | 15872 bytes |
RAM | 128 bytes | 256 bytes | 512 bytes | 1024 bytes |
EEPROM | 64 bytes | 128 bytes | 128 bytes | 256 bytes |
Bootloader | Optiboot (optional, not recommended) | Optiboot (optional, not recommended) | Optiboot (optional) | Optiboot (optional) |
GPIO Pins | 12 (11 usable) | 12 (11 usable) | 12 (11 usable) | 12 (11 usable) |
ADC Channels | 10 (9 usable) | 10 (9 usable) | 10 (9 usable) | 10 (9 usable) |
DAC | No | No | No | No |
PWM Channels | 6 | 6 | 6 | 6 |
Timer Type B | 1 | 1 | 1 | 1 |
Timer Type D | No | No | No | No |
Interfaces | UART, SPI, I2C | UART, SPI, I2C | UART, SPI, I2C | UART, SPI, I2C |
Clock options | Internal 20/16/10/8/5/4/1 MHz | Internal 20/16/10/8/5/4/1 MHz | Internal 20/16/10/8/5/4/1 MHz | Internal 20/16/10/8/5/4/1 MHz |
Specifications | ATtiny214 | ATtiny414 | ATtiny814 | ATtiny1614 |
---|---|---|---|---|
Flash (program memory) | 2048 bytes | 4096 bytes | 8192 bytes | 16384 bytes |
Flash w/Optiboot | 1536 bytes | 3584 bytes | 7680 bytes | 15872 bytes |
RAM | 128 bytes | 256 bytes | 512 bytes | 2048 bytes |
EEPROM | 64 bytes | 128 bytes | 128 bytes | 256 bytes |
Bootloader | Optiboot (optional, not recommended) | Optiboot (optional, not recommended) | Optiboot (optional) | Optiboot (optional) |
GPIO Pins | 12 (11 usable) | 12 (11 usable) | 12 (11 usable) | 12 (11 usable) |
ADC Channels | 10 (9 usable) | 10 (9 usable) | 10 (9 usable) | 10 (9 usable) |
DAC | Yes | Yes | Yes | Yes |
PWM Channels | 6 | 6 | 6 | 6 |
Timer Type B | 1 | 1 | 1 | 2 |
Timer Type D | Yes | Yes | Yes | Yes |
Interfaces | UART, SPI, I2C | UART, SPI, I2C | UART, SPI, I2C | UART, SPI, I2C |
Clock options | Internal 20/16/10/8/5/4/1 MHz | Internal 20/16/10/8/5/4/1 MHz | Internal 20/16/10/8/5/4/1 MHz | Internal 20/16/10/8/5/4/1 MHz |
Reference: https://github.com/SpenceKonde/megaTinyCore
Pinout
Preparing Arduino IDE
- Install megaTinyCore
- Open the Arduino IDE
- Go to "Tools" -> "Board" -> "megaTinyCore" and select your chip
- Go to "Tools" and set the desired board options
- Go to "Tools" -> "Programmer" and select "jtag2updi(megaTinyCore)"
- Connect the UPDI programmer to the UPDI header on the development board. You can find such programmers in my projects or you can use an Arduino Uno as a UPDI programmer.
- Go to "Tools" -> "Burn Bootloader"
- Now you can upload your sketch