3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

LED Cube 4x4x4

Step 9Compile and program

You now have a led cube. To make use of it, it needs some software.
I have made a driver for rendering a 3d data space on the cube, and functions to display some cool visual effects on the cube.

You can use my code, write your own or build on my code and make more effects.
If you make your own effects, please send me the code. I'm eager to see what you guys make!

To compile the program. Just open a command promt,
enter the directory with the source code
type "make" on the command line.

If you want to use an ATMega32 instead of the ATMega16, just change the mcu setting in the Makefile and recompile (type make). If you use the m32 and don't do this step, the cube won't boot properly (the red and green lights will keep blinking forever).

You should now have a file named main.hex in the source directory.
The next step will show you how to get that code into your cube.
« Previous StepDownload PDFView All StepsNext Step »
33 comments
Dec 21, 2011. 12:47 PMbrujita038 says:
I opened the file "main.c" in the folder 4x4x4_ledcube in AVR Studio 5 but does not appear the option to compile .. Someone could help me with that please, because I have little experience in this program.
Dec 8, 2011. 5:04 PMhoodkicks says:
Quote:
MCUCSR |=(1<MCUCSR |=(1<
If using the Main.c file Make sure to add the following code before your while(1) loop otherwise port c2, c3, c4, and c5 wont light up
Oct 20, 2011. 1:55 PMmateuszrjzr says:
hello
I know, that last post was in 2008, but can you explain me why when i'm klicking "4x4x4_ledcube.hex" suddenly i am downloading something like : F6JRI6AFJ1I6CP0.tmp???? please so much help me...
Oct 25, 2011. 12:51 AMRoshan25 says:
you need to rename int to 4x4x4_ledcube.hex
Nov 22, 2008. 3:09 PMrefuser says:
Amazing instructable man! I really like this one and I have to build it once I finish with my led-pov. Thanks for this one. /Einar
Aug 15, 2011. 11:36 PMssilva7 says:
pls send me this circuit
Aug 13, 2011. 5:50 AMsmnoor88 says:
hi can u plzz give me full details of this pov stuff i am very thank full to u
Dec 26, 2009. 3:11 PMSplortched says:
Oh my god that is AWESOME!
Nov 15, 2009. 2:13 PMmaxpower49 says:
 I'm sure your were expecting this but how did you make that
Nov 5, 2009. 8:00 AMPachim says:
Hello, i'm new here, but i'm interest about doing a 4*4*4 cube.... already in process... can i get your email so ask some questions about it...

mine is deborah1002@hotmail.com

Thanks,

Pachim
Nov 23, 2008. 1:25 AMrefuser says:
I had one that I could manually move but now I'd like to make something a little more advanced so I'm going with a motor driven one.
The thing that I am struggling with is to make a better output driver than I had. On the old one I just hard coded everything into the chip. With this I'd like to be able to send strings and patterns to it wirelessly somehow, but I'm not that good of a programmer yet so I'm working on that now =)
Aug 9, 2011. 11:01 AMLionverse says:
Awesome instructable! I have been looking to build a led cube and yours is the best I have come arcoss - very well put together with thorough instructions. I saw you had ported your 8x8x8 to run off arduino have you thought of doing an instructable on this cube with arduino for newbies like me that are not yey ready to loose the arduino safety net. I'm sure I am not the only one who would appreciate it!
Thanks
Aug 1, 2011. 9:50 PMnpatankar says:
hello frnds....i m very new to microcontroller programming....cn sm1 tell me how to program atmega16..which compiler to use...the rs232 connection shown in the circuit.....using tht programming of microcontroller hs to b done?
plz mail me step by step procedure to make it....on my mail id nikhil.patankar390@gmail.com

thanku..............its a awesum project..........i want to make it
Jul 30, 2011. 1:27 PM4uguyzz.in says:
HELLO MY CUBE IS NOT WORKING WHAT MAY BE THE PROBLEM
Mar 26, 2011. 6:53 AMd67uttam says:
can you please tell me what compiler you used, AVRGCC will work ? please reply . it is an amazing job, I want to build this.
Regards
Uttam
Mar 15, 2011. 2:40 PMgoogl1 says:
hi
i created a fork of your code at git@codaset.com:googl1/led-cube.git
i did some improvements, bugfixing and started implementing some new effects.
rick
Mar 17, 2011. 2:20 AMgoogl1 says:
this is what i did by now, if anyone wants to try or contribute.
http://share.ddf-software.de/main.hex
git@codaset.com:googl1/led-cube.git

i also fixed the random effects thing and improved the random numbers by creating a seed to init rand()

rick
Mar 15, 2011. 11:42 PMcoppertopneo says:
im new at this and i would really like to try this. i dont know much about programming, but if someone could tell me how its connected to compute. and what program to use to flash it would be helpfully. if you could email me thanks. jessebrobison@gmail.com
Jan 23, 2011. 12:18 AMdomdomgin says:
where do i have to put the hex file in which directory..i have usbtiny..it cannot locate the hex file to upload the firmware
Jan 18, 2011. 1:29 PMandrejmdias says:
someone has the full pdf of this circuit to send
send: andrejmdias@gmail.com
thanks
Dec 6, 2010. 5:57 AMkaryochi says:
i'm having some problems, when i use the make command, it responds with:"makefile: ***missing seperator", could someone plz help?, i want to use an ATmega8 or ATmega32, maybe somoene just could send me the HEX code, Karyochi@gmail.com.
Dec 2, 2010. 10:53 AMyasoo716 says:
dude u are ultimate .....and hats off for your patients for explaining this............
Nov 20, 2008. 4:49 PMpoogemister says:
Nice code! I really like the way you did it! Just a heads up, in your definition of ioinit, you made a small typo in one of your comments explaining the Data Direction Registers. // Data Direction Registers // Bit set to 1 means it works as an output // Bit set to 1 means it is an input If I'm not mistaken, to configure a port for input requires the bit to be set to 0. Just a heads up. I really like how clean your code is! Nice work! -- Alex DeLand
Aug 18, 2010. 7:43 PMdarlingvt says:
hi... im making a disco ball...using leds (max of 70 leds)... but i will be using zilog... i like your codes... can that be use in zilog?... and what shift registers did you use? thnx,,.. ill be waiting for your reply...
Jan 19, 2010. 11:33 AMtrungnvfet says:
If use PIC16f877a.How do me do?and need?can you help me.thank U. comment to me.i from VietNammess.
Mar 28, 2010. 10:48 AMdark2061 says:
vo van! tu nghi di!
Jan 20, 2010. 1:41 PMsasuto says:
lolwut
Jan 20, 2010. 10:29 PMtrungnvfet says:
what?I don't understand.can we help me.comment to me.thank U.
Jan 26, 2010. 7:40 AMBartjeeh says:
so this is what i do. and i really don't understand what i do wrong.

Bartjeeh@linux-b5pm: cd /home/Bartjeeh/Desktop/4x4x4_ledcube
Bartjeeh@linux-b5pm:~/Desktop/4x4x4_ledcube> make
If 'make' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf make

in that folder are the following files

file:///home/Bartjeeh/Desktop/4x4x4_ledcube/F6JRI6AFJ1I6CP0.tmp
file:///home/Bartjeeh/Desktop/4x4x4_ledcube/Makefile
file:///home/Bartjeeh/Desktop/4x4x4_ledcube/draw.c
file:///home/Bartjeeh/Desktop/4x4x4_ledcube/effect.c
file:///home/Bartjeeh/Desktop/4x4x4_ledcube/frames.c
file:///home/Bartjeeh/Desktop/4x4x4_ledcube/main.c
if anyone could help me please!!!
Jan 13, 2010. 7:21 AMdangthanhlinh says:
thank about this project.
how do you exchange from *.c    to   *. hex. i don't known software that.
can you help me.
thank! very much.
Dec 12, 2009. 6:02 AMWolfhunter9154 says:
How do you connect an avr to your pc for the code to load on it? And yes I do have linux
Dec 3, 2009. 3:46 PMClA007 says:
i have a question  how do i use the zip file? the hex i can use it from windows to send it to avr but the zip i didn't know how to use..! can someone tell me if it s important o not?
Sep 5, 2009. 12:59 PMPAKIS-RULEZ says:
i am using serial to usb convector i tried using the "make" command as u said its not working please help thanks in advance! " C:\Documents and Settings\**************\Desktop\4x4x4_ledcube>make 'make' is not recognized as an internal or external command, operable program or batch file. "
Nov 14, 2009. 10:05 PMacm321 says:
you need to be using linux
Oct 5, 2009. 7:01 AMgrajasekar says:
In your LED cube 4x4x4 instructable, you've included 2 files for download. A zip file with all the directory containing c programs and a makefile. Another hex file is also available for download. So is this hex file that you've included a precompiled version of the one that we need to burn to the Atmega16 or do we need to compile/make the hex file from the c files you've given?? Please help. Anyone. Also, in the absence of the programmer being connected to the setup, where would the power to the cube come from?? Awesome instructable btw. Thanks in advance, Gaurav
Apr 2, 2009. 9:05 AMG.hyme says:
where is the bootloader for the atmega?
Apr 3, 2009. 6:22 PMvespine says:
What do you need the boot loader for? Is that an arduino question? I did this whole instructable without needing to mess with boot loaders. Did you try google? i'm getting lots of hits for avr bootloader.
Sep 7, 2008. 12:45 PMFire_Leon says:
Man i did this, with a microchip one, and i got it kind of working, here is the thing, if i got the anode with 5v and the transistor is not switching, the led should be off right? well some of mines arent goin off, the keep on, not as bright as if they were on but looks pretty bad, what could be the problem? ive checked a lot, i also cut the ground wires and unwired the transistors and those leds keep on without ground =/

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
652
Followers
7
Author:chr
I like microcontrollers and LEDs :D