Figuring Out An LCD Driver - Page 1
Forum section: electronics / beginners

author: Lance
author_rank: Frequent Contributor
timestamp: June 06, 2011, 06:45:49 am
content: I'm trying to figure out how the LCD driver on a PIC16F917 works.Here is a link to the data sheet:http://ww1.microchip.com/downloads/en/DeviceDoc/41250E.pdfNote: I haven't ever attempted to drive an LCD before. The only ones I've used have been controlled via serial comm.All the sample code I have is written in assembly, and I don't know how to read assembly. At the moment I'm trying to figure out the static drive waveform diagram on page 155. I'm not understanding how the number is being generated. Do LCDs need AC to display a character?Are there any resources that you guys know of for this subject? I'm going through a PDF from the microchip website, so hopefully that will help. Thanks.

author: FreeThinker
author_rank: Frequent Contributor
timestamp: June 06, 2011, 07:01:43 am
content: There is a thread that discussed this and a link to some useful pdf's that explain the hardware.https://www.eevblog.com/forum/index.php?topic=1109.msg15783#msg15783Hope this helpsPS This is for the intelligent lcd display (1,2 or 4 lines by up to 40 or even 80 chars/line) generic type 44780, The ones in the data sheet you listed appear to be without a controller on board and as such you will need to write or find a driver for that display. As such they are beyond my knowledge and you are entering the dark woods.... Good Luck!

author: Lance
author_rank: Frequent Contributor
timestamp: June 06, 2011, 03:18:09 pm
content: Quote from: FreeThinker on June 06, 2011, 07:01:43 amYeah, the LCD is actually on a demo board:http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023837It's just got a bunch of symbols and 4 numbers.

author: Leo Bodnar
author_rank: Frequent Contributor
timestamp: June 06, 2011, 07:34:17 pm
content: What are you trying to achieve? Do you have a specific LCD glass datasheet or designing your own glass? If you are looking for a simple 7-segment display, try to use static (non-multiplexed) ones, they are much easier to control and have much higher contrast.This may help with basic techniques:Static:http://www.atmel.com/dyn/resources/prod_documents/doc2569.pdfMultiplexed:http://www.atmel.com/dyn/resources/prod_documents/doc2530.pdf

author: Lance
author_rank: Frequent Contributor
timestamp: June 06, 2011, 11:50:17 pm
content: Quote from: Leo Bodnar on June 06, 2011, 07:34:17 pmIf you see above it's the LCD attached to this demo board:http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023837I'm just trying to make it work. Once I figure all that out I have a small project in mind.

author: FreeThinker
author_rank: Frequent Contributor
timestamp: June 07, 2011, 07:04:14 am
content: Quote from: Lance on June 06, 2011, 11:50:17 pmThe display appears to be a vim 332 dpthis is a dumb lcd display very much like a seven segment led but of course requiring much less power. The pic on board seems to have a port that can be dedicated to driver this type of lcd but not read thoroughly enough to comment more.The vim332 has 4 common lines and a selection of segment lines so that you can form a variety of characters or drive dedicated symbols etc. you will need to create a table of the output characters you want to print to the screen (up to 4 at a time) plus dedicated symbols. The pic may contain such a table and method of addressing, I've no idea, but the data sheet should help. As I said previously you are in the dark woods, an intelligent display is far easier and less processor intensive. In reality the vim332 is only a glorified 7segment display.

author: Leo Bodnar
author_rank: Frequent Contributor
timestamp: June 07, 2011, 08:24:36 am
content: So what exactly are you trying to do?If you are just trying native MC demo to run and it does not, then you need to ask on MC forum or file support ticket.If you are learning LCDs then starting with 1/4 MUX is one of the most complicated startups. Learn static ones (one COM plane.) There are lots of static 7-segment displays.If you are learning this particular IC then datasheet / errata has all the relevant information.If you are learning Assembly, multiplexed LCD is hardly the best place to start. Try blinking few LEDs.Even 1/4 MUX does not need special hardware. I have driven it from ordinary PIC using very high PWM to generate COM-SEG voltage levels.

author: Lance
author_rank: Frequent Contributor
timestamp: June 07, 2011, 09:27:36 am
content: Quote from: FreeThinker on June 07, 2011, 07:04:14 amI have used an LCD that was controlled via serial comm. Is that what's meant by an intelligent LCD?

author: FreeThinker
author_rank: Frequent Contributor
timestamp: June 07, 2011, 03:37:35 pm
content: An intelligent LCD is one with it's own controller on the display like the one's in the pdf's I linked too. They can be serial or 4 or 8 bit parallel. The VIM 332 has no hardware built in and as such all control is done in software or built external to the display in hardware. Once again think 7segment led display, to form a character you must light each segment that forms the image. With an intelligent display you simply send it the CODE of the character and the controller turns on the the relevant segments and controls the cursor etc. As has been said above these dumb displays are a lot of work.

author: FreeThinker
author_rank: Frequent Contributor
timestamp: June 07, 2011, 06:32:32 pm
content: Found the spec sheet for the vim332dphttp://www.varitronix.com/Product/LCD/VIM-332-DP(R0).pdfAs you can see if you check the segment tracking diagram and the table below. As is clear from the diagram and the table to display the ohms symbol you would need to drive lines pin14 and comm4 with the apprpriate voltage. pin14 comm3 would drive the K symbol pin14 comm2 the V symbol or pin14 and comm0 to drive the A symbol. Not rocket science but a bit of a faff on and uses loads of output pins.

author: Lance
author_rank: Frequent Contributor
timestamp: June 07, 2011, 06:36:25 pm
content: Quote from: FreeThinker on June 07, 2011, 03:37:35 pmOkay then. Well for now this LCD is the only one I have to work with.Quote from: FreeThinker on June 07, 2011, 06:32:32 pmI managed to find it as well, looks like fun...

author: FreeThinker
author_rank: Frequent Contributor
timestamp: June 07, 2011, 07:52:25 pm
content: Just one question. Where did you get the dev board? looks like fun if the price is right.

author: Lance
author_rank: Frequent Contributor
timestamp: June 07, 2011, 08:46:28 pm
content: I got it directly from Microchip.

author: Lance
author_rank: Frequent Contributor
timestamp: June 14, 2011, 05:51:19 am
content: Okay, so I've been reading the documentation. Currently I'm trying to figure out the timing diagram in this PDF:http://ww1.microchip.com/...en/AppNotes/00658a.pdfI understand figure 19 on page 13. Segment 1 never turns on because it stays at 0V, and segment 0 is on because it gets to potential +/-V1 relative to segment 0.I'm currently trying to figure out what's going on with figure 20 on page 14. The main thing that's confusing me here is that COM0 doesn't appear to be connected to either SEG0 or SEG1 according to the diagram shown on the page. Is that an error on the diagram, or am I missing something?