loading

Step 46: Program the AVR with test code

Time to test if your brand new LED cube actually works!

We have prepared a simple test program to check if all the LEDs work and if they are wired correctly.

You can download the firmware test.hex in this step, or download the source code and compile it yourself.

As in the previous step, we use avrdude for programming:
  • avrdude -c usbtiny -p m32 -B 1 -U flash:w:test.hex

-c usbtiny specifies that we are using the USBtinyISP from Ladyada -p m32 specifies that the device is an ATmega32 -B 1 tells avrdude to work at a higher than default speed. -U flash:w:test.hex specifies that we are working on flash memory, in write mode, with the file test.hex.
<p>Made it!!</p><p>Thank you for the great instruction!!</p>
<p>Wow, how do you get your trace wires so straight and the perfect length?</p>
<p>I measured 1, and cut them all to the same length at once...</p><p>And alcohol-free-february also did the trick ;-)</p>
<p>Hahaha nice work!</p>
<p>Nice job. Many never get their hand wired boards working! Nice and tidy job too.</p>
<p>Do you have a list of components that that board required?</p>
<p>Thank you for your guidance chr..</p>
<p>i am selling most of the components needed from Futurlec. I decided to do the Tindie kit instead. You can find my list of parts (less 512 LEDS) and further info in the classified sale section here: </p><p><a href="http://www.instructables.com/community/Major-Parts-KIT-for-8X8-CUBE-LED-from-Furturlec/">http://www.instructables.com/community/Major-Parts...</a></p><p>I am offering this at a discount and Priority mail within the US. </p><p>thank you</p>
<p>What's the purpose of the address bus?</p><p>And can all of the cube or generally any number of IO's can be runned with only 3 pins by making layers of shift registers?</p>
<p>Is it possible to just switch out these same color LED's for some RGB LED's without changing anything else, apart from the code?</p>
<p>I understand that RGB LEDs have 4 pins, and this may be change the layout of how cube is soldered. How much harder am I making this project by deciding to use RGB LEDs. This is my first LED cube so I don't want to get in over my head.</p>
<p>hi</p><p>i need a help for connecting program (3d8s alpha ) to arduino uno </p>
<p>If we want to replace all transistors, for cathode riser, like Đ&ocirc;ng Phạm post, we can use ULN2803. If we are anode riser, TD62783 is the replacement for ULN2803.</p>
<p>Great Tutorial. Thanks</p>
<p>hi<br>thanks for this nce tut. </p><p>can any one tell me if i can use SN74LS574,HD74LS138P instead of 74HC574,74HC138 and im using arduino uno <br>thanks alot<br></p>
<p>hello all of you, I have an idea to replace 16 BJT by ULN2803, it would save up for your area, and it works very tot.Toi did 2 cube leds and it all works fine however, I did not design the RS232 connection on my circuit. and here are some pictures about it:</p>
<p>Hi DongP1, I am so like the Cube and I want to make it and give to my girl friend as a big surprise. Can you send all schematics ,programs and other files to me . Thans so much.</p><p>My e-mail address: dongliang.ma@matrixopto.com </p>
https://drive.google.com/file/d/0BzXbfPpoHKV5eWQxU1VQODZhTTA/view?usp=sharing
<p>Hey guy, if i use STK500 device to set up for atmega32 then plug it to the board , so, can i remove RS232 and AVR Isp?</p>
<p>sir, i have successfully made my cube, now the problem is with the code... im using arduino uno and the code given in this article i.e for arduino user is working fine for me... but other codes which are used for AVR is not compatible with aduino ? does coding for both arduino uno and AVR are different ?</p><p>i got a error as &quot;compilation terminated </p><p> exist status 1</p><p> error compiling &quot;</p><p>if there is solution for this plz post . </p><p>and the code in the link which u gave is compatible with arduino uno ? </p><p> Thanks :)</p>
<p>You likely need an older, or possibly a newer copy of the IDE.</p>
<p>sir presently im using latest version of IDE i.e 1.6.7</p><p>can i know the the exact version of IDE ??</p><p>and sir how can i make others codes compatible with IDE?</p><p>Thanks :)</p>
mail me.. 233himanshu@gmail.com
This is here. https://drive.google.com/file/d/0BzXbfPpoHKV5eWQxU1VQODZhTTA/view?usp=sharing and don't need chager in program .
<p>Hi Phamd4 , thank you so much. I have another question, I can not open the CUBE schematic and pcb files with Protues Desing Suite 8.0 , my computer is Win 7 system. whether the version of the Protues is not matching? Can you help me .</p>
<p>You can use even less space using SMT 2N2222 type transistors. My board will take either.</p>
Can you please kindly send me the circuit and diagram.
<p>The circuit diagrams for this project are in this instructable.</p>
My email address is sisirroy777@gmail.com
<p>Hello DongP1, <br>Can you share a more clear schematic how did you used the ULN2803 and explain what changes have you done to the code ?</p><p>Thanks</p>
You don't need changes in code
<p>OK you, I'm very fun when help you. You can use Proteus to open file schematic and PCB, and i did fixed code. all in here:<br>https://drive.google.com/file/d/0BzXbfPpoHKV5eWQxU1VQODZhTTA/view?usp=sharing<br>when you use atmega32 you must set fuse for it. <br></p><p>and when you solder PCB solder you should note carefully and did not miss any legs, as this is the second circuit face, you can also book for someone trained to do it to ensure circuit reliability. And my final non-electric circuits become restricts motherboard area, it absolutely does not affect the led. And can not forget that it is a 5V supply. Wish success. I look forward to seeing your circuit here.</p><p></p><p>Inside the downloaded folder: principle diagram, schematic print, inside a simulated 3d opened by Proteus, the revised code with external hex file, inside the code can edit custom and standard you, use WINAVR (recommended recommended). and images to set the fuse for ATmega32.</p>
<p>Hi!!<br>Do you know hoe to flash the EEPROM of Arduino just like we do in normal non-arduino boards..<br>i.e. we flash .eep file directly into the micro controller.. do you know any similar or equivalant thing in Arduino...?</p>
<p>I sorry you, because I do not use Arduino, so I did not go through the difficulties you face, but you can read more online material on its use. I can only help you in terms of hardware. Good luck. I believe you will succeed! : D</p>
<p>Thnx for replying!<br>I got a solution for it already!</p>
<p>Hello, </p><p>Now I got it. The idea to use the ULN2803 is to avoid using transistors correct ?<br>What do you mean that I need to set the fuse for the ATMEGA32 ?<br>I will be using arduino board, either Nano or mega. </p><p>Thanks for your reply </p><p>Jose </p>
<p>is this, if you use it you must chip atmega fuse set inside the IC, the fuse is to control a number of functions such as: using the calibrated internal or external crystal, and and some rather different features, please reference IC data sheet. so that it operates according to your desired this function. I use the load circuit to the load burn-e program for my IC, please find out more about it, or you can use the load circuit which you are available. <br>ULN2803 help replace the transistor 16 in the layer. you read this ic data sheet to learn more. I had to diagram inside folders principle schematic. you see that in order to better understand how it works. wish success! : D</p>
<p>Sorry for answers will tell you now, when using ULN2803 then your program absolutely nothing changes, we simply optimized hardware only. Good luck! soon see your results here. : D</p>
<p><iframe allowfullscreen="" frameborder="0" height="400" src="https://www.youtube.com/embed/4gNiDprbUPc" width="600"></iframe></p>
<p>hello everyone, I have an idea to replace 16 BJT layers by ULN2803, it will save your area, and it works very well I did 2 LED cube and all activities well however, I did not design the RS232 connection on my circuit.</p>
hey man, i think i had a good idea, but i had no idea about electronics, i think u'll like it, answer if u,re interested
<p>hi all</p><p>As like &quot;<a href="http://www.instructables.com/member/power000" rel="nofollow">power000</a>&quot; my led cube also having da same problem, some led column remain on constantly, pls help &amp; suggest the reason and how to rectify the problem.</p>
<p>go to my revisited instructable and get my code or go to <a href="http://www.TheLEDCube.com"> www.TheLEDCube.com </a> and download the RAMP.zip file, and upload my code to your cube.</p><p>Video the POWER ON SELF TEST and send me a message with a link to your video, and I will diagnose your issue.</p>

About This Instructable

5,035,002 views

3,926 favorites

License:

1477
Bio: I like microcontrollers and LEDs :D
More by chr: Reverse Engineering: RGB LED Bulb with IR remote Reverse engineering: USB controlled home automation hack LED Cube 8x8x8
Add instructable to: