Let's Make Robots!

Serial LCD Controller

Displays stuff sent through a serial connection from a PC or Microcontroller

10 October 2009

I discovered a flaw in the current design that will only allow the controller to work with a connection to the computer and not to a microcontroller.  I've updated the schematic below and will fix the controller design.  I've added a project file below that also includes the fixed schematic. 

If you look at the schematic you will notice that when you set the jumper to non-inverted so you can connect to a microcontroller for serial control it will not work.  The reason is in the way I designed the circuit for both inverted/non-inverted RS232 control.  Looking at the transistor in the circuit, the collector is held high through a 10K resistor.  The collector feeds to the Rx pin on the PIC.  When you set the jumper to non-inverted and attempt to send data to the PIC it won't work because the line is always tied high through R8 to 5V.

There is a fix and I have included it in the archive file below.  There are two ways to do this:

1.  If your board is already built and your intentions are to only use this LCD in a finished design and not attached to the   computer then, snip the connection from R8 to 5V and the controller will only work in the non-inverted configuration.

2. Look at the included schematic in the archive and add the shown J2 jumper to your design which will allow you to select between the two types of communication.

04 October 2009

I have redesigned the LCD Controller and updated the code.  The new schematics and code can be found below.  I ported the code from MBasic to PicBasic Pro.  I'll leave the old code up for those who still want it. 

The files below are from a project that I have been working on for a serial LCD controller for a 4x20 line parallel display with the Hitachi chipset.  I am also working on a USB design.  In the picture of the demo board there is a wire jumper installed.  This is because I screwed the pooch and somehow missed a crossed trace.  I had to repair the board.  In the download files the PCB files have been fixed.  I'll upload some video of functionality when I get a chance.

The code and project files have been posted in the download links.

Project file downloads

Old code:

Power regulation board schematic

LCD and power board PCB

LCD schematic

LCD code

Demo application with sourcecode

05 October 2009 Project Files

PicBasic Pro PIC16F628A code for 16x2 character LCD

PicBasic Pro PIC16F628 code for 16x2 character LCD

PicBasic Pro PIC16F628A code for 20x4 character LCD

Archive containing test application, schematic, and PCB (ExpressPCB)

PicBasic Pro LCD Controller interface to Parallax GPS receiver

Ensure all the files are unzipped to the same folder.  The include file that is referenced contains the fuse settings for the selected PIC chip.

I will be uploading a version soon that allows the type of LCD to be set.  This will allow the same controller to be used for a variety of LCDs.  I can't squeeze that functionality into a PIC16F628 chip without removing some of the current functionality.  So, I am porting that over to a PIC16F88.

More to come...


Breadboard testing of the LCD controller

P9270002.JPG

Software application for testing functionality

Serial%20LCD%20Demo%20v2.0_pic2.jpg

LCD controller schematic

seriallcd04.jpg
A better view of the controller schematic can be downloaded from the link below:
http://picasaweb.google.com/lh/photo/LZac_OpDpd0lbB8jCWJL0Q

USB version of the LCD controller

seriallcd05.jpgA better view of the controller schematic can be downloaded from the link below:
http://picasaweb.google.com/lh/photo/_XtaXjprlNdzRaFHGrha_Q


Optional power supply schematic

power01.jpgA better view of the controller schematic can be downloaded from the link below:
http://picasaweb.google.com/lh/photo/Hp0EJqKk4PNbVm69Vd1p8g

 

Component layout
SerialLCD%20v1.4.jpg

PCB with two controllers and the optional power supply

Serial%20LCD%20v1.4_pcb.jpg


PCB bottom side

PB050010.JPG

 

PCB top side


PB050011.JPG

LCD prototype board component view

PB080003.JPG


Prototype board attached to the back of a LCD


PB080011.JPG

Netlist

Serial LCD Controller v1.4

----------------------------

