This is written by a series of drunk coders. If something doesn't make sense have a few beers and come back :)
git clone https://github.com/nullibadge/defcon25.git
Acquire one of these
- Plug in your pickit3 to your computer
- Open MPLab X
- File -> Open Project -> Select your git folder
- Select Clean Build from the Tool Bar (Looks like a Hammer with a Brush)
- Click Production -> Set Project Configuration -> Customize
- Under Conf:[default] -> Configuration Pane -> Hardware Tool Pane -> Hardware Tools you should see PICkit3 with a serial #
- Under Conf:[default] -> Configuration Pane -> Device -> Be sure to select PIC16LF18346
Note: Early dev boards used a non L version microcontroller. These could take higher voltages. The new ones cannot and have better battery life.
Note: You don't need to power the board with battery and shouldn't when programming them. You can turn off the battery power by toggling the switch on the bottom right of the badge.
- Under Conf:[default] -> select PICkit3 -> Under Options Categories select Power -> Check Power target circuit from PICkit3 -> change the power to 3.25V. Anything higher than 3.6V will fry the L microcontroller and destroy your badge.
- Under Compiler Toolchain on the right click on XC8 1.42 and click apply then ok
- Connect the PICKit3 to your badge. The arrow indicates the left most pin.
Here is a picture of proper placement.
- Click the Green Play button to right of "Clean Rebuild"
- Select your PICKit3. You may get a prompt about the having the right device selected. Ensure you are using the L version if you use a new revision (>rev1) of the badge. Click OK and the badge will program.
Good luck have fun PR's welcome