USB-controlled monochrome LCD display

This is my first stab at driving a graphical display device, and also at USB communication. This project was just meant to be a proof-of-concept, and didn't evolve far off the breadboard.

Design features:

Project status

The project is abandoned in favor of the color LCD display. The circuit works fine on a breadboard, but I messed up the PCB design and didn't want to order a replacement. Also, I didn't like the contrast (or lack thereof) of the FSTN display.

The design posted here is the fixed PCB design.

Bill of materials

C1 - PIC24 voltage regulator capacitor: 4.7µF, tantalum, ESR<2Ω (3216 metric) Any appropriate
C2,C3 - Filter capacitors for PIC24: 0.1µF (0805) Any appropriate
C4 - USB voltage regulator capacitor: 0.33µF (0805) Any appropriate
C5 - Filter capacitor for PIC18: 0.1µF (0805) Any appropriate
C6 - Stabilizing capacitor: 1µF (0805) Any appropriate
C7,C8 - Oscillator capacitors: 22pF (0805) Any appropriate
J1 - Header for LCD module: 20-pin female, 0.1" pitch (1x20) Sullins PPPC201LFBN-RC
J2,J3 - Programming headers: (Not placed - program the microcontrollers by
holding a free-hanging male header in these holes)
J4 - USB connector: Female receptacle (USB Mini B) Hirose UX60A-MB-5ST
Q1 - Backlight control transistor: N-channel MOSFET, >5V, >30mA (SOT23) ON Semiconductor 2N7002ET1G
Q2 - LCD control transistor: N-channel MOSFET, >5V, >4mA (SOT23) ON Semiconductor 2N7002ET1G
R1 - MCLR pull-up resistor for PIC24: 10kΩ (0805) Any appropriate
R2 - LCD contrast potentiometer: 10kΩ   Bourns 3352T-1-103LF
R3 - Current-limiting resistor for backlight: 47Ω, 1/8W (0805) Any appropriate
R4 - MCLR pull-up resistor for PIC18: 10kΩ (0805) Any appropriate
U1 - Primary microcontroller: 16-bit PIC with 2K RAM (SOIC-28) PIC24HJ32GP202
U2 - USB to serial converter: 20-pin PIC with USB (SOIC-20) PIC18F14K50
U3 - Voltage regulator for PIC24: 3.3V output (SOT23A) Microchip MCP1700T-3302E/TT
X1 - Oscillator crystal: 12.000MHz (HC49/US) Abracon ABLS-12.000MHZ-B2-T
N/A - LCD module: 128x64, FSTN, white backlight   Newhaven Display
 NHD-12864WG-BTFH-V#N
N/A - Header for LCD module: 20-pin male, 0.1" pitch (1x20) Any appropriate

Design files

Design details

Power supply

The device is bus-powered, which means it can pull up to 100mA at 5V from the USB power pin. Since start-up capacitance is limited in the USB specification, I don't power up the LCD module or backlight until the microcontrollers have been running for a while.

I use low-side MOSFETs to control the LCD and backlight power. My initial PCB design had them on the high side, but once the transistors were turned on the first time, there was a negligible voltage difference between the drain (+), the gate and the source (–) pins, so it didn't work properly.

High-speed communication between the PICs

I use SPI to communicate data in a half-duplex manner from one PIC to the other. Since the communication is unidirectional (from the PC to the display), I don't have to worry about collisions. I still have the other wire hooked up, just in case I decide to upgrade the functionality later.