Home                                            

ATtiny3217  SBC Intro

 

Top 10 Microcontrollers Among Makers

 

 

ATtiny3217 Module Pinout

(Dr. Azzy/Spence Konde)

 

 


ATtiny3217 Alternate Pins for I2C, SPI, and UART TX/RX

 

 

Compare ATtiny3217 to ATmega328P

 

 

ATtiny Specs

 

 

Dr. Azzy (Spence Konde)

ATtiny3217 Breakout Board

Pinout

Overview

Once again we're going to build a single board computer (SBC) but this time with a more modern uC, the ATtiny3217. But first we'll start with a little background info.

 

Microchip/Atmel ATmega328P

The ATmega328P is the most popular microcontroller. An upgrade to it in a smaller form factor is the ATtiny3217 which has all of the features of the aforementioned as well as more speed, more pins, no crystal req'd, etc.

 

Comparing the Arduino UNO ATmega328 to the ATtiny3217

In a nutshell, the ATtiny3217 has more power in a smaller size and is both 3v3 and 5v compatible. You can compare features in this link.

 

Spence Konde (a.k.a. Dr. Azzy) has created an ATtiny3217 breakout board module that allows you to connect a standard USB-FTDI module to program the ATtiny3217 and run Arduino's Serial Monitor.

If you choose to go with just the ATtiny321x chips or other vendors' breakout boards, then you had best read the information below because you'll need two PC serial ports to communicate with them.

I've included a screenshot from my Eagle CAD showing the board and all of its connections. You'll notice each pin is first labeled by its Arduino designation, e.g. "D3", then its built-in board function, e.g. "LED", then its chip port name, e.g. "PA5".  Spence's board has a decoupling cap so I guess we don't really need C1.

Programming the megaTinyCore in the ATtiny321x microcontroller chips

You cannot use your standard AVR programmer because the ICSP programming functionality is not used with the ATtiny3217. Instead, you will need to use its one-wire interface, UPDI. "The Unified Program and Debug Interface (UPDI) is a proprietary interface for external programming and on-chip debugging of a device like the new AVRŽ XMEGA devices."

 

Using your Arduino Nano as a UPDI Programmer

Use this github link for full information (maybe more than you want) on the new megaTinyCore that drives chips like the ATtiny3217. Note that the latest github code requires Arduino IDE v1.8.13 as a minimum.

 

Use this Arduino.cc link to create your own UPDI programmer.

When you download and expand the jtag2updi.zip file, you'll need to remove "-master" from the folder name so that you can drop it in your "libraries" folder, which is prob'ly "C:\Users\yourname\OneDrive\Documents\Arduino\libraries". The file will be empty but your IDE should show all of the other needed files alongside the empty "jtag2updi.ino" one.

 

Connect your PC to an Arduino Nano and then to the ATtiny3217 as per the diagram (at the bottom of the page) using a 4.7K resistor connected to pin D6 on the Nano and pin PAO (UPDI) on the ATtiny3217. Ensure the default Nano/Uno programmer, AVRISP mkII is chosen. Compile and upload the "jtag2updi" sketch in the usual fashion.

You have turned your Nano into a UPDI programmer. As per the Arduino link you may have been following, select ATtiny3217 under the megaTinyCore boards. Change the programmer to "jtag2updi(megaTinyCore)". Install a 10uF capacitor between the Nano's RST and GND pins with the cap "-" pole connected to ground. Load up "Blink.ino" and upload it with your new UPDI programmer to the ATtiny3217.

Remove the cap if you are going to use the Nano for anything other than a dedicated UPDI programmer.

 

Okay, so you uploaded the code to the ATtiny321x chip or board but how do you run Arduino IDE's Serial Monitor on your PC so you can troubleshoot your code?  You'll need another serial connection from your PC to the ATtiny3217. You could open a blank Arduino sketch and choose the 2nd serial port for Serial Monitor, or you could use a comm program like TeraTerm; your choice. Note that things can go easily go wrong with these configurations which is why I decided to stop wasting time and went with Dr. Azzy's inexpensive boards on Tindie.

ATtiny3217  SBC  Circuits=>

 

TOP

Tags: Arduino-type Microcontroller, ATMega328P

 

Home