1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Driving custom LCD glass with a PIC

Discussion in 'Microcontrollers' started by ACharnley, Aug 14, 2017.

  1. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1
    Having not done this before I wanted to ensure I was thinking along the right lines.

    Assuming I have an LCD with 30-40 pins driving segments or graphics I would need to make a custom LCD controller using several banks of AND/OR gates. Is that the right way to do it?

    My display would be similar in complexity to a bicycle computer and I can't see them having 30-40 pins though maybe I'm wrong. Is it normal to specify the logic gates and drop a COB on the back of the LCD?
     
  2. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    ONLINE
    I seem to recall that MicroChip make a number of PIC's with suitable drivers built-in - you might like to check there first?.
     
  3. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1

    Aren't these for driving segment LCD's such as the 2 x 16's and similar?

    Edit: yes they are.

    This answered the question but raises another:

    http://www.embedded.com/design/real...-LCDs-Getting-more-for-less-with-your-display

    One method is multiple common nodes which allows for the OR/AND logic to remain in code.

    My next question is whether PIC's support multiple COM on IO pins. I'm guessing not, but I could use IO pins to drive transistors that ground the returning LCD current to do the same?
     
    Last edited: Aug 15, 2017
  6. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    Last edited: Aug 15, 2017
  7. granddad

    granddad Active Member

    Joined:
    Jan 18, 2015
    Messages:
    762
    Likes:
    76
    Location:
    Worcestershire UK
    As Nigel posted many of the PIC24/dsPIC have LCD segment drivers available , some over 80 , this is not ...
    but the "raw" LCD glass...
    " The Liquid Crystal Display (LCD) driver module generates the timing control to drive a Static or Multiplexed LCD panel and meets low power design requirements including driving the LCD display in sleep mode as well as software contrast control for boosting or dimming."
     
  8. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1
    Not for custom glass though? "38 segment x 8 common LCD display"

    Although there's nothing to say I couldn't have custom LCD glass made and send custom made characters to it. That might work!
     
  9. granddad

    granddad Active Member

    Joined:
    Jan 18, 2015
    Messages:
    762
    Likes:
    76
    Location:
    Worcestershire UK
  10. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1
    OK, so physically how? Assume I have a custom LCD glass with 40 "segments" (or pictures etc), then there has to be an interfacing chip to connect to them. I'm glad I asked!
     
  11. granddad

    granddad Active Member

    Joined:
    Jan 18, 2015
    Messages:
    762
    Likes:
    76
    Location:
    Worcestershire UK
  12. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
  13. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1
    OK, so getting down to it there'll be 6 x 7 digit segments, 4 icons, so multiplexed I make it 7 outputs, 7 commons or 14 pins.

    As I've just learned LCD's need a specific duty cycle to prevent burn out and this is where it'll get tricky. I'm quite the novice when it comes to PIC's but assume the duty cycle must be persistent, i.e not effected by other operations (which the pic will be doing).

    I'll keep reading!
     
    Last edited: Aug 15, 2017
  14. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1
    Thanks be80be, that's exactly what I needed.

    So for sure I need a PIC with integrated LCD driver that'll handle the multiplexing duty cycle. I'll begin looking for the appropriate chip. I take it the built in LCD driver works in async, that I won't have to worry about other operations affecting the duty cycle?
     
  15. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1
    Controlling the LCD is the last part of my puzzle. As I need USB OTG I can't use one of the Microchip's with the LCD controller unless I move to a PIC24 which is far too overkill for the application. I found an aging chip called LC7581X (X being a number representing duty cycle) which looks like it'll fit the bill, but documentation is weak. Am I on the right lines? The alternative is to use 2x PIC18's for the USB OTG & LCD Controller functionality. I've only minimal PIC experience and don't fancy the move to atTiny if I can help it though that might open up options.

    Regards, Andrew
     
  16. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    ONLINE
    Why would you consider moving to a PIC24 'overkill' but consider using two 18F chips? - that sounds more like 'over kill to me' :D

    The PIC24 are nice chips, with lot's of capabilities and loads of memory - and pretty cheap too.
     
    • Like Like x 1
    • Agree Agree x 1
  17. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1
    Undoubtedly, but I need very little of the power or complexity. I'd also prefer a 5.5v capable device as it makes it easier to drive my FET's and the LCD if it's a 5v type.

    My LCD will have 21 segments which begs the question whether to ditch multiplexing. Doing so, I could drive the segments using a larger PIC18 device (i.e PIC18F45K50). I'd have to write my own code to phase the voltage but I can't see a way to vary it for contrast control (other than every pin being a DAC).

    For reference I need;

    ADCx3, GPO x 4, DACx1, Serial, USB

    And for the LCD if I can find a multiplexing chip then an extra serial or i2c whichever said chip uses.
     
  18. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1
    I made a mistake with the OTG requirement, thus I'm looking at a PIC24FJ64GC006 to do USB & LCD.

    I found a LCD multiplexing solution in the PCF8551. I only need to identify the USB client deviceid/vendorid so I still believe the PIC24 is hugely overkill for what I need.
     
  19. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    $4000.00 to start then you keep on paying lol for a deviceid/vendor id of your own Microchip did let you use theirs for free to test with.

     
    Last edited: Aug 27, 2017
  20. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1
    I only need to read the deviceid/vendorid of the attached device and then short the Data +/- lines (it's a 1.2 power output). :)
     
  21. granddad

    granddad Active Member

    Joined:
    Jan 18, 2015
    Messages:
    762
    Likes:
    76
    Location:
    Worcestershire UK
    PIC24 's with LCD segment drive have 5v tolerant pins so the 5v LCD (?) could be done with a 3.3 device with careful design .... The LCD module can be configured in one of three Bias types:
    • Static Bias (Two Voltage Levels: VSS and VDD)
    • 1/2 Bias (Three Voltage Levels: VSS, 1/2 VDD and VDD)
    • 1/3 Bias (Four Voltage Levels: VSS, 1/3 VDD, 2/3 VDD and VDD)
    LCD Bias voltages can be generated with an internal resistor ladder, internal Bias generator or
    external resistor ladder.
     

Share This Page