Step 49: Software: Introduction

Picture of Software: Introduction
The software is written in C and compiled with the open source compiler avr-gcc. This is the main reason we use Atmel AVR micro controllers. The PIC series from Microchip is also a nice choice, but most of the C compilers cost money, and the free versions have limitations on code size.

The AVR route is much more hassle free. Just apt-get install the avr-gcc compiler, and you're in business.

The software on the AVR consists of two main components, the cube interrupt routine and effect code for making fancy animations.

When we finally finished soldering, we thought this would be the easy part. But it turns out that making animations in monochrome at low resolutions is harder than it sounds.

If the display had a higher resolution and more colors, we could have used sin() and cos() functions and all that to make fancy eye candy. With two colors (on and off) and low resolution, we have to use a lot of if() and for() to make anything meaningful.

In the next few steps, we will take you on a tour of some of the animations we made and how they work. Our goal is to give you an understanding of how you can make animations, and inspire you to create your own! If you do, please post a video in the comments!
jtovar933 years ago

I have been loking at this tutorial and I am wondering if the microcontroller has to have the same numbers/ letters written on it...

In other words, would either of these microcontrollers work?




Yes, any of these should work. If AvrDude gripes, just use the -F flag to write to it anyway. You can also edit the table that tells avrdude what device should have what device ID, but I forget which file you have to edit. I did it to mine and then once it was done, forgot about it...LOL.
digitaldgs2 years ago
If you are having trouble with the link, just save the file, find the .tmp file and rename it to ledcube_8x8x8-v0.1.2.tar.gz that it should be.
sjowett3 years ago
Hi There I've got the ATMega 324A PU 1106 and unfortunately am having some issues. Using avrdude it reports that the register name does not match (aparently the register is 0x1e9515) I've forced avrdude with the -F command and everything looks ok but the 2 status LED's do not flash. (what is the flash rate of the 2 leds?) Does anybody know what the difference between a 'P' and an 'A' version. After some searching I'm struggling to find any easy to read info on this subject. Anyway I guess I'll go out and try find an 'old' AT mega32 16PU as in the photo above! Any advice would be appreciated - great instructable!
pawarotti3 years ago
cannot download the filele cube_8x8x8-v0.1.2.tar.gz, can someone post the another linc?
please help!
tarPancake3 years ago
when i compile the custom code, all i get is the 2 flashing led's the cube never boots into avr mode. if i program the cube with the main.hex and main.eep from step 48, everything works fine. I think that there may be something in the code not letting it return 1 in the bootwait function. is there anyone that can confirm or send me a zipped up version of the file above with the correct code?

hmmmm.... when i compile in linux, all is good :)

I am thinking that my winavr setup is bad. maybe crlf? lf? cr?

anyway, dual booted into linux, edited the source and compiled first time no errors and programmed the chip with no problems either.
chaserled3 years ago
Hi triumphtotty i was follow the intruction to burn fuse by usbtiny ,the process was suucessful but when i remove the jumper from the usbtiny it said the fuse was change! so when i install the jumper back it be come find look at this image
alahamm3 years ago
What´s this "ledcube_8x8x8-v0.1.2.tar.gz" for?
No explanation on that.
chaserled3 years ago
Hi Chr can u help me how to identify the programmer, this is my programmer http://www.ebay.com/itm/New-Development-Board-Kit-ATMEL-AVR-Atmega16-Mega16-/270745443529?_trksid=p5197.m7&_trkparms=algo%3DLVI%26itu%3DUCI%26otn%3D4%26po%3DLVI%26ps%3D63%26clkid%3D5728950572093077102
i'm have troubdle to detect it please help
emcniece4 years ago
Is anyone else having trouble downloading this file? All I get following the link is a .tmp file...
i have the same problem,i don't know why,may be the source file is a .temp file
Oh, they probably did it to get around something. Download it and rename the extension to .tar.gz, or just save it with the .tar.gz extension... it'll open just fine.
you have to save as the file format unless u use mozilla then it should come out right
hi friend
i have a ardino bord for atmaga328.
can i use for this is ie atmaga3216pu.
lpaulson874 years ago
I ended up purchasing a ATMEGA324P-20PU-ND (20Mhz rather than 16Mhz) will this give me problems?

Since it  works with an external crystal frequency there should be no problem.
I have not the data sheet.
There should be some specs for operating frequency range with Your Atmega..

Here it is:


There states that it is operational from zero to 20 MHz ! :)

Good Luck!
Makes sense, thanks.