Atto84 Hookup Guide
Tiny Tricks and Gotchas
Because the Atto84 is the bare-minimum of hardware that can be USB programmed, it does have a few quirks that you should be aware of. But first, let's talk about a few of the cool features that it inherits from SpenceKonde's ATTiny Core.
The ATTiny Core includes a special version of the Wire library that leverages the tiny84's hardware USI for I²C communication. This means that it will run any Wire-based code that you've written for ATmega platforms like the Arduino Uno or the SparkFun RedBoard.
The ATtiny actually has hardware SPI support, so the Atto84 will work identically to the Uno in that respect.
Yeah, why not? The tiny84 has plenty of timers and you'll find a copy of the Servo library included with the core!
Sounds great, right? It is, but there are a few catches that you should be aware of.
There is no power regulator on the Atto84, so the input to VCC must be between 3.3V and 5V. Powering your project through the USB connector is a good, too.
The ATtiny doesn't have a hardware UART, so serial doesn't work the way you might expect. There is a custom library built in to the ATTiny Core called "Serial" which is actually an implementation of Software Serial. This works quite well but you do need to know its limitations. For instance, it's not full duplex, so sending and receiving at the same time will produce gibberish. Also, it does not implement V_USB, so if you want to do Serial debugging, you'll need to connect a separate USB-Serial adapter.
Most USB Arduino boards can be forced into bootloader mode by the Arduino IDE during programming, but due to the limitations of V-USB, the Atto84 needs to be manually reset during programming. Every time the Atto84 restarts, it goes into bootloader mode for about 5 seconds. During this time, your computer will recognize it as a USB device. After 5 seconds, the Atto84 begins running user code. Unless your code also happens to be implementing V-USB, the computer will stop recognizing the device.
In order to get code onto the board, simply click the upload button in the Arduino IDE and wait for the "uploading..." message to show. When the IDE says "uploading," press the reset button on your Atto84. Don't worry, the timing isn't critical, the Micronucleus upload program gives you 30 seconds to press reset. After the board has reset and shows up as a USB device, your code will upload like normal!
- Try a different USB port
- Unplug other USB devices
- Close other programs that might be running
- Reinstall the Atto84 USB driver
- Try a different computer