Skip to content

Latest commit

 

History

History
 
 

ls027b7dh01

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Library for the Sharp Memory LCD


Supported models

  • LS027B4DH01, LS027B7DH01, LS027B7DH01A (400 x 240)
  • other Sharp's monochrome displays with slight changes in code (in theory)

Important information

Although the display does not need constant updating, there is a "VCOM inversion signal" that needs to be generated. It is "an alternating signal that prevents DC bias from being built up within the panel", that means a some sort of burn-in will occur if the signal is not supplied to the screen. That signal can either be generated by software (EXTMODE pin = L) or by a dedicated input pin EXTCOMIN (EXTMODE pin = H).

The library contains a definition SMLCD_VCOM_SOFT which is responsible for compilation of functions for software VCOM generation. If EXTMODE pin is pulled/tied to ground, define SMLCD_VCOM_SOFT as any non-zero value and call the SMLCD_ToggleVCOM() function at least once per second. In case when EXTMODE pin pulled to VCC the display will ignore software VCOM generation and SMLCD_VCOM_SOFT can be defined as zero.


Connection

Library needs one SPI port in TX-only mode, which means usage of two wires:

  • CLK - SPI clock
  • MOSI - SPI data output Also it needs two GPIO pins:
  • DISP - enables/disabled screen
  • SCS - chip select (CS) signal for the screen

In case when EXTMODE pin = H, the alternating signal must be supplied to the EXTCOMIN pin. That can be done in many ways (MCU timer, hardware generator, etc.), therefore that matter is out of bounds from this library.


Functions

SMLCD_InitGPIO - initializes GPIO pins initialization (hardware dependent) SMLCD_Init - initializes library internals SMLCD_Clear - sends command to display to clear screen SMLCD_ToggleVCOM - sends command to VCOM toggle SMLCD_Flush - sends content of video buffer to the display SMLCD_Orientation - sets orientation of the display (normal - when FPC directed downwards) LCD_Clear - clears video buffer


NOTE: although this library is quite workable, it still needs some polishing and further development (as well as that manual needs completion and examples).