C1    0.1uf   
D1    1N4148   
J1    16-pin Header   
J2    4-pin Header, Right Angle   
J3    3-pin Header   
J4    6-pin Header. Right Angle   
JP1    Shorting Jumper   
Q1    2N2222   
Q2    2N2222   
R1    1M   
R2    10k   
R3    1k   
R4    22k   
R5    15   
R6    10k Potentiometer   
R7    1k   
R8    10k   
U1    PIC16F628   
X1    20Mhz   
HD44780 20x4 LCD Module Display

Netlist


USB BUS Powered LCD Controller
-------------------------------

C1    0.1uF   
C2    10nF   
C3    10uF   
C4    0.1uF   
C5    0.1uf   
D1    1N4148   
F1    500mA, Ferrite Bead   
J1    USB Type B, Digikey 787780-1-ND
J2    ICSP, 6-Pin, Right Angle Header   
J3    LCD Connector, 16-Pin Header   
J5    2-Pin Header   
J6    2-Pin Header   
JP2    Shorting Jumper   
JP3    Shorting Jumper   
LED1    RED   
LED2    GREEN   
Q1    2N2222   
R1    330   
R2    330   
R3    1M   
R4    10k   
R5    15   
R6    1k   
R7    10k   
SW1    Power, SPDT   
U1    FT232RL   
U2    PIC16F628   
X1    20Mhz   

*NOTE* All resistors on the controller board are 1/8 watt

Netlist

5V Power Regulation v1.0
-------------------------

C1    10uf   
C2    0.1uf   
C3    10uf   
D1    1N4004   
D3    1N4004   
J1    Power Jack       
J2    3-pin header       
LED1    Light Emitting Diode       
R1    220   
SW1    SPDT Slide Switch   
VR1    LM7805

*NOTE* All resistors on the power board are 1/4 watt


You can do a search on eBay for the LCDs and you will find them listed for as cheap as $5.00 minus shipping.

 04 October 2009 - Redesigned Controller

I have redesigned the controller to use some surface mount components.  This is still a prototype and the final version will have all surface mount components and be a bit smaller.  I also ported the code from MBasic to PicBasic Pro.  MBasic is a great program but the makers have not updated it to include newer PICs.  As such, I've been using PicBasic Pro which is a really nice basic compiler.  The code size and speed rivals that of some PIC-C compilers.

Schematic

Newest Schematic with fix for connection to PC or microcontroller

Hobbybotics%20LCD%20Backpack%20v2.5.jpg

Better view of the schematic can be downloaded at the following link: http://picasaweb.google.com/lh/photo/0gbrdTCrjH6KJyib-i33EQ?feat=directlink

Old schematic with flaw.  Recommend not to build from this schematic

Hobbybotics%20LCD%20Backpack%20v2.4.jpgHobbybotics%20LCD%20Backpack%20v2.4.jpgHobbybotics%20LCD%20Backpack%20v2.4.jpgHobbybotics%20LCD%20Backpack%20v2.4.jpg

Better view of the schematic can be downloaded at the following link: http://picasaweb.google.com/lh/photo/Yi30Oi9tf_1AIOc2Z4cDGw?feat=directlink

5V%20Power%20Board%201.1.jpg5V%20Power%20Board%201.1.jpg

Better view of the schematic can be downloaded at the following link: http://picasaweb.google.com/lh/photo/ySbtGz3Fb4xDZ26780GD8w?feat=directlinkHobbybotics%20LCD%20Backpack%20v2.4_PCB.jpgHobbybotics%20LCD%20Backpack%20v2.4_PCB.jpg

P8090010.JPG

P8090010.JPGP8090007.JPG

P8090008.JPGP8090008.JPG

P8090009_800x600.jpgP8090009_800x600.jpg

P8090010_800x600.jpgP8090010_800x600.jpg

P8090011_800x600.jpgP8090011_800x600.jpg

P8090010_800x600_DESC.jpg

P8080017.JPGP8080017.JPG

P8080018.JPGP8080018.JPG

P8090012_800x600.jpgP8090012_800x600.jpg

PA050009_800x600.jpg

PA050004_800x600.jpg

LCD%20Controller%20Demo%20V2.2.jpeg

Netlist:

