Template:PIC NonCortexCore

From SEGGER Knowledge Base
Jump to navigation Jump to search

This template can be used to add contents for pages describing device-specifics of non-Cortex core PIC devices (e.g. dsPICxxx, PIC16, PIC12, ...)

Example

  1. {{PIC_NonCortexCore}}

Implementation

Config words

The config words are used to configure the device and to protect the memory against unintentional readout. The various Microchip PIC devices differ significantly in the config words. Please consult the corresponding data sheet of the device for more information.

When the config words are present in the data file (HEX, SREC, BIN, ELF...) they are used after Programming/Verify is finished. An indication of which config words were used is displayed at the end of the programming process with the corresponding "VerbosityOutput".

Low-voltage programming

Low-voltage programming (LVP) refers to a programming mode that allows PIC devices to be programmed without an higher voltage when this mode is not disabled by config word settings. It is not possible to disable the LVP mode in LVP mode, which leads to an error when verifying the configuration words. Programming mode changing in only possible in HVP mode!

To contact boards with the Microchip RJ12 adapter, we offer the following adapter: SEGGER's Microchip LVP adapter

High-voltage programming

High-voltage programming (HVP) refers to a programming mode that allows PIC devices to be programmed in all cases.

Note: It is not possible to use the Microchip LVP adapter mentioned above, as the increased programming voltage of Pin 17 is routed to #MCLR pin 6 of the RJ12 connector

How to connect a device

After the device has been selected in U-Flash, you can display the connection assignment via "show wiring"

PIC16F1xxx_HVP.svg?.png
PIC16F1xxx_LVP.svg?.png

Please note that an external level shifter is required for the programming voltage! A pulldown resistor of approx. 1K is required on the Vpp line as the ProgVoltageAdapter has an open drain output!

The wiring on the target side must be taken from either the boards circuit diagram or the corresponding data sheet.

caption

Limitations

Programming in HVP

By itself, Flasher cannot provide the voltage required to program in HVP mode. One of the following methods can be used to program a PIC device that is in HVP mode, using Flasher:

  1. Use SEGGER's programming voltage adapter and select HVP mode in U-Flash. A pulldown resistor of approx. 1K is required on the Vpp line as the ProgVoltageAdapter has an open drain output!
  2. Use Microchip's PICkit to set the device in LVP mode and change the respective config word in the data file to LVP mode

Lower supply voltages

Some PIC device are not able to perform a bulk erase when using lower voltages than the maximum/nominal supply voltage. When using lower supply voltages, "sector erase" and lower ICSP frequencies must be used. Please refer to the corresponding datasheet of your specific device.

Troubleshooting

Device ID does not match

At the start of programming, the Flasher tries to connect to the device and to read out the device ID. Each PIC device has a unique ID.

If an error is output regarding the device ID, this can have several root causes.

To obtain detailed information on the error, increase the "VerboseOutput" in the U-Flash configuration to at least "INFO" and transfer the project to the Flasher again.

caption


Device ID = 0000 or 3FFF

  1. There is a fault in the wiring
  2. The device is kept in reset by an external reset generator or watchdog
  3. The supply voltage is insufficient
  4. The device is set to HVP mode while you are trying to work in LVP mode

Device ID is wrong

  1. The wrong device was selected in U-Flash
  2. There is another device on the board assembled
  3. The supply voltage is too low and/or the ICSP speed is too high