Skip to content

ICSP Programming

The RS-UV3A includes a 6-pin In-Circuit Serial Programming (ICSP) header for programming the PIC microcontroller. This header serves two purposes:

  1. Bootloader forcing — Jumper pins to force bootloader mode on startup (for firmware updates when the board is unresponsive)
  2. Direct ICSP programming — Connect a PICkit or similar programmer to flash firmware directly

For routine firmware updates using the bootloader, see the Firmware Upgrade guide.

The ICSP header is a 6-pin (3×2) header located near the PIC microcontroller (U2) on the left side of the board. The pins are staggered — offset from the standard 0.1” grid — to allow a programming clip or individual test probes to make contact without soldering a header.

Viewed from the top of the board:

1 2
● ●
3 4
● ●
5 6
● ●
PinSignalDescription
1Boot Select AJumper to pin 2 forces USB/JP1 bootloader on startup
2VDD (+3.3V)PIC supply voltage
3PGDProgramming data (PIC RB7, pin 17)
4PGCProgramming clock (PIC RB6, pin 16)
5GNDGround
6Boot Select BJumper to pin 5 forces DE-9 bootloader on startup

If your RS-UV3A is unresponsive (bad firmware upload, corrupted flash), you can force it into bootloader mode on power-up:

  1. Power off the RS-UV3A
  2. Place a jumper across pins 1–2
  3. Power on — the board enters bootloader mode on USB/JP1
  4. Upload firmware using mikroBootloader at 115200 baud
  5. Power off and remove the jumper
  6. Power on — normal operation resumes
  1. Power off the RS-UV3A
  2. Place a jumper across pins 5–6 (or 4–5, verify against your board revision)
  3. Power on — the board enters bootloader mode on DE-9
  4. Upload firmware using mikroBootloader at 115200 baud
  5. Power off and remove the jumper
  6. Power on — normal operation resumes

For the full bootloader upload process, see Firmware Upgrade.

Method 2: Direct ICSP Programming (PICkit)

Section titled “Method 2: Direct ICSP Programming (PICkit)”

For advanced users who need to flash the PIC microcontroller directly — for example, to restore a corrupted bootloader or flash custom firmware.

ItemNotes
PICkit 3, 4, or 5Microchip in-circuit programmer/debugger
MPLAB X IDEFree download from microchip.com
Firmware .HEX fileFrom HobbyPCB or compiled from source
2×3 pin header (optional)Press-fit into staggered ICSP holes

The PICkit programmer needs five signals. Connect to the ICSP header as follows:

PICkit PinSignalICSP Header
1MCLR/VPPSee note below
2VDDPin 2
3VSS (GND)Pin 5
4PGD (ICSPDAT)Pin 3
5PGC (ICSPCLK)Pin 4

MCLR Connection

The ICSP header may not break out the ~MCLR signal (PIC pin 18) directly. Check your board revision’s schematic on the Schematics page. If MCLR is not on the header, you may need to connect the PICkit’s MCLR line directly to PIC pin 18 or the ~MCLR trace on the board.

  1. Open MPLAB X IDE
  2. Create a standalone project or open the firmware project
  3. Select the target device: PIC18F46J11
  4. Select the programmer tool: PICkit 3 (or 4/5)
  5. Under Project Properties → PICkit:
    • Set Power to not supply voltage from PICkit (the RS-UV3A has its own 3.3V regulator)
    • Set Voltage Level to 3.3V if powering from PICkit
  1. Connect the PICkit to the ICSP header
  2. Power the RS-UV3A (or enable PICkit power at 3.3V)
  3. In MPLAB X, click Make and Program Device (or use ipecmd for command-line)
  4. Verify the programming completed successfully
  5. Disconnect the PICkit
  6. Power cycle the RS-UV3A

For automated or headless programming using Microchip’s IPECMD:

Terminal window
ipecmd -P18F46J11 -TPPK4 -M -F"RS_UV3_FIRMWARE.HEX" -OL
FlagMeaning
-P18F46J11Target PIC device
-TPPK4Tool: PICkit 4 (use -TPPK3 for PICkit 3)
-MProgram device
-F"..."Firmware .HEX file path
-OLRelease from reset after programming

From the schematics, the RS-UV3A uses:

ParameterValue
MCUPIC18F46J11-I/PT (U2)
PackageTQFP-44
Flash64 KB
VDD3.3V
PGDRB7 (pin 17)
PGCRB6 (pin 16)
MCLRPin 18
ScenarioMethod
Routine firmware updateBootloader (BL command)
Board won’t respond to commandsBootloader forcing (ICSP jumper)
Corrupted bootloaderDirect ICSP (PICkit)
Custom firmware developmentDirect ICSP (PICkit)
Factory programmingDirect ICSP (PICkit)
  • Verify PGD, PGC, VDD, GND connections
  • Check that MCLR is accessible to the PICkit
  • Ensure the RS-UV3A is powered at 3.3V
  • Try reducing PICkit programming speed in MPLAB X

Programming Succeeds but Board Won’t Boot

Section titled “Programming Succeeds but Board Won’t Boot”
  • Verify the correct .HEX file was used
  • Check that the bootloader region was preserved (if applicable)
  • Try the bootloader jumper method as a fallback
  • Ensure configuration bits are correct for the PIC18F46J11
  • Use a press-fit 2×3 header and apply light finger pressure
  • Solder a header if you program frequently
  • Use a spring-loaded pogo pin adapter (e.g., Tag-Connect TC2030)