Skip to content

Instantly share code, notes, and snippets.

@SaheblalBagwan
Last active July 21, 2016 03:59

Revisions

  1. SaheblalBagwan revised this gist Jul 21, 2016. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions lpc2148_Lcd_4bit_Display_4x20.c
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,12 @@
    #include "lcd.h"
    #include "systemInit.h"

    int main()
    {
    /*Connect RS->P1_16, RW->P1_17, EN->P1_18 and data bus(D4:D7 - P1_24:P1_27)*/
    LCD_SetUp(P1_16,P1_17,P1_18,P_NC,P_NC,P_NC,P_NC,P1_24,P1_25,P1_26,P1_27);
    {
    SystemInit();

    /*Connect RS->P1_16, RW->P1_17, EN->P1_18 and data bus(D4:D7 - P1_20:P1_23)*/
    LCD_SetUp(P1_16,P1_17,P1_18,P_NC,P_NC,P_NC,P_NC,P1_20,P1_21,P1_22,P1_23);
    LCD_Init(4,20);

    LCD_DisplayString("Explore Embedded\n");
  2. SaheblalBagwan created this gist Jul 18, 2016.
    16 changes: 16 additions & 0 deletions lpc2148_Lcd_4bit_Display_4x20.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    #include "lcd.h"
    int main()
    {
    /*Connect RS->P1_16, RW->P1_17, EN->P1_18 and data bus(D4:D7 - P1_24:P1_27)*/
    LCD_SetUp(P1_16,P1_17,P1_18,P_NC,P_NC,P_NC,P_NC,P1_24,P1_25,P1_26,P1_27);
    LCD_Init(4,20);

    LCD_DisplayString("Explore Embedded\n");
    LCD_DisplayString("LCD 4-bit Mode\n");
    LCD_DisplayString("20 x 4 \n");
    LCD_DisplayString(":) :O");

    while(1);

    return (0);
    }