You Are Here: Home » AVR ATmega Projects » Apple-style LED pulsing using a $1.30 MCU using ATTiny85 microcontroller

Apple-style LED pulsing using a $1.30 MCU using ATTiny85 microcontroller




LED pulsingThe Atmel ATTiny85 chip is an 8-pin MCU that is totally awesome.  If you’ve been programming with the bigger boys (the ATMega series), these are a nice adventure – you’re rather limited in the number of output pins, but a creative design gives us a lot of flexibility in a very small package.

You’ve seen them – those “Apple computers.”  Probably in the hands of some Hipster in Portland, while riding his fixie and wearing those thick framed glasses.  That pulsating light when Apple laptops are asleep is so … sooooothing.  You just want to go to sleep watching it.  You know you do.

Today, we’re going to replicate that using our ATTiny85.  It’s really easy, and most of it can be implemented in hardware instead of code (!!!).

Step 1 Supplies

  1. Breadboard
  2. Breadboard wires
  3. 1 LED
  4. ATTiny85 (the 45 or 25 will probably work, but I haven’t tested them)
  5. An ISP programmer (or other, if you know how to use it) – I use the USBtinyISP.
  6. A computer with avrdude and avr-gcc
  7. Optional: an oscilloscope

Step 2Understanding PWM

In this guide, we’re going to use Fast PWM, which is just one of the modes available on our little chippy friend.  I’ve attached Atmel’s very educational document on PWM – I suggest you read it and familiarize yourself with the magic.

Step 3 The datasheet – your new best friend

The ATTiny 25/45/85 datasheet is the core of this project.  Without it, we’d all be lost, poking our chips with sticks and screaming like chimpanzees.  Well, most of us, anyway.

Download it and go to section 11 and just take 30 minutes and read the entire thing.  Trust me, it’s worth it – it’s a lot better than randomly paging through it for hours trying to debug your code!

For more Detail: Apple-style LED pulsing using a $1.30 MCU using ATTiny85 microcontroller

Leave a Comment

You must be logged in to post a comment.

Read previous post:
simavr
Debugging AVR code in Linux with simavr

I recently started programming AVR chips, namely the ATTiny85.  They can be programmed using C, compilers are readily available in...

Close
Scroll to top