DEF CON 26 Badge¶
Pinout¶

Pin functions¶
Serial port in the pairing connector.
Programming using ICSP pads under battery pack.
+------------------+ | | | | | | | | | | | | | DEF CON 26 Badge | | o--- MCLRN PIC-UART-TX ---o o--- VDD (3V3) PIC-UART-GND ---o o--- VSS (GND) o o--- PGED PIC-UART-RX ---o o--- PGEC | | +--------o---------+ | USB
Programming setup¶

An Arduino Due (to the right) acts as programmer, connected to a PC with serial over USB. DEF CON 26 Badge (to the left) with PIC32MM MCU to be programmed.
Signal | Color | Arduino pin |
---|---|---|
MCLRN | white | D4 |
VDD (3V3) | grey | 3V3 |
VSS (GND) | purple | GND |
PGED | blue | D3 |
PGEC | green | D2 |
Upload ramapp to the Arduino Due, and use pic32tool.py to program the PIC32 MCU.
Inhibit Arduino Due reset when opening the serial port to the programmer on Linux:
stty -F /dev/arduino -hup
Component connections¶
D11.1 - U3.23
D11.2 - 3V3
D12.1 - U3.37
D12.2 - 3V3
D16.1 - U3.16
D16.2 - 3V3
U3.18
U3.15
U3.23
D18.1 - U3.20
D18.2 - 3V3
D20.1 - U3.2
D20.2 - 3V3
D21.1 - U3.7
D21.2 - 3V3
D27.1 - U3.26
D27.2 - 3V3
D28.1 - U3.3
D28.2 - 3V3
D28.3 - U3.5
D28.4 - U3.6
D29.1 - U3.47
D29.2 - 3V3
D29.3 - U3.48
D29.4 - U3.1
D30.1 - U3.35
D30.2 - 3V3
D30.3 - U3.36
D30.4 - U3.37
D31.1 - U3.30
D31.2 - 3V3
D31.3 - U3.31
D31.4 - U3.34
D32.1 - U3.27
D32.2 - 3V3
D32.3 - U3.28
D32.4 - U3.29
D33.1 - U3.23
D33.2 - 3V3
D33.3 - U3.24
D33.4 - U3.25
D35.1 - U3.4
D35.2 - 3V3
D36.1 - U3.32 - D37.1
D36.2 - 3V3
D37.1 - U3.32 - D36.1
D37.2 - 3V3
U3.45 - U2.25 (I2C SDA)
U3.46 - U2.26 (I2C SCL)
U3 - LED driver?¶
24 23 22 21 20 19 18 17 16 15 14 13
| | | | | | | | | | | |
+--o--o--o--o--o--o--o--o--o--o--o--o-+
25 --o o-- 12
26 --o o-- 11
27 --o o-- 10
28 --o o-- 9
29 --o o-- 8
30 --o S2319 o-- 7
31 --o o-- 6
32 --o o-- 5
33 --o o-- 4
34 --o o-- 3
35 --o X o-- 2
36 --o o-- 1
+--o--o--o--o--o--o--o--o--o--o--o--o-+
| | | | | | | | | | | |
37 38 39 40 41 42 43 44 45 46 47 48
I2C protocol¶
Example transfer¶
78 01 00 …
Registers?¶
Address | Description |
---|---|
0x01 | Dx, off(0) or on(1) |
0x02 | Dx, off(0) or on(1) |
0x03 | Dx, off(0) or on(1) |
0x04 | Dx, off(0) or on(1) |
0x05 | Dx, off(0) or on(1) |
0x06 | Dx, off(0) or on(1) |
0x07 | Dx, off(0) or on(1) |
0x08 | Dx, off(0) or on(1) |
0x09 | Dx, off(0) or on(1) |
0x0a | Dx, off(0) or on(1) |
0x0b | Dx, off(0) or on(1) |
0x0c | Dx, off(0) or on(1) |
0x0d | Dx, off(0) or on(1) |
0x0e | Dx, off(0) or on(1) |
0x0f | Dx, off(0) or on(1) |
0x10 | Dx, off(0) or on(1) |
0x11 | Dx, off(0) or on(1) |
0x12 | Dx, off(0) or on(1) |
0x13 | Dx, off(0) or on(1) |
0x14 | Dx, off(0) or on(1) |
0x15 | Dx, off(0) or on(1) |
0x16 | Dx, off(0) or on(1) |
0x17 | Dx, off(0) or on(1) |
0x18 | Dx, off(0) or on(1) |
0x19 | Dx, off(0) or on(1) |
0x1a | Dx, off(0) or on(1) |
0x1b | Dx, off(0) or on(1) |
0x1c | Dx, off(0) or on(1) |
0x1d | Dx, off(0) or on(1) |
0x1e | Dx, off(0) or on(1) |
0x1f | Dx, off(0) or on(1) |
0x20 | Dx, off(0) or on(1) |
0x21 | Dx, off(0) or on(1) |
0x22 | Dx, off(0) or on(1) |
0x23 | Dx, off(0) or on(1) |
0x24 | Dx, off(0) or on(1) |
0x26- | Typically 0xff, but unclear what it is. |
Default system features¶
The default configuration includes those major features. They are all
initialized by sys_start()
at the startup of the application.
Drivers¶
Supported drivers for this board.
- bmp280 — BMP280 temperature and pressure sensor
- ds18b20 — One-wire temperature sensor
- ds3231 — RTC clock
- eeprom_i2c — I2C EEPROM
- eeprom_soft — Software EEPROM
- flash — Flash memory
- gnss — Global Navigation Satellite System
- hd44780 — Dot matrix LCD
- hx711 — HX711 ADC for weigh scales
- i2c — I2C
- i2c_soft — Software I2C
- icsp_soft — Software ICSP
- jtag_soft — Software JTAG
- owi — One-Wire Interface
- pin — Digital pins
- sht3xd — SHT3x-D Humidity and Temperature Sensor
- uart — Universal Asynchronous Receiver/Transmitter
- xbee — XBee
- xbee_client — XBee client
Library Reference¶
Read more about board specific functionality in the DEF CON 26 Badge module documentation in the Library Reference.
Memory usage¶
Below is the memory usage of two applications:
- The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
- The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application | Flash | RAM |
---|---|---|
minimal-configuration | 4544 | 33227 |
default-configuration | 129360 | 65997 |
Default configuration¶
The communication between the PC and the board is carried over UART 38400-8-N-1.
Default Standard Library configuration.