Close

Resetting the TV-B-Gone's ATtiny85 to Its Internal Clock

A project log for One-Tiny Bot

Mobile robot controlled by one ATtiny85

C. ParkinC. Parkin 04/30/2015 at 20:280 Comments

Being an electronics novice, I chose to program my ATtiny85 with the Sparkfun Tiny AVR Programmer. This device is inexpensive, extremely easy to use, and was designed to play well with High Low Tech's ATtiny Arduino core. The HLT tutorial is excellent, but assumes that you are using an ATtiny in all of its default settings, and fails to explain how to proceed if you are not.

In particular, an off-the-shelf ATtiny85 runs at 1 MHz according to its internal clock, but in order to attain greater precision, Adafruit's TV-B-Gone kit uses an external 8.00 MHz ceramic oscillator. Simply plugging a Tiny from this kit into the programmer (or hooking it up to an Arduino UNO as also described in the tutorial) will frustratingly fail to work.

To reset it to its internal clock, you must connect it to the external ceramic resonator provided. I did this by jumping the Programmer's IC breakout pins to the Tiny on a breadboard, and connecting the ceramic resonator's two outside pins to the Tiny's pins 2 (CLKI) and 3 (CLKO), and the center pin to ground.

I could then plug the programmer into my computer, open Arduino, and use the "Burn Bootloader" command from the Tools menu (after first selecting "8 MHz (Internal)" from the Tools > Clock menu) to reconfigure the Tiny to use its internal clock.

Thenceforth, the Tiny could be programmed directly on the Tiny AVR Programmer without any need for an external setup.

Discussions