Author Topic: Figuring Out An LCD Driver  (Read 8106 times)

0 Members and 1 Guest are viewing this topic.

Offline LanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 317
  • Country: 00
  • Resistance if futile if R<1Ohm
Figuring Out An LCD Driver
« on: June 06, 2011, 06:45:49 am »
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.pdf

Note: 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.
« Last Edit: June 06, 2011, 07:01:25 am by Lance »
#include "main.h"
//#include <killallhumans.h>
 

Offline FreeThinker

  • Frequent Contributor
  • **
  • Posts: 791
  • Country: england
  • Truth through Thought
Re: Figuring Out An LCD Driver
« Reply #1 on: June 06, 2011, 07:01:43 am »
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#msg15783
Hope this helps  ;D
PS 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!
« Last Edit: June 06, 2011, 07:27:45 am by FreeThinker »
Machines were mice and Men were lions once upon a time, but now that it's the opposite it's twice upon a time.
MOONDOG
 

Offline LanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 317
  • Country: 00
  • Resistance if futile if R<1Ohm
Re: Figuring Out An LCD Driver
« Reply #2 on: June 06, 2011, 03:18:09 pm »
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#msg15783
Hope this helps  ;D
PS 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!

Yeah, the LCD is actually on a demo board:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023837
It's just got a bunch of symbols and 4 numbers.
#include "main.h"
//#include <killallhumans.h>
 

Offline Leo Bodnar

  • Frequent Contributor
  • **
  • Posts: 803
  • Country: gb
Re: Figuring Out An LCD Driver
« Reply #3 on: June 06, 2011, 07:34:17 pm »
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.pdf
Multiplexed: http://www.atmel.com/dyn/resources/prod_documents/doc2530.pdf
 

Offline LanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 317
  • Country: 00
  • Resistance if futile if R<1Ohm
Re: Figuring Out An LCD Driver
« Reply #4 on: June 06, 2011, 11:50:17 pm »
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.pdf
Multiplexed: http://www.atmel.com/dyn/resources/prod_documents/doc2530.pdf
If 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=en023837
I'm just trying to make it work. Once I figure all that out I have a small project in mind.
#include "main.h"
//#include <killallhumans.h>
 

Offline FreeThinker

  • Frequent Contributor
  • **
  • Posts: 791
  • Country: england
  • Truth through Thought
Re: Figuring Out An LCD Driver
« Reply #5 on: June 07, 2011, 07:04:14 am »
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.pdf
Multiplexed: http://www.atmel.com/dyn/resources/prod_documents/doc2530.pdf
If 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=en023837
I'm just trying to make it work. Once I figure all that out I have a small project in mind.

The display appears to be a vim 332 dp
this 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.
Machines were mice and Men were lions once upon a time, but now that it's the opposite it's twice upon a time.
MOONDOG
 

Offline Leo Bodnar

  • Frequent Contributor
  • **
  • Posts: 803
  • Country: gb
Re: Figuring Out An LCD Driver
« Reply #6 on: June 07, 2011, 08:24:36 am »
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.
 

Offline LanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 317
  • Country: 00
  • Resistance if futile if R<1Ohm
Re: Figuring Out An LCD Driver
« Reply #7 on: June 07, 2011, 09:27:36 am »
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.pdf
Multiplexed: http://www.atmel.com/dyn/resources/prod_documents/doc2530.pdf
If 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=en023837
I'm just trying to make it work. Once I figure all that out I have a small project in mind.

The display appears to be a vim 332 dp
this 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.
I have used an LCD that was controlled via serial comm. Is that what's meant by an intelligent LCD?
#include "main.h"
//#include <killallhumans.h>
 

Offline FreeThinker

  • Frequent Contributor
  • **
  • Posts: 791
  • Country: england
  • Truth through Thought
Re: Figuring Out An LCD Driver
« Reply #8 on: June 07, 2011, 03:37:35 pm »
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.
Machines were mice and Men were lions once upon a time, but now that it's the opposite it's twice upon a time.
MOONDOG
 

Offline FreeThinker

  • Frequent Contributor
  • **
  • Posts: 791
  • Country: england
  • Truth through Thought
Re: Figuring Out An LCD Driver
« Reply #9 on: June 07, 2011, 06:32:32 pm »
Found the spec sheet for the vim332dp  http://www.varitronix.com/Product/LCD/VIM-332-DP(R0).pdf
As 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.
Machines were mice and Men were lions once upon a time, but now that it's the opposite it's twice upon a time.
MOONDOG
 

Offline LanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 317
  • Country: 00
  • Resistance if futile if R<1Ohm
Re: Figuring Out An LCD Driver
« Reply #10 on: June 07, 2011, 06:36:25 pm »
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.
Okay then. Well for now this LCD is the only one I have to work with.

Found the spec sheet for the vim332dp  http://www.varitronix.com/Product/LCD/VIM-332-DP(R0).pdf
As 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.
I managed to find it as well, looks like fun...
#include "main.h"
//#include <killallhumans.h>
 

Offline FreeThinker

  • Frequent Contributor
  • **
  • Posts: 791
  • Country: england
  • Truth through Thought
Re: Figuring Out An LCD Driver
« Reply #11 on: June 07, 2011, 07:52:25 pm »
Just one question. Where did you get the dev board? looks like fun if the price is right.
Machines were mice and Men were lions once upon a time, but now that it's the opposite it's twice upon a time.
MOONDOG
 

Offline LanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 317
  • Country: 00
  • Resistance if futile if R<1Ohm
Re: Figuring Out An LCD Driver
« Reply #12 on: June 07, 2011, 08:46:28 pm »
I got it directly from Microchip.
#include "main.h"
//#include <killallhumans.h>
 

Offline LanceTopic starter

  • Frequent Contributor
  • **
  • Posts: 317
  • Country: 00
  • Resistance if futile if R<1Ohm
Re: Figuring Out An LCD Driver
« Reply #13 on: June 14, 2011, 05:51:19 am »
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.pdf

I 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?
#include "main.h"
//#include <killallhumans.h>
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf