You are here

Jumper configuration

Jumper is used for hardware entry into the programming mode. It connects the corresponding microcontroller pin to ground (GND). To enter the programming mode close the jumper at the moment of device connection to USB. During initialization bootloader checks the value at the corresponding pin. If value is equal to zero, bootloader enters the programming mode.

If you want to launch user mode application after firmware update, you have to open the jumper before bootloader resets the microcontroller. Otherwise it will enter the programming mode once again.

Bootloader can also enter the programming mode with the help of EEPROM Mark.

The same pin can be used both for the jumper and for LED. First Bootloader verifies the value at this pin. At zero value (when the jumper is closed), it enters the programming mode, configures the pin as digital output, and outputs zero value there (LED is on). As an example of schematic solution see PIC USB Demo Board.

Jumper use is configured in file with USE_JP_Bootloader_EN macro. To use the jumper macros value must be set to 1.

#define USE_JP_Bootloader_EN   1

If the jumper is not used macros value must be set to 0.

#define USE_JP_Bootloader_EN   0

By default microcontroller pin E.0 is reserved for the jumper. If you need to use another pin change the following macros:

  • in JP_Bootloader_PORT macros specify PORT register address;
  • in JP_Bootloader_TRIS macros specify TRIS register address;
  • in JP_Bootloader_PIN macros specify the pin number.

These macros are defined in file as shown below:

#define JP_Bootloader_TRIS   TRISE
#define JP_Bootloader_PORT   PORTE
#define JP_Bootloader_PIN    0