scrolling example code for SHARP LCD LS027B4DH01/LS027B7DH01, using AkiSpiLcd library
This is very basic library example to access a graphic LCD LS027B4DH01 or LS027B7DH01
Import libraryAkiSpiLcd
Basic library for SHARP LCD LS027B4DH01/LS027B7DH01
- schematic example1:
- schematic example2:
- example1 photo:
- example2 photo:
- example2 movie (mpeg4 movie):
main.cpp
- Committer:
- k4zuki
- Date:
- 2014-09-15
- Revision:
- 7:c21aaf067f3b
- Parent:
- 6:abfbb8453a70
- Child:
- 8:0aae7dcbd37f
File content as of revision 7:c21aaf067f3b:
#define MBEDSHIELD_050 #include "mbed.h" #include "hogepic.h" #include "AkiSpiLcd.h" /* 1 SCLK D3=p13 2 MOSI D5=p11 3 CS D2=p14 4 DISP enable D5=p22 */ //SPI spi(D12, D11, D13); //AkiSpiLcd LCD(MOSI_, MISO_, SCK_, D2, NC); AkiSpiLcd LCD(D11, D12, D13, D2, D4); DigitalOut myled(LED1); extern const uint8_t hogepic[]; int main() { // uint8_t read[50]; // LCD.ramWriteSingle(51,(uint8_t*)(hogepic+2000),SCREEN0); // LCD.ram_read(LCD.RAMLINE_BASE,read,50); // wait_ms(1); LCD.cls(); // myled=1; while(1) { for(int i=0; i<240; i++) { // LCD.ramReadSingle(i,read,SCREEN0); // LCD.ram2lcd(i,240-i,SCREEN0); LCD.ram2lcd(0,i,SCREEN0); // LCD.directUpdateMulti(i,(240-i),(uint8_t*)(hogepic)); // LCD.directUpdateMulti(0,(i),(uint8_t*)(hogepic+50*(240-i))); } } }