![pickit 3 pin pickit 3 pin](https://my-live-05.slatic.net/p/fd13f7a9d4c6b12f44deda41e01457ce.jpg)
Each time the MCLR is actioned, the microcontroller will stop wherever it was and it will start over again at the mentioned vector. So, in that page it says adding all these resisters and caps, but I found everything is cool sailing with just a 10k resister going from the MCLR pin to power.When the device in turned on, the firmware starts at the RESET vector, at address 0x0000. Embedded engineers really do hate vowels, I know. Next, in the datasheet, specifically on page 24, we need look after Pin 1, which happens to be the MCLR, which means Master CLeaR. Just as long as they both straddle the chip's pins nice and close. 0.1uF caps are usually not polarized, so it doesn't matter which leg goes where. We should keep these close to the chip, like all good enemies. So lets add a 0.1uF cap between the chips' pins 19 and 20. As it turns out, our PIC24F16 chip only has one power/ground pair. Brains don't like spikes just think of spikes in terms of a hangover. In essence, this means they all need to be connected to ground and the board's voltage (this chip can't go over 3.3volts) and all those pairs must have caps (thats what all the pros say, i think, for capacitors?) to smooth out the current. All VDD and VSS pins for the brain must be connected and decoupled (see previous step). In our case, one of the things we need from it is on page 23. This can be hard, but then again, so can climbing the fountain in NYC's Central Park (don't ask). The trick to a datasheet is finding out very quickly what you need from it, in amongst all the other stuff. They certainly don't look like it, but how many times in your own experiences does that also ring true, huh?! Speaking of datasheets, they really are a treasure trove. Make sure you have the chip the right way up - the dimple on the chip indicates fashion-forward.įirstly, add the power and ground, as indicated on the datasheets. The reading should be somewhere around 3.3 volts. If there are any issues, best we work them out before adding (and, perhaps, frying) our microcontroller. Now its time to check the current supply for the whole board. Now these are polarized, so make sure the back strip leg always heads towards ground. With this setup, I found a 10uF cap on power in and power out pins works wonders. With this pair, we get a smooth sail throughout the whole board. Thats what decoupling essentially boils down to (at least for us).
![pickit 3 pin pickit 3 pin](https://blog.mbedded.ninja/images/2014/04/03-connecting-up-another-working-pic-kit-3-programmer.jpg)
We do this by using capacitors to keep the Current Continuously Consistent. This is great but we need to smooth it out, since any spikes of power could create havoc. Pin 3 is the raw 9 volts coming from the battery. Pin 2 supplies the whole board with 3.3 volts. this is all in the data sheet for the LM117. IMPORTANT NOTE do not mix up the pin labels in the schematic with that of the actual physical pins! things will get too hot too soon. So lets bring in a 1117 3.3 voltage regulator.
![pickit 3 pin pickit 3 pin](https://a.pololu-files.com/picture/0J5693.420.jpg)
Just look at the data sheet (page 1) which says our 24F16 chip can't tolerate more than 3.8 volts. And in this case, we need to get from the 9, the battery, all the way down to 3.3 or so.