iLLNESS's PSGrooPIC Hexes and Information Thread –
You can now follow my twitter to see what im doing! I'll be posting updates in regards to my releases/etc there.
Follow me @ Twitter
First off and most importantly, a BIG BIG thanks to the people responsible for PSGrooPIC. To follow their work and to find the latest sources/hexes please visit PSGrooPIC. If it wasn't for them, we wouldn't be able to use our retired PIC's or boards sitting around collecting dust. I don't want anyone to feel obligated but they take donations if anyone is interested (Please don't ask for my information for donations I will not take any). Also, I just want to let you know, you are free to use the compiled hexes directly from PSGrooPIC. There is a good chance they will work for you, and no reason why not if you follow their latest schematics and hexes. The only big difference between my hexes and theirs is the LED output. Their LED output is only compatible with their hexes. I have tried to make a single hex work for as many boards as possible so this is why I release them. Maybe in time, the PSGrooPIC team will compile their own hexes that output LED to many pins instead of just one so I don't need to compile anymore.
So secondly, Why am I making this thread? Isn't there enough of these already? Yes, but after having to answer the same questions over and over, and having requests for numerous pic setups I've decided to make a one stop shop for people using my schematic and the bootloader I'm using. I will also try and make it clear to users the different things they can use and still be compatible with my hexes. Also, please refrain from posting random schematics/hexes/etc etc. I'm hoping to keep this thread clear cut with no confusion using as little variables as possible. Thanks again to the people trying to help out I hope you understand.
In this thread you will find:
Latest HEX files I compile for PSGrooPIC
First off, the schematic I personally use. Please view the datasheet for these PIC's here for full pinouts.
The GND/BOOT is the jumper to enter bootloader mode. For my hex it is pins RC6 to GND (pin17 on 28 pin PICs and pin25 on 40 pin PICs).
Oscillator: Just want to make things clear. You can use any frequency resonator you want as long as its divisible by 4 and is between 4 and 48mhz. I use 12mhz because thats what I have laying around. As you see by my schematic, I use a resonator as well. It's simpler and its cheap. You can use a crystal instead, but you need to use 2 capacitors as well with it increasing your board size and the complexity of the circuit. If you do use crystals, you must make sure the crystals connect to the OSC1 and OSC2 legs of the PIC as well the capacitors for this crystal connect to one leg each of the crystal with the other leg to gnd. It will be up to you to figure out which capacitors are needed for your crystal and exactly how to wire that up. You could likely find images on google for this.
For the capacitor between pins VDD (pin20/32) and VSS (pin19/31), i strongly suggest you match the one i use. It is a decoupling capacitor and should be placed closest to the PIC as possible. "A decoupling capacitor is a capacitor used to decouple one part of an electrical network (circuit) from another. Noise caused by other circuit elements is shunted through the capacitor, reducing the effect they have on the rest of the circuit." This circuit is simple enough that you may get away with not using this capacitor, but I highly recomend it.
For the capacitor between pins VUSB (pin14/18) and VSS (pin8/12) you can use a capacitor between 220nF to 470nF. This capacitor is used to stabalize the the 3.3v from the internal regulator. It is very necessary.
LED/Resistor: I've marked the LED compatible output pins in YELLOW so it's easy to see, as well as added a second type of LED marked in BLUE, RC1. This pin is explained below. Because I'm stubborn and made a few of these boards for friends, for the simplicity of not having to change them or have multiple board types that I personally program I have kept the LED connected to output pin RB5. For your sake and with my HEXes you can use RB1, RB4, RB5 or RC0 for LED output as well as RC1 (only for successful jailbreak. this LED was added for support with users using two LED's on RC0 and RC1). If you have an LED setup you want supported please feel free to reply to this thread with your suggestion. I've only added these because these are the only ones i've seen schematics for. RB5 may not be a good output pin to use if you require LVP to program. I will get into this later. LED size can be whatever you want, and resistance can be whatever works. Most LED's you buy will have all the information you need on the packaging for what you need to find out which resistor you want to use. There is a great site you can check out by clicking the link here to find out which resistor you need for your LED. The source voltage is the voltage coming out of the output pin on the PIC which should be close to 5V. Please match this value as best you can so you don't burn your LED out. The tolerance for your LED should also be stated on the packaging but if its not a good rule of thumb is %5.
USB Connection: I'm not going to dive too deep into this one as its fairly straight forward. But when wiring your USB connector a good site to use would be this one
LVP/RB5: LVP as we all should know stands for Low Voltage Programming. It is a type of interface to initially program your PIC. There are numerous programmers out there the simplest for LVP being the art2003. I will not cover how to build this, but I will tell you you can find a schematic for it here. I personally do not use LVP to program my PIC so have absolutely no experience with LVP. Also, LVP mode shares its toggle with output pin RB5. This is why if you require LVP you CANNOT use RB5 for your LED.
If you do use LVP to program your PIC then its a MUST to use the schematic on the right to build. There is a very good reason for this. When you program a PIC with LVP enabled (aka checkmarked in winpic800) but do not ground the LVP pin using a 10kohm resistor (i have heard 4.7k ohm resistor will work too) the PIC may randomly enter LVP mode (the result is your pic will constantly be recognized then not recognized over usb). A downside to using LVP is if you have LVP disabled (aka unchecked in winpic800) and you require LVP to program, you will lock yourself out of that PIC and will require a different method to flash the PIC with your programmer.
MCLR: If you follow my hexes exactly and do not hold pin1 high, then make sure MCLR is disabled. MCLR is the pin that resets the PIC or enables the PIC. This is commonly used with a switch or button to reset your PIC after you have toggled the bootloader pin. This is not needed at all and is only a luxury. I have not included MCLR in my schematics for simplicity of the build. If for some reason you do want a reset button on your board, simply enable MCLR in your bootloader (checkmark in winpic800) and add a switch between the MCLR pin and 5V (VDD on PIC). A push button can be used if its an always closed/always on pushbutton (aka, the connection is ALWAYS made). Pressing a push button would break the line and cause the PIC to reboot. This item is important because like LVP, if you have it enabled in your bootloader but do not have it wired on your PIC the PIC will randomly reboot causing a major headache to troubleshoot if you don't know about it (i personally spent about 2 days ripping my hair out over this).
Flashing the Bootloader: First, you can find the boot loader i use in the reply below along with the latest hexes or click here (iLLNESS's PSGrooPIC Hexes and Information Thread) if your lazy. I don't want to cover this too much because there are so many different ways to do this as well there are many different board settings. All I will recommend for now is to make sure LVP and MCLR are toggled correctly, and make sure your oscillator is set properly (the divider) to match whatever resonator/crystal frequency your using to build your board. Here is a picture to represent the settings you may or may not need to toggle:
Updating over USB: Using the bootloader I provide, you can update your PIC over USB using a program called PICDEM FS USB Demo Tool. It is provided by Microchip Technology and is an awesome tool. Under Windows 7, when you insert your PIC board while in bootloader mode, Windows 7 will search for the drivers for you and provide a link to download them. I have attached the drivers and programmer here for you but you are free to obtain it wherever you like. One thing that is very important with this is when loading a HEX in this app, make sure to hit cancel if it gives you an error. There's a good reason for this error and why to hit cancel. If you load a hex and it errors it is because the config bits in the HEX your loading and the config bits flashed to your PIC currently for the bootloader DO NOT MATCH. The hex I provided should prevent you from overwriting the config bits and possibly the bootloader but its best to make sure you click cancel. When the hex has loaded, please make sure the data is starting at 0800 as seen below:
The HEX data above that is just the string that allows programs like PDFUSB to recognize where the data goes. Disregard this, this is strictly for people who compile their own HEXes. Also, My HEXes are only compatible with bootloaders smaller then 800bytes (or whatever size it is). If you try and flash my HEXes to a bootloader that is larger then you may run into issues. I may in the future experiment with other bootloaders and possibly make my hexes compatible with these as well I just base all my work around what my PIC's used to be used for: 360 USB SPI Flashers.
Compatible HEXes: Obviously all hexes I use will be compatible in the future as long as you stick to what I've talked about in this thread. If you use my bootloader (or anyone elses bootloader) and flash using the PICDEM program then you will never have to worry. Just follow my guidelines and you won't have a problem.
Compatible PICs: Just about any PIC18F chip is compatible with PSGrooPIC and the bootloader/hex I provide. This includes but is not limited to the PIC18F2455, PIC18F2550, PIC18F4455 and PIC18F4550. Pretty much any PIC18F related to this family. Feel free to try it out on your PIC
Latest HEX Files: The next post is reserved for all the compiled HEX files I make. Please look there in the future for updates after PSGrooPIC releases the sources.
Microchip MCHPUSB Bootloader here: This is the bootloader used as a base for your PIC board. It is needed to update your PIC with the application PICDEM FS USB Demo Tool.
Microchip MCHPHID Bootloader: The same applies as the MCHPUSB bootloader, DO NOT overwrite the config bits (make sure it is unchecked).
There is also a GREAT writeup by skygunner on this forum explaining some other stuff too. I also recommend you follow his first few posts in there to catch anything I miss (he explains how to update using various devices/software). You can find his thread here (PIC PSGrooPIC flashing/DIY guide, FAQ and hex files collections).
If there is anything you feel I should add just message me and I'll do my best to keep things updated.
October 6th 2010 11:21PM; updated schematic for 40pin PIC users.
October 7th 2010 04:04PM; added MCLR info
October 8th 2010 04:47PM; updated LED info. MetalPhreak's schematic with dual LED's is now semi supported. LED on RC0 will blink during activity then turn solid when jailbroken, and LED on RC1 will not blink during activity but turn solid when jailbreak is successful. So two LED's means jailbreak is good Also, updated schematic fixing a misplacement of RC0 as well as adding RC1 to reflect the changes for the two LED setup.
October 15th 2010 04:20PM; sources section added as well as USBHID support added in post 3.
Last edited by iLLNESS; 12-18-2010 at 12:15 PM.