Shop Learn P1 Docs P2 Docs Events
New driver & demo for Sharp memory LCD, LS013B7DH03. — Parallax Forums

New driver & demo for Sharp memory LCD, LS013B7DH03.

Tracy AllenTracy Allen Posts: 6,643
edited 2022-06-16 16:48 in Propeller 1
Attached is a simple spin driver for the 128x128 monochrome micro-power Sharp memory LCD, LS013B7DH03. The driver footprint is relatively small, because it generates fonts and graphs on the fly rather than by updating a full screen buffer. I need it for instrumentation, to show values and graphs, not animations, so it does not have to be terrifically fast or fancy.

Also see looking-for-a-recommendation-on-a-low-power-display-updated-with-results Enjoy. Comments/debuggings welcome.

Updated the files on 10/29. Took out the debugging code and their supporting objects.


  • I've posted a video of the demo.

    It is not as impressive as the much cheaper color TFT or OLED displays, but it does offer the micro power drain even when displaying a reading.

    The small font is kind of ugly. It simply takes every other pixel from the ROM font. I remember there was a thread about how to improve the font, but I can't find it now.

    The code attached to post 1 is revised, debugging code and object removed.

  • Are these daylight-visible ?
  • Yes, daylight, they work best in good lighting. They are comparable with e-paper displays in that respect.
  • Tracy - I am new to using spin, and have been trying to observe data from an A/D (MCP3202) on the display ( New driver & demo for Sharp memory LCD, LS013B7DH03) Your display demo is working , the MCP3202 is displaying correct data on the parallax terminal. But, I'm stuck - Simply can't figure out how to do that task. Spent a lot of time searching thru the Forums, etc
    ANY suggestions or help would be appreciated, thanks John
  • Tracy AllenTracy Allen Posts: 6,643
    edited 2020-03-23 06:13
    You'll have to resolve your result from the MCP3202 into a string and then write it using the Mlcd.drawtext method.

    For an 8-character string in the large font, the usual starting points on the 128x128 panel are 0, 32,64 or 96.

    Here is the concept. Declare an 8-byte array in VAR or DAT, and initialize it either with 8 spaces or with some fixed text. Each time around the loop, convert the numerical value(s) into text to fill in the rest of the string, then call the Drawstring method to write it out. Example follows, to print out two MCP3202 channels on the top two lines, as "mVn=xxxx"
      byte lineBuffer[8]
    PUB main
      bytefill(@lineBuffer, 32, 8).   ' for good measure, fill the buffer with 8 spaces
        result := GetMCPchannel0volts
        ShowString(result, 0).         ' show data from channel 0, 4 digits on the top line (screen location 0)
        result := GetMCPchannel1volts
        ShowString(result, 1).         ' show data for channel 1 on the second line (screen location 32)
    PUB ShowString(what, which) | idx
      lineBuffer[0] := "m"  
      lineBuffer[1] := "V"
      lineBuffer[2] := which+$30.        ' either "0" or "1"
      lineBuffer[3] := "="
      repeat idx from 7 to 4.                ' working backwards, 4 digits, units millivolts
        lineBuffer[idx] := what // 10 + $30    ' pick off the least sig. digit as ascii
        what /= 10                               ' shift
      mlcd.drawtext(32*which, @lineBuffer, mlcd#NORMAL, mlcd#LARGE).  ' large font assumes 8 chars

  • Tracy, any chance this display (LS013B7DH03) can be used with Blocklyprop?
    THANKS John
  • Hi John, Sorry, I don't know how to connect a Spin driver to Blockly. I believe C is the main underlying language, so maybe you'd have to convert the driver to C and then connect it. Maybe someone else can pipe up with how to go about that.

  • ok thanks

Sign In or Register to comment.