Driving a Controllerless graphic LCD With a PIC32

Wiring Up The Display

This driver ICs need a ladder of voltages to correctly bias the display. The driver datasheet contains irritatingly incomplete information on this. Basically it is wired so that V0 > V12C > V12 > V43 > V43C >V5. The voltages should be evenly spaced except for the difference between V12 and V43 which will determine the display contrast and dictate the required V0 level. I setup my display so that the difference between V12 and V43 was 10 times that of the other differences and needed about 19V at V0. I probably could have gotten away with a lower voltage without any perceivable contrast difference. This display is very low power and did not require buffering. The circuit must ensure that VDD goes live before V0, otherwise damage to the display could result. I once killed an unrelated Hantronix display by blowing that requirement off.

I used a PIC32 mounted to a homemade adapter card and a breadboard to do my testing. I also made a breakout for the FPC connector of the display. Ready made FPC breakouts can be purchased from various places like Fry’s Electronics in the US (Schmartboard), or the Newhaven Display website. See the files section for a hook-up schematic.

Sloppy Breadboard

My breadboard setup. Backlight is on.

Writing the Firmware

Controlling the LCD is actually fairly simple and straightforward. You would never know that, however, from reading a Driver IC datasheet. Not only that, all of the driver IC datasheets have apparently copied each other. Thus, viewing a different data sheet nets you no new information. This is basically how it works:

  1. Each byte of data is clocked in 4 bits at a time, with the high nibble coming first. Data is latched at the falling edge of XCK.
  2. When 30 bytes of data have been clocked in (i.e. XCK has been pulsed 60 times) for 240 columns, you are done with a row. You now pulse LP and do #1 over again.
  3. When you have completed all 160 lines, pull EIO2 (FLM) high, pulse LP, then drop EIO2.
  4. Invert F/R (not pulse!). This is important because a continuous DC bias will ruin the display.
  5. Start over.

With the PIC32 running at 80Mhz, and compiler optimization turned on, the LCD controller code consumer about 7% of the available processing time. I included a idle time checking utility in the sample firmware.

PIC32 idle time while controlling LCD.

PIC32 idle time while controlling LCD.

Setting Up Touch and Putting it together

I am not going to go into detail about how resistive touch works because there are plenty of resources on this. I did write a driver using the PIC32 ADC and you are welcome to examine it. I have uploaded a video demo of the display in action.

Measured Power Consumption:

  • VEE Consumption @ 19V: ~150uA (depends on pixel states)
  • VDD Consumption @ 3,3V: ~80uA
  • Backlight @ 3.3V: 32mA

Related Files:

S6B0796 Row Driver Datasheet

S6B0794 Column Driver Datasheet

Hookup Schematic

MPLAB C32 Firmware Source Code

Pages: 1 2

    • walt
    • August 31st, 2010

    Terrific work! the guy trying to sell these on eBay owes you big-time!

    One question. I could flay and solder the wires on that tiny flat cable, but i sure like the adapter to 0.1 inch pin-out. Did you build or buy it? know where I can obtain one?


      • cafeadmin
      • September 1st, 2010

      I etched it but you can buy them, I mentioned a few places in the article. Here are a few links:

      Newhaven Display
      Seed Studio

      • Pavel Veretennikov
      • December 15th, 2010

      You can get a cheaper one at TPLabs

        • norm
        • April 21st, 2011

        great tplabs was 6 pounds(sorry i dont seem to have the correct char on my kbd) ea with free shipping.
        very reasonable and nice and small also.
        2 of them cost me 17$ and change, i ordered them with the 20pin connector mounted.
        thank you for the tip.

    • Vladimir
    • January 26th, 2011

    For +20 Volt external power?

  1. I’m struggling to repeat your setup, but get only a random flickering lines on the LCD. I suppose you had PROTEUS schematic too. Could you share that?

    P.S. And, BTW, what did you use for +20 power supply?

      • cafeadmin
      • April 5th, 2011

      Sorry, I don’t have a Proteus schematic. Are you talking about simulation? This is not the type of application that spice is typically used for. For the 20 volts I used the variable power supply on my breadboard but you could set up a simple booster with an MC34063. The example in the datasheet should work fine.

    • Lucky
    • April 1st, 2011

    Hello there. You are such a helper. Thanks a lot for sharing this.

    • pproc
    • April 21st, 2011

    Thanks for the info ! Have purchased this lcd and hoping to pair it with s1d13700 controller.
    Could you tell me the pinout (x+,y+,x-,y-) of the touchscreen connector. Assuming the connection pads are on the bottom in the following diagram

    lcd ———1 end of cable

    Thanks !

    • Julio Hector Peralta
    • April 25th, 2011

    Hi, please i need a 20 pins connector and touch connector too , do you have to send me, and a price with shipping include.


    • Simon Ampleman
    • May 29th, 2011

    Thank you for this very nice work!

    I ordered the 20 pins 0.5mm pitch FPC cable.

    Can you tell us the pitch for the 4 pins touch cable?

    Thank you!


    • OKEB
    • October 23rd, 2011

    Hi Guys,

    Can anybody tell me, how readable this LCD if the backlight is not turned on?
    Is it well readable outside?


  2. Really appreciate you sharing this blog article.Really looking forward to read more. Keep writing.

  3. Thank you ,now we need basic info on how to connect to arduino mega please help

  4. I am thankful to this blog giving unique and helpful knowledge about this topic, I read your blog now share great information here. This blog increse my knowledge source .

  5. I am curious to find out what blog system you’re using?
    I’m experiencing some minor security problems with my latest blog and I would like to find something more
    risk-free. Do you have any recommendations?

  6. Wow, awesome blog layout! How long have you been blogging for?
    you make blogging look easy. The overall look of your website is great, as well as the content!

  7. lyqlq3

  8. I just wanted to thank you guys for the series. I go to the site 3-4 times a week to see what’s new out there or perhaps a I’ve always wanted to buy from here, but wasn’t quite sure. After reading all the feedback from customers I decided to join. just like I want to tell you that all the productsd are true. situation I emailed them and they got back to me right away and my Packages arrived a day early. What more could you want? Great site, great service!!!
    cheap louis vuitton bags https://www.louisvuittonsoutlet.com/

  1. No trackbacks yet.