Step 7: Programming the Microcontroller (PIC)

Now it's time to program the microcontroller. Due to the tight space, the 5 pin ICSP programing connector is located on the backside of the PCB. Insert a 5 pin header's longer side into a PICKit 2 or 3, or connect it to another programmer. Then insert the short end of the 5 pins into the holes on the back of the PCB - marked ICSP. Make sure that the MCLR pin goes into the hole with a triangle mark. PICKit has a same marking to indicate the MCLR pin.

Download the HEX file provided, fire up Microchip IDE or PICKit software, and program the PIC.
*Since the battery is not connected, you need to supply the power from the programmer. You can find this in the "Options" menu.
Refer to the screen shots - I recommend setting the Vdd to 4.9V, just to be sure not to let the zener diode shunt too much current. (I never had any problems using 5V so for, but better safe than sorry.)

*** UPDATE ***
The assembler source file (wave_jt-1.1.asm.zip) is uploaded. Now you can modify the firmware to modify and/or add new functions!

<p>How difficult would it be to connect this scanner to the power supply in my desktop PC? Thanks.</p>
<p>Could you please the dimensions of the assembled unit (with battery)? <br>Thanks.</p>
Dimensions are:<br>L: 55mm<br>W: 20mm<br>H: 24mm<br>
<p>My son is thinking of being Darth Vader for Halloween. How difficult would it be to reprogram this device to smoothly illuminate a string of LED's from one end when a button is pressed, that matches the speed of the effect in the movie, then when the button is pressed again to reverse the animation? Thanks.</p>
<p>Great tutorial.....!! i was practising in stimulation software...but unable to figure out ICSP in schematics ..? </p>
<p>ICSP - In Circuit Serial Programming. This allows you to connect a PIC programmer such as PICKit2/3 to program the PIC microcontroller without removing the IC.</p>
<p>I have the same question. Can I use another 16 pin chip?</p>
<p>I only know PIC16F1824 or PIC16F1823 would work, but there might be another PIC that's similar enough to work...</p>
<p>can you help me how to modify the code for other pic? as i didnt find the pic chip mentioned here. </p>
What does it do? What function does it serve? What action is this device completing that those leds are indicating?
Wave JT creates beautiful movements of light that you can look at forever, while being compact and energy efficient. <br>It's therapeutic and enchanting. But if that's not enough, you can find practical uses such as bike light or Xmas ornament. <br>It's up to your imagination.
Ah ok, thats what I was wondering. It seemed like somewhat of an over complex design to just blink led's. I love the design. Defiantly the most attractive battery discharger I've seen in a long time.
Coolest thing ever!!!!!!!!!
Would it work if instead of using the Joule Thief system (for more power) to just use a USB (5V)?
Would it be possible to get the un-compiled code for the pic? I would like to see how you are ramping up and down the brightness, and I would like to use a different pic controller since I have an over abundance of several others, just not the 1824 or 1823.
I've uploaded the source file. <br>
Damn that's impressive. How do you figure out how to program these?
I'm just learning about joule thief's and I want to power a microcontroller with one. Does your circuit self oscillate because of C1 charging in series(which I don't think is the case)? what does that transistor network exactly do? <br> <br>But my biggest question is, if you are starting and stopping the current through the inductor with the uC pwd, what waveform are you using? PWM, clear timer on compare? <br>
The voltage booster circuit oscillates by itself when SW1 is closed or enough voltage is applied to PWR pin. This&nbsp;circuit is a variation of popular Joule Thief circuit, which uses one transistor and a two winding inductor (much like a transformer) to do the job. My circuit uses two transistors to make use of an easy to find single winding inductor. (The exact workings of the circuit takes way too long to explain - please google Joule Thief...)<br> <br> The microcontroller simply turn the PWR pin on and off to keep the voltage within target. No PWM. I'm using the A/D converter to read the supply voltage of the microcontroller, and turning the PWR pin accordingly.<br> <br>
Can I know which exact model number of the Schottky Diode is being used for this project? Thank you.
It's&nbsp;BAT85 or SD103 type. Sorry I forgot to post that information - now it's added to the instructable.<br> <br> Aki
I'm not clear on the electrolytic and the inductor - are those just ranges of acceptable values? I suspect the cap is, but I'm not familiar enough with inductors to be certain.
Yes the values are the range that should work.<br> For inductor I recommend to stay within 47 to 100 uH, but higher values would work ok. Capacitor C2 also can be larger, but larger ones are also physically larger - not good for this project...<br> <br> Aki
Cool work..<br> Referred you to a Question and voted ;-)
Thanks!<br> What question?
<a href="https://www.instructables.com/answers/How-to-switch-between-2-outputs/" rel="nofollow">Here</a> you are<br> <br> A
Your work is, as always, beautiful
Thanks! <br>
Where download the HEX file?
Oops. Will be uploaded shortly.<br> <br>
This look great!!! I will love one (or many) of this, did you sell this? where?, thanks I love all this led thingies too!!!
Thanks!<br> You can purchase the kits and PCBs at theLEDart.com.&nbsp;<br> <br> http://www.theledart.com/blog/wave-jt-kit<br> <br> <br>
As usual, absolutely awesome. Video is fun, and the instructable is precise and educational. Thanks for being a great electronic/microcontroller engineer
Another home run. Very nice work.

About This Instructable




Bio: I am an electronic artist living in Brooklyn, NY. I work with LEDs and microcontrollers to create beautiful objects.
More by ledartist:T962A SMD Reflow Oven Fix/Hack Color Organ Triple Deluxe II Aurora 48 - 48 RGB LED Sequencer 
Add instructable to: