Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Make your own USB LCD

Discussion about LCD's and other related hardware

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo, Fast351, hydrolisk1792

Post Reply
ch424
Posts: 30
Joined: March 21st, 2006, 6:43 pm
Location: Oxford, UK

Make your own USB LCD

Post by ch424 »

Hi everybody

This is a guide for making an LCD that connects to your computer using USB, primarily intended to be external. You can see mine here. To make the board smaller, it doesn't have the GPOs.

This thread should also be used for suggestions on how to improve the circuit, add new features, and fix bugs in the firmware.

First of all, the schematic:
Image

Next, the PCB layout:
Image
(Note that the power for the LCD is labelled wrong: the 5V and 0V should be the other way round)


And a printable version for y'all:
Image

Component list:
R1; R8; R9; R10: 10k
R2; R7: 4k7
C1; C2: 22pF
C3; C4; C5: 100nF
C6: 100uF
Q1; Q6: BC184L
RV2: 4k7 preset
LCD1: HD44780/KS0066U compatible
X1: 4MHz
T5: USB B (bought from Farnell)
J2: ALPS 11mm rotary encoder (from RS)
BUZ1: miniature buzzer
U1: PIC18F2550 DIP28

For firmware, see post #6 in this thread.

Note that I've used a transistor for the buzzer, so you can connect someting else there instead... mod on!

The connection to the rotary encoder works like this: (diagram)
Pin 2 on encoder goes to pin 1 on J2
Pin 3 on encoder goes to pin 2 on J2
Pin 5 on encoder goes to pin 3 on J2
Pins 1 and 4 on encoder go to pin 4 on J2

Any questions, feel free to ask!

ch424
Last edited by ch424 on May 16th, 2006, 6:46 pm, edited 4 times in total.
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

What did you use to make your PCB Layout?

Kinda looks like you used modelsim/pspice for the schematic. I havent looked at the datasheet for your PIC, but have you thought of using more of the Port A pins for buttons or GPO's?

J
ch424
Posts: 30
Joined: March 21st, 2006, 6:43 pm
Location: Oxford, UK

Post by ch424 »

Hi J

I used Proteus ISIS for the schematic and ARES for the layout. Would you like the files? I think they're non-standard I'm afriad.

I had thought of adding some buttons there, and there's a couple of other spare pins: I was waiting for people to say what they'd like.

I think five buttons on PORTA and an IR remote control on RC7 would be pretty cool. :) Maybe some GPOs, but this is the external version... there's an internal version with GPOs to come. I'm finishing the PCB layout today.

I'll see what you and other people say...

ch424
caesar
Forum Supporter
Posts: 734
Joined: October 15th, 2005, 10:39 am
Location: Romania
Contact:

Post by caesar »

Nice work ch424!

I vote for buttons and IR for the external version and a mix of 3 buttons and GPOs for the internal version.

Waiting for the hex file till then.
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

I would say buttons, it seems like that is what most people want.

J
ch424
Posts: 30
Joined: March 21st, 2006, 6:43 pm
Location: Oxford, UK

Post by ch424 »

Hi,

I'm working on an RF remote for this, but meanwhile, this firmware will have to do: link.

This is the required programmer config (assuming 4MHz XTAL). The USB voltage regulator is critical, as the PIC won't even try to start up without it.
Image

It treats the four unused pins RA1-4 as GPOs, which can be used with PWM. A few commands are therefore added:

Supported commands:
Position: 254 71 [col] [row]
Home: 254 72
Underline on: 254 74
Underline off: 254 75
Blink on: 254 83
Blink off: 254 84
Define custom: 254 78 [c] [8Bytes]
Clear display: 254 88
Backlight on: 254 66 [mins] (mins is just discarded)
Backlight off: 254 70
Backlight brightness: 254 152 [value]
GPO off: 254 86 [1-4]
GPO on: 254 87 [1-4]
Set GPO PWM: 254 102 [1-4] [0-100] (works as a percentage)
Buzzer off: 254 86 5
Buzzer on: 254 87 5

ch424
caesar
Forum Supporter
Posts: 734
Joined: October 15th, 2005, 10:39 am
Location: Romania
Contact:

Post by caesar »

Hi!
I was trying your hex file a few days ago and it looks great!
Too bad that i have a 4x40 lcd...
If you could, please also post the source code/project files (maybe e-mail them) i would be very grateful.
I want to use this pic for a 4x40 LCD and for some time i am stuck with the mchpusb and can't get the pic recognised by the computer (your hex file worked fine).

Thanks!
Caesar

Later edit: solved the problem, thanks!
Robbin
Posts: 1
Joined: March 6th, 2007, 9:38 am
Location: Australia

Re: Make your own USB LCD

Post by Robbin »

hi ch424,

I have got a 16x4 LCD module. Would you please share the source code to me? I want to modify it to a 16x4 format.
Thank you very much.

Robbin
Post Reply