Hobbybotics LCD Controller V2.3
ComponentDescriptionPart NumberVendorCost
C10.1uf, SMT 080580-C0805C104M5RMouser$0.05
D11N4148, D0-35512-1N4148T26AMouser$0.03
J18-Pin Straight Header, Male855-M20-9730846Mouser$0.20
J26-Pin Receptacle, Female649-68685-306LFMouser$1.75
J36-Pin Receptacle, Female649-68685-306LFMouser$1.75
J46-Pin Polarized Header571-6404546Mouser$0.27
JP12-Pin Jumper855-M22-1920005Mouser$0.25
Q12N2222, SOT-23512-MMBT2222AD87ZMouser$0.06
Q22N2222, SOT-23512-MMBT2222AD87ZMouser$0.06
R11M, 0805, 1/8W71-CRCW0805J-1M-E3Mouser$0.07
R210k, 0805, 1/8W71-CRCW0805-10K-E3Mouser$0.05
R31k, 0805, 1/8W660-RK73B2ATTDD102JMouser$0.06
R422k, 0805, 1/8W71-CRCW0805-22K-E3Mouser$0.05
R515, 0805, 1/8W71-CRCW0805-15-E3Mouser$0.05
R610k, Potentiometer72-T70YE-10KMouser$0.74
R71k, 0805, 1/8W660-RK73B2ATTDD102JMouser$0.06
R810k, 0805, 1/8W71-CRCW0805-10K-E3Mouser$0.05
SW1DIP-2 Switch611-SDA02H1BDMouser$0.56
U1PIC16F628A, SOIC-18579-PIC16F628A-I/SOMouser$2.14
X120Mhz Resonator815-AWCR-20.00MDMouser$0.32
 HD44780 20X4 LCDRT204-1Ebay$10.80
PCBPrinted Circuit BoardHBLCD-V2.2ExpressPCB$14.14




Total




$33.51

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hi Curtis Brooks!!

 

    Thanks for the .HEX file!! I'll program my PIC with this!!

    It's great to know that you'll be updating it for the PicBasic Pro too!!

    Looking forward to the PicBasic Pro code!!

    Great work!!

 Thanks and Regards,

elektor_1234

Thankyou for the interest in it.  I usually see around 20 to 30 downloads a day but no one ever lets me know how it worked for them.  So, will you let me know how it works out for you?  I'll be putting the newest version up today also.

Hi Curtis Brooks!!

     Thanks!! You're doing a great job over there!!

     I'll definitely test this and let you know my results!!

 Thanks and Regards,

elektor_1234

Well, the posted basic code was written for MBasic and not PicBasic Pro.  However, I have ported it over to PicBasic Pro and redesigned the boards.  I also put together some documentation on how to use it.  Let me get them posted in a sec.

Hi Curtis Brooks!!

 

    Thanks!! I don't see any document!! Is it a .doc??!! Can you please let me know the link!!

 

Thanks and Regards,

elektor_1234

I haven't uploaded it yet.  I need to add a few commands.  Look for it to be up some time today.

Hi Curtis Brooks!!

     Thanks!! I'll check for it sometime later today!! and Will let you know!!

 Thanks and Regards,

elektor_1234

I downloaded the software in hopes that it would let me simulate the new eyes for Walter. Or actually the WAL9000. But it does not simulate. You really need the hardware.

So Curtis, what is the prominent large display area in the user interface for then? Does it show an "programme" of sorts. Could you share a screenshot of the app at work?

Rik

The large display area is so that you can position the cursor to any cell on the LCD.  That portion of the application was written to test that functionality.  The area at the bottom right of the software is where you can define and create custom characters to send to the display or store in the LCD CGRAM.  I am going to edit the post today after work with the easy to implement command set and an explanation of the software.  In fact, I will rewrite the software so that you guys can create the simulations for the eyes.  This is very easy to do and it will not take much for me to do.  I was already pondering doing software for LCD graphics.  I will post a screen of the software working.  Maybe I can use that as an opportunity to do some video.

This project is designed so that others can take the PIC source and roll their own displays. 

More to come when I get off work...

wow....very impressive work and those pcbs look clean.  Did you get those professionally done or are you making them yourself?

Did the cost to build include the pcb work?