Home > Ideas > Interfacing(USB – RS232 – I2c -ISP) Project Ideas > Attiny serial monitor using arduino walkthrough

Attiny serial monitor using arduino walkthrough

Summary of Attiny serial monitor using arduino walkthrough


This article guides users on connecting an ATtiny microcontroller to an Arduino for better output monitoring, specifically addressing capacitive switch debugging. It details the necessary wiring configuration and explains how to install the Arduino-Tiny platform to burn a bootloader, enabling code compilation and serial communication without additional hardware.

Parts used in ATtiny and Arduino Integration:

  • ATtiny Microcontroller
  • Arduino Board
  • 220Ω Resistor
  • 10uF Capacitor
  • Wires
  • Computer with Arduino IDE
  • Arduino-Tiny Platform Files
Allllllllllright dudes and dudets. Here is whats up, we’re going to make attiny and arduino bestest of friends.

If you have ever worked with capacitive switches you know how much it makes you want to smash your face into a wall…Now imagine you have no way to monitor output, well that is what I was running into. Problem is you can never know what the output is with stock settings of an attiny. So my solution comes from the good boys/gals of MIT. However, It’s not super clear on their walkthroughs so I thought I would provide a more in depth explanation.

Remove these adsRemove these ads by Signing Up

Step 1: W-w-w-wire it up

Lets set up a little basic “hello world” type example. Wire your arduino like the following:

1. Make sure you connect a 220Ω resistor between pin 2 and Tx(transmit) input of arduino. Resistors aren’t directional so it doesn’t matter which way you insert it.

2. Now put a 10uF capacitor between ground and reset with negative going to ground and positive to reset

If you do not do this, you could damage your board/attiny or make the universe implode. (refer to pictures above). SO SERIOUSLY, IF YOU MAKE THE UNIVERSE IMPLODE I WILL FIND YOU IN A PARALLEL DIMENSION AND PUSH YOU IN TO A DEEP PUDDLE OF WATER, AND YOU WILL HAVE TO WALK HOME WITH WET SOCKS.

Attiny serial monitor using arduino walkthrough

Step 2: Burn baby, burn!

Next what we do is burn the bootloader. What this does, according to arduino guide, is burn a sort of firmware (correct me if this term is wrong) on the chip that allows us to compile code on it. here is an excerpt (Boring info alert: skip if you don’t care about details, just know you need a bootloader):

The items in this menu allow you to burn a bootloader onto the microcontroller on an Arduino board. This is not required for normal use of an Arduino board but is useful if you purchase a new ATmega microcontroller (which normally come without a bootloader). Ensure that you’ve selected the correct board from the Boards menu before burning the bootloader…When you upload a sketch, you’re using the Arduino bootloader, a small program that has been loaded on to the microcontroller on your board. It allows you to upload code without using any additional hardware. The bootloader is active for a few seconds when the board resets; then it starts whichever sketch was most recently uploaded to the microcontroller. The bootloader will blink the on-board (pin 13) LED when it starts (i.e. when the board resets).

But what if I haven’t installed attiny for arduino?! I’m freaking out maaaan.

Lo, and behold! If you do not have attiny85 (or other attiny) installed for arduino, it’s you’re lucky day! If you do, just skip to next step. Here is how to install:

Support for third-party hardware can be added to the hardware directory of your sketchbook directory. Platforms installed there may include board definitions (which appear in the board menu), core libraries, bootloaders, and programmer definitions. To install, create the hardware directory, then unzip the third-party platform into its own sub-directory. (Don’t use “arduino” as the sub-directory name or you’ll override the built-in Arduino platform.) To uninstall, simply delete its directory. —arduino website

Attiny serial monitor using arduino walkthrough circuit

Download latest version (choose the with arduino-tiny in title):
http://code.google.com/p/arduino-tiny/downloads/list

For example, my directory looked like:
/Users/[username here]/Documents/Arduino/hardware

For more detail: Attiny serial monitor using arduino walkthrough

Quick Solutions to Questions related to ATtiny and Arduino Integration:

  • Why is monitoring output difficult with stock ATtiny settings?
    You can never know what the output is with stock settings of an attiny.
  • How do you connect the 220Ω resistor during setup?
    Connect it between pin 2 and the Tx (transmit) input of the arduino.
  • What happens if you omit the capacitor between ground and reset?
    You could damage your board or the author claims you might make the universe implode.
  • What is the purpose of burning the bootloader?
    It burns firmware that allows you to compile code on the chip and upload sketches without additional hardware.
  • Does the bootloader blink any LEDs when active?
    Yes, the bootloader will blink the on-board pin 13 LED when it starts.
  • Where should you download the Arduino-Tiny files from?
    You should choose the version with arduino-tiny in the title from the specified Google Code link.
  • What directory structure is required to install third-party hardware?
    Create a hardware directory in your sketchbook directory and unzip the platform into its own sub-directory.
  • Can you name the sub-directory arduino when installing?
    No, do not use arduino as the sub-directory name or you will override the built-in Arduino platform.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top