Difference between revisions of "ChristmasTree2012"
From Francois Louw
Line 1: | Line 1: | ||
− | + | [[Projects|Back To All Projects Page]] | |
− | + | [[Main Page|Back To Main Page]] | |
− | + | __TOC__ | |
+ | ---- | ||
+ | So for 2012 I didn't want just any boring tree, I wanted to make one myself with a bunch of LEDs and a PIC that I had lying around! | ||
− | + | Here are the results with video, pictures, schematics and code! | |
− | + | {{#ev:youtube|ShFkCYE7gvw}} | |
− | = | + | =Schematic= |
− | The code was written in C using MPLAB 8. | + | [[File:tree-2012-schematic.jpg|500px]] |
+ | |||
+ | ''FIX: The MCLR resistor should pull up the MCLR pin, and the MCLR pin should be connected straight to the ICSP header'' | ||
+ | |||
+ | The MCLR resistor is 4.7K and the LED resistors will depend on your LEDs. Remember that there is a limit on the amount of current that the PIC can supply. I limited my 2V LEDs to 0.8mA by using 3.8K Resistors. The total current usage is 20mA when all the LEDs are on. Assuming the 9V battery has a 400mAh life then this will give me at least 20 hours. Realistically I should get 30+ hours. For timing I used a 10MHz crystal. | ||
+ | |||
+ | =Source Code= | ||
+ | |||
+ | The code was written in C using MPLAB 8.60 and the HiTech C Compiler. | ||
Here's the source code | Here's the source code | ||
Line 335: | Line 345: | ||
</source> | </source> | ||
− | + | =Result= | |
Here are pictures of the final result (ignore the quality of the makeshift wire tree) | Here are pictures of the final result (ignore the quality of the makeshift wire tree) | ||
− | [[File:tree-2012-1.jpg| | + | [[File:tree-2012-1.jpg|500px]] |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | [ | + | [[File:tree-2012-2.jpg|500px]] |
− | + | =Copyright= | |
− | Everything here is under | + | Everything here is under [[Gplv3|GPL 3.0]]. |
− | If you use this to make your own project email me and link to my site | + | If you use this to make your own project email me and link to my site. |
my email is francois.louw@(this-domain) | my email is francois.louw@(this-domain) |