USB Library
Low Pin Count USB Development Board
Overview

This board features the PIC18F14K50 microcontroller, but can also be used (preferably with minor modifications) with the PIC16F145x devices. The PIC18F14K50 controller has 20 pins, 16KB of flash, 768 bytes of RAM and an 8-bit core running up to 12MIPS. 

 

J12 - Shorts the VUSB pin to Vdd rail. This jumper should always be left open, unless an 'LF' device is used, and the board VDD is externally supplied with a nominal 3.3V supply (ex: external power provided on J9, with the J14 jumperd in the leftmost position). 

J14 - Selects the power source for the board. Short pins 1 and 2 to power from J9. Short pins 2 and 3 to power from the USB VBUS line. 

S1 - Application button. Connected to RA3 

D1 - Application LED. Connected to RC0 

D2 - Application LED. Connected to RC1 

D3 - Application LED. Connected to RC2 

D4 - Application LED. Connected to RC3

Using the Low Pin Count (LPC) USB Development Board with the PIC16F145x Devices

The original LPC USB Development board was designed for the PIC18F14K50, but the subsequent PIC16F145x USB microcontrollers have pinout backwards compatibility with the PIC18F14K50. Therefore, it is possible to use these PIC16F devices with the LPC USB Dev board. However, the board was not optimized for this newer device, and therefore there are several things that are useful to know when trying to use a PIC16F USB device with this board. 

Programming the PIC16F145x Device on the LPC USB Dev Kit Board: The PIC16F145x microcontrollers feature two ICSP programming ports. One port (full programming and debug supported) is multiplexed with the MCLR/RC0/RC1 I/O pins. The other ICSP programming only port (no debug) is multiplexed with the MCLR/D+/D- I/O pins, so as to provide pinout backwards compatibility with the PIC18F14K50. By default, on the original version of the LPC Dev Kit board, only the MCLR/D+/D- programming interface is made available on the ICSP1 PICkit 3 style programming header. In order to program a PIC16F145x device using the ICSP1 header, it is required that the "Enable Low Voltage Programming" checkbox for the programmer device be selected in the MPLAB IDE build configuration settings. This is NOT the default setting (by default, high voltage programming is used instead, which the PIC16F145x silicon does not support through the MCLR/D+/D- ICSP port). This programmer option is under the "Program Options" option categories: 

 

 

In addition to checking the low voltage programming check box, it is normally necessary to unplug the USB cable from the demo board (and USB host) during the programming operation, to minimize the capacitance and potential for I/O contention on the D+/D- pins, during the programming operation. Therefore, it is often convenient to program the microcontroller while the LPC Dev Kit board is being powered from the ICSP programmer (such as the PICkit 3): 

 

 

Alternatively, if full program and debug operations are desired (using standard high voltage programming mode), it is recommended to connect the ICSP programmer to the MCLR/RC0/RC1 programming/debug port. This is the preferred ICSP port on the PIC16F145x devices, but they are not routed to a ICSP header on the original LPC Dev Kit Board (they are routed to header ICSP2 on the updated revision of the board). Therefore, if you have the original board, it is suggested to solder a new 6-pin standard male header (standard 100 mil pin spacing) to the prototyping area of the PCB, and then connect air wires to connect up to the MCLR, VDD, VSS, RC0, and RC1 pins. When using the MCLR/RC0/RC1 programming/debug port, it is not necessary to unplug the USB cable from the host during program/debug operations, and it is not necessary to power the board from the programmer or to use the low voltage programming mode. 

Using a PIC16F145x Device on the LPC USB Dev Kit Board with the HFINTOSC+PLL+Active Clock Tuning: In order to use the HFINTOSC + PLL + Active Clock Tuning to operate in full speed USB mode, it is necessary for the VDD microcontroller supply rail to be stable and free of noise. However, the original LPC USB Dev Kit board does not have much VDD rail capacitance (0.2uF total), but it has a substantial noise genering source (the MAX3232 level translator chip, which uses build in capacitive charge pumps to generate positive voltages above VDD and negative voltages below VSS for RS232 level communication). The charge pumping action generates a substantial ripple/noise on the VDD rail, which can disrupt the HFINTOSC stability enough to cause USB communication issues (even though HSPLL mode is unaffected, as the crystal is a resonant device that is harder to disrupt by noise). To fix this, it is necessary to add additional capacitance accross the VDD/VSS nets on the LPC USB Development kit board. A value of 1uF to 8uF, preferrably cermaic, is ideal, and provides good smoothing of the VDD rail noise. It is therefore recommended to solder a new 1-8uF ceramic capacitor (ex: 0603 or 0805) on top of the existing capacitor C1 on the demo board, to provide the VDD noise smoothing effect. Once this change has been made, the HFINTOSC + PLL + Active Clock Tuning may be used to successfully/reliably operate the microcontroller in USB full speed mode. If you have a newer revision PCB, this extra capacitance will already be populated on the PCB, and therefore, no soldering or other changes are required. 

More Information

Product webpage 

PIC18F14K50 webpage 

PIC16F1459 webpage 

MLA - USB Library Help Version : 2.16
http://www.microchip.com/mla