Microchip | The Embedded Control Solutions Company Register Login
Browse All
atruntime.com
 10 Code Snippets

EA DOGM132 SPI Graphic LCD driver

atruntime.com

Serial Graphic LCD allows you to communicate with your MCU with a few pins. Check the video below. This SPI Graphic LCD does not have text mode so I had to create the definition of every character. For now, this driver only support capital letters and numbers. In this video even the cursor blinking had to be implemented! Pretty simple, right? Are you in need of a no expensive coder?

About this Code Example

#include "p30f3014.h"
#include "GraphicLCD.h"

const unsigned char ATRUNTIME_LOGO[132][4]={
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00011100,0b00111100,0b00000000,0b00011100},
{0b00011100,0b01111110,0b01110000,0b00011100},
{0b00011100,0b01111111,0b00111000,0b00011100},
{0b00011100,0b01110011,0b00111000,0b00011100},
{0b00011100,0b01110011,0b00111000,0b00011100},
{0b00011100,0b01110011,0b00111000,0b00011100},
{0b00011100,0b00111011,0b00111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11110000,0b00011100},
{0b00011100,0b01111111,0b11100000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b00011111,0b11111111,0b00011100},
{0b00011100,0b00111111,0b11111111,0b10011100},
{0b00011100,0b01111111,0b11111111,0b10011100},
{0b00011100,0b01110000,0b00111000,0b00011100},
{0b00011100,0b01110000,0b00111000,0b00011100},
{0b00011100,0b01110000,0b00111000,0b00011100},
{0b00011100,0b01110000,0b00111000,0b00011100},
{0b00011100,0b01110000,0b00111000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b00000000,0b01110000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b00000000,0b11111000,0b00011100},
{0b00011100,0b00000000,0b11110000,0b00011100},
{0b00011100,0b00000000,0b11100000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00011111,0b11111000,0b00011100},
{0b00011100,0b00111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01110000,0b00000000,0b00011100},
{0b00011100,0b01110000,0b00000000,0b00011100},
{0b00011100,0b01110000,0b00000000,0b00011100},
{0b00011100,0b00111000,0b00000000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b00000000,0b01110000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11110000,0b00011100},
{0b00011100,0b01111111,0b11100000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b00011111,0b11111111,0b00011100},
{0b00011100,0b00111111,0b11111111,0b10011100},
{0b00011100,0b01111111,0b11111111,0b10011100},
{0b00011100,0b01110000,0b00111000,0b00011100},
{0b00011100,0b01110000,0b00111000,0b00011100},
{0b00011100,0b01110000,0b00111000,0b00011100},
{0b00011100,0b01110000,0b00111000,0b00011100},
{0b00011100,0b01110000,0b00111000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b01110000,0b00111000,0b00011100},
{0b00011100,0b01110000,0b00111000,0b00011100},
{0b00011100,0b01110000,0b00111001,0b10011100},
{0b00011100,0b01111111,0b11111001,0b10011100},
{0b00011100,0b01111111,0b11111001,0b10011100},
{0b00011100,0b01111111,0b11111001,0b10011100},
{0b00011100,0b01110000,0b00000000,0b00011100},
{0b00011100,0b01110000,0b00000000,0b00011100},
{0b00011100,0b01110000,0b00000000,0b00011100},
{0b00011100,0b01110000,0b00000000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b00000000,0b01110000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11110000,0b00011100},
{0b00011100,0b00000000,0b01110000,0b00011100},
{0b00011100,0b00000000,0b00111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11111000,0b00011100},
{0b00011100,0b01111111,0b11110000,0b00011100},
{0b00011100,0b00000000,0b00000000,0b00011100},
{0b00011100,0b00001111,0b11000000,0b00011100},
{0b00011100,0b00011111,0b11100000,0b00011100},
{0b00011100,0b00111111,0b11110000,0b00011100},
{0b00011100,0b01111011,0b01111000,0b00011100},
{0b00011100,0b01110011,0b00111000,0b00011100},
{0b00011100,0b01110011,0b00111000,0b00011100},
{0b00011100,0b01110011,0b00111000,0b00011100},
{0b00011100,0b01110011,0b01111000,0b00011100},
{0b00011100,0b01110011,0b11110000,0b00011100},
{0b00011100,0b00111011,0b11110000,0b00011100},
{0b00011100,0b00000011,0b11000000,0b00011100},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000},
{0b00000000,0b00000000,0b00000000,0b00000000}
}; 

void main(void)
{
InitLCD();
DrawString("HELLO WORD!",0); //NOTE: IT ONLY SUPPORTS CAPITAL LETTERS FOR NOW
DrawString("0123456789      ",1); 
DrawString("ATRUNTIME     ",2);
DrawString(" -+*=!?              ",3);
sw_delay(100000); //wait a moment, then display atruntime logo
DrawImage(ATRUNTIME_LOGO);
while(1);
}

Video

Categories

Release History

  • Feb 7, 2012

    Version: 1.0.0

    first release

Download Contact the Developer

*Required Fields


  • Current Version:1.0.0
  • Created:Feb 7, 2012
  • Updated:Feb 26, 2015
  • Downloads:6909
  • MPLAB Version:8.83
  • C Compiler:C30,C18,C32
  • Development Tools:ICD-3
  • Supported Devices:PIC18F,DSPIC30F,PIC24F

Corporate News

Resources

Stay Connected

Stay up to date with the latest news from Microchip Technology.