Close
0%
0%

Reusing a controllerless LCD Display

Reverse engineering the Hosiden HLM8218 Display from an old photocopier

Similar projects worth following

Some months ago I disassembled an old Ricoh photocopier and I wanted to reuse the 240x320 STN display. I haven't found any libraries to control it so I decided to try to make one looking at the datasheet of a similar display (HLM8619).

The goal is to have the display working and make a port of AdafruitGFX.

HLM8619-010300-HOSIDEN.pdf

Adobe Portable Document Format - 380.54 kB - 04/23/2017 at 07:53

Preview

  • First attempt to drive the LCD

    Mati04/23/2017 at 08:27 0 comments

    The screen needs a -18V power supply for the LCD and 5V for the logic, so I'm using one from a DVD player.

    After connecting the power supply, the display resurrected and showed some noise

    The very first arduino code used digitalWrite, it was extremely slow, so after investigating about using the ATMega328 registers I came up with this code:

    #define S_LOW (PORTB&=(~(1<<5)));
    #define S_HIGH (PORTB|=(1<<5));
    #define CP1_LOW (PORTB&=(~(1<<1)));
    #define CP1_HIGH (PORTB|=(1<<1));
    #define CP2_LOW (PORTB&=(~(1<<0)));
    #define CP2_HIGH (PORTB|=(1<<0));
    
    void setup() {
    pinMode(13,OUTPUT); // S
    pinMode(9,OUTPUT); //CP1
    pinMode(8,OUTPUT);//CP2
    
    //Only 2 out of 4 pixels should be drawn
    analogWrite(3,200);
    analogWrite(4,200);
    }
    
    void loop() {
      S_HIGH
      CP1_HIGH
      asm("nop");asm("nop");
      CP1_LOW
      asm("nop");asm("nop");
      S_LOW
      
      for(int y=0;y<240;y++){
        CP1_HIGH
        asm("nop");asm("nop");
        CP1_LOW
        for(int bx=0;bx<80;bx++){//4 pixel block
              CP2_HIGH
              asm("nop");asm("nop");
              //send pixels here
              CP2_LOW
              asm("nop");asm("nop");
        }
      }
    }

    Great, it shows 2 pixels per block as expected, but I need to figure out why some lines are missing (maybe EMI?)

    So that's all for today, next task: Fill the entire screen with pixels and then map an array to the screen.

View project log

Enjoy this project?

Share

Discussions

Wenting Zhang wrote 04/26/2017 at 03:18 point

Looks like a clever trick to use analogWrite! I always use a STM32 to drive such controller-less screens, and generally works fine, I can even use FRC to get 16 shades of greyscale out of these screens. The biggest problem of using a uC like AVR or 51 is that they generally do not even have enough RAM to hold the framebuffer while the screen needs to be refreshed constantly, it would make programming much harder. Great work overall, but using a better uC would make things much easier. 

  Are you sure? yes | no

Mati wrote 04/27/2017 at 22:44 point

Now I have a STM32F4, but I'm not really sure which kind of interface would be easier to use instead of bitbanging the clock and latch, what would you recommend?

  Are you sure? yes | no

Morning.Star wrote 04/23/2017 at 08:45 point

Glad you made some progress. :-)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates