This is the source code that wasn't made by a series of drunk coders.
Source code for a community built unofficial Defcon 25 badge.
Install MPLabX 3.65
Install XC8 1.42
Step by Step
- 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.
Active tasks are set inside main.c, you can change them to run the other examples