LCD display with PIC16F877A2019 Community Moderator ElectionWhy use pointers?LCD follows commands but doesn't display charactersScrolling text from left to right on a MBED using a LCD displayLCD not working properly with PIC16F877A using mikroc developmentEmbedded C programming: Clearing LCD properly16X2 LCD shield with 4x4 matrix keypadLCD only showing black blocks when built - *** simulation on Proteus works fine ***interfacing pic with lcd screenPrinting top three repeated elements in LCD displayHow to interface Keypad & LCD using 8051 Microcontroller

How to make readers know that my work has used a hidden constraint?

How can I discourage/prevent PCs from using door choke-points?

Do f-stop and exposure time perfectly cancel?

Want to switch to tankless, but can I use my existing wiring?

How is the Swiss post e-voting system supposed to work, and how was it wrong?

"One can do his homework in the library"

Do I need to leave some extra space available on the disk which my database log files reside, for log backup operations to successfully occur?

What is the dot in “1.2.4."

When two POV characters meet

Is King K. Rool's down throw to up-special a true combo?

What happens with multiple copies of Humility and Glorious Anthem on the battlefield?

Coworker uses her breast-pump everywhere in the office

What Happens when Passenger Refuses to Fly Boeing 737 Max?

Running a subshell from the middle of the current command

Is having access to past exams cheating and, if yes, could it be proven just by a good grade?

Humans have energy, but not water. What happens?

How do anti-virus programs start at Windows boot?

Good allowance savings plan?

Best approach to update all entries in a list that is paginated?

What to do when during a meeting client people start to fight (even physically) with each others?

Identifying the interval from A♭ to D♯

If Invisibility ends because the original caster casts a non-concentration spell, does Invisibility also end on other targets of the original casting?

What is the blue range indicating on this manifold pressure gauge?

Potentiometer like component



LCD display with PIC16F877A



2019 Community Moderator ElectionWhy use pointers?LCD follows commands but doesn't display charactersScrolling text from left to right on a MBED using a LCD displayLCD not working properly with PIC16F877A using mikroc developmentEmbedded C programming: Clearing LCD properly16X2 LCD shield with 4x4 matrix keypadLCD only showing black blocks when built - *** simulation on Proteus works fine ***interfacing pic with lcd screenPrinting top three repeated elements in LCD displayHow to interface Keypad & LCD using 8051 Microcontroller










-3















I am new to PIC programming. I am strucked with a task, where i have
to display a letter "A" on LCD when i press a particular switch three times.Please help me if anyone knows. Thanks in advance.










share|improve this question

















  • 1





    The way to go about doing this varies a lot on the exact LCD being used. From there, take a look at the data sheet. It will tell you how to interface with the LCD.

    – Thomas Jager
    Mar 6 at 17:48















-3















I am new to PIC programming. I am strucked with a task, where i have
to display a letter "A" on LCD when i press a particular switch three times.Please help me if anyone knows. Thanks in advance.










share|improve this question

















  • 1





    The way to go about doing this varies a lot on the exact LCD being used. From there, take a look at the data sheet. It will tell you how to interface with the LCD.

    – Thomas Jager
    Mar 6 at 17:48













-3












-3








-3








I am new to PIC programming. I am strucked with a task, where i have
to display a letter "A" on LCD when i press a particular switch three times.Please help me if anyone knows. Thanks in advance.










share|improve this question














I am new to PIC programming. I am strucked with a task, where i have
to display a letter "A" on LCD when i press a particular switch three times.Please help me if anyone knows. Thanks in advance.







c






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 6 at 17:46









shwetshwet

1




1







  • 1





    The way to go about doing this varies a lot on the exact LCD being used. From there, take a look at the data sheet. It will tell you how to interface with the LCD.

    – Thomas Jager
    Mar 6 at 17:48












  • 1





    The way to go about doing this varies a lot on the exact LCD being used. From there, take a look at the data sheet. It will tell you how to interface with the LCD.

    – Thomas Jager
    Mar 6 at 17:48







1




1





The way to go about doing this varies a lot on the exact LCD being used. From there, take a look at the data sheet. It will tell you how to interface with the LCD.

– Thomas Jager
Mar 6 at 17:48





The way to go about doing this varies a lot on the exact LCD being used. From there, take a look at the data sheet. It will tell you how to interface with the LCD.

– Thomas Jager
Mar 6 at 17:48












1 Answer
1






active

oldest

votes


















1














 I used MPLAB X IDE V5.0.





// CONFIG
#pragma config FOSC = EXTRC // Oscillator Selection bits (RC oscillator)
#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config BOREN = OFF // Brown-out Reset Enable bit (BOR disabled)
#pragma config LVP = OFF // Low-Voltage (Single-Supply) In-Circuit Serial Programming Enable bit (RB3 is digital I/O, HV on MCLR must be used for programming)
#pragma config CPD = OFF // Data EEPROM Memory Code Protection bit (Data EEPROM code protection off)
#pragma config WRT = OFF // Flash Program Memory Write Enable bits (Write protection off; all program memory may be written to by EECON control)
#pragma config CP = OFF // Flash Program Memory Code Protection bit (Code protection off)



#include <xc.h>
void command(unsigned char cmd);
void data(unsigned char dat);
void display_string(const char *s);
void delay();

void main(void)

TRISB=0X00;
PORTB=0X00;
TRISE=0X00;
PORTE=0X00;
ADCON1=0X06;// reference the Hyperlink

command(0x01);//clear display
delay();
command(0x0C);//Turn on the display and off cursor blinking
delay();
command(0x05);//increment the cursor after byte each byte written
delay();
command(0x38);//set 8-bit interface
delay();
command(0x80);//set DRAM address
delay();

while(1)

command(0x80);//set DRAM address

display_string("A"); //display A
data('A'); // or dat like A
data(65); // ASCII key A=65








void command(unsigned char cmd)

PORTE=0X04;
PORTB=cmd;
delay();
RE2=0;


void data(unsigned char dat)

PORTE=0X05;
PORTB=data;
delay();
RE2=0;



void display_string(const char *s)

while(*s)
data(*s++);

void delay()

for(int i=0;i<255;i++);



Output






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55029269%2flcd-display-with-pic16f877a%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














     I used MPLAB X IDE V5.0.





    // CONFIG
    #pragma config FOSC = EXTRC // Oscillator Selection bits (RC oscillator)
    #pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)
    #pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
    #pragma config BOREN = OFF // Brown-out Reset Enable bit (BOR disabled)
    #pragma config LVP = OFF // Low-Voltage (Single-Supply) In-Circuit Serial Programming Enable bit (RB3 is digital I/O, HV on MCLR must be used for programming)
    #pragma config CPD = OFF // Data EEPROM Memory Code Protection bit (Data EEPROM code protection off)
    #pragma config WRT = OFF // Flash Program Memory Write Enable bits (Write protection off; all program memory may be written to by EECON control)
    #pragma config CP = OFF // Flash Program Memory Code Protection bit (Code protection off)



    #include <xc.h>
    void command(unsigned char cmd);
    void data(unsigned char dat);
    void display_string(const char *s);
    void delay();

    void main(void)

    TRISB=0X00;
    PORTB=0X00;
    TRISE=0X00;
    PORTE=0X00;
    ADCON1=0X06;// reference the Hyperlink

    command(0x01);//clear display
    delay();
    command(0x0C);//Turn on the display and off cursor blinking
    delay();
    command(0x05);//increment the cursor after byte each byte written
    delay();
    command(0x38);//set 8-bit interface
    delay();
    command(0x80);//set DRAM address
    delay();

    while(1)

    command(0x80);//set DRAM address

    display_string("A"); //display A
    data('A'); // or dat like A
    data(65); // ASCII key A=65








    void command(unsigned char cmd)

    PORTE=0X04;
    PORTB=cmd;
    delay();
    RE2=0;


    void data(unsigned char dat)

    PORTE=0X05;
    PORTB=data;
    delay();
    RE2=0;



    void display_string(const char *s)

    while(*s)
    data(*s++);

    void delay()

    for(int i=0;i<255;i++);



    Output






    share|improve this answer





























      1














       I used MPLAB X IDE V5.0.





      // CONFIG
      #pragma config FOSC = EXTRC // Oscillator Selection bits (RC oscillator)
      #pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)
      #pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
      #pragma config BOREN = OFF // Brown-out Reset Enable bit (BOR disabled)
      #pragma config LVP = OFF // Low-Voltage (Single-Supply) In-Circuit Serial Programming Enable bit (RB3 is digital I/O, HV on MCLR must be used for programming)
      #pragma config CPD = OFF // Data EEPROM Memory Code Protection bit (Data EEPROM code protection off)
      #pragma config WRT = OFF // Flash Program Memory Write Enable bits (Write protection off; all program memory may be written to by EECON control)
      #pragma config CP = OFF // Flash Program Memory Code Protection bit (Code protection off)



      #include <xc.h>
      void command(unsigned char cmd);
      void data(unsigned char dat);
      void display_string(const char *s);
      void delay();

      void main(void)

      TRISB=0X00;
      PORTB=0X00;
      TRISE=0X00;
      PORTE=0X00;
      ADCON1=0X06;// reference the Hyperlink

      command(0x01);//clear display
      delay();
      command(0x0C);//Turn on the display and off cursor blinking
      delay();
      command(0x05);//increment the cursor after byte each byte written
      delay();
      command(0x38);//set 8-bit interface
      delay();
      command(0x80);//set DRAM address
      delay();

      while(1)

      command(0x80);//set DRAM address

      display_string("A"); //display A
      data('A'); // or dat like A
      data(65); // ASCII key A=65








      void command(unsigned char cmd)

      PORTE=0X04;
      PORTB=cmd;
      delay();
      RE2=0;


      void data(unsigned char dat)

      PORTE=0X05;
      PORTB=data;
      delay();
      RE2=0;



      void display_string(const char *s)

      while(*s)
      data(*s++);

      void delay()

      for(int i=0;i<255;i++);



      Output






      share|improve this answer



























        1












        1








        1







         I used MPLAB X IDE V5.0.





        // CONFIG
        #pragma config FOSC = EXTRC // Oscillator Selection bits (RC oscillator)
        #pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)
        #pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
        #pragma config BOREN = OFF // Brown-out Reset Enable bit (BOR disabled)
        #pragma config LVP = OFF // Low-Voltage (Single-Supply) In-Circuit Serial Programming Enable bit (RB3 is digital I/O, HV on MCLR must be used for programming)
        #pragma config CPD = OFF // Data EEPROM Memory Code Protection bit (Data EEPROM code protection off)
        #pragma config WRT = OFF // Flash Program Memory Write Enable bits (Write protection off; all program memory may be written to by EECON control)
        #pragma config CP = OFF // Flash Program Memory Code Protection bit (Code protection off)



        #include <xc.h>
        void command(unsigned char cmd);
        void data(unsigned char dat);
        void display_string(const char *s);
        void delay();

        void main(void)

        TRISB=0X00;
        PORTB=0X00;
        TRISE=0X00;
        PORTE=0X00;
        ADCON1=0X06;// reference the Hyperlink

        command(0x01);//clear display
        delay();
        command(0x0C);//Turn on the display and off cursor blinking
        delay();
        command(0x05);//increment the cursor after byte each byte written
        delay();
        command(0x38);//set 8-bit interface
        delay();
        command(0x80);//set DRAM address
        delay();

        while(1)

        command(0x80);//set DRAM address

        display_string("A"); //display A
        data('A'); // or dat like A
        data(65); // ASCII key A=65








        void command(unsigned char cmd)

        PORTE=0X04;
        PORTB=cmd;
        delay();
        RE2=0;


        void data(unsigned char dat)

        PORTE=0X05;
        PORTB=data;
        delay();
        RE2=0;



        void display_string(const char *s)

        while(*s)
        data(*s++);

        void delay()

        for(int i=0;i<255;i++);



        Output






        share|improve this answer















         I used MPLAB X IDE V5.0.





        // CONFIG
        #pragma config FOSC = EXTRC // Oscillator Selection bits (RC oscillator)
        #pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)
        #pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
        #pragma config BOREN = OFF // Brown-out Reset Enable bit (BOR disabled)
        #pragma config LVP = OFF // Low-Voltage (Single-Supply) In-Circuit Serial Programming Enable bit (RB3 is digital I/O, HV on MCLR must be used for programming)
        #pragma config CPD = OFF // Data EEPROM Memory Code Protection bit (Data EEPROM code protection off)
        #pragma config WRT = OFF // Flash Program Memory Write Enable bits (Write protection off; all program memory may be written to by EECON control)
        #pragma config CP = OFF // Flash Program Memory Code Protection bit (Code protection off)



        #include <xc.h>
        void command(unsigned char cmd);
        void data(unsigned char dat);
        void display_string(const char *s);
        void delay();

        void main(void)

        TRISB=0X00;
        PORTB=0X00;
        TRISE=0X00;
        PORTE=0X00;
        ADCON1=0X06;// reference the Hyperlink

        command(0x01);//clear display
        delay();
        command(0x0C);//Turn on the display and off cursor blinking
        delay();
        command(0x05);//increment the cursor after byte each byte written
        delay();
        command(0x38);//set 8-bit interface
        delay();
        command(0x80);//set DRAM address
        delay();

        while(1)

        command(0x80);//set DRAM address

        display_string("A"); //display A
        data('A'); // or dat like A
        data(65); // ASCII key A=65








        void command(unsigned char cmd)

        PORTE=0X04;
        PORTB=cmd;
        delay();
        RE2=0;


        void data(unsigned char dat)

        PORTE=0X05;
        PORTB=data;
        delay();
        RE2=0;



        void display_string(const char *s)

        while(*s)
        data(*s++);

        void delay()

        for(int i=0;i<255;i++);



        Output







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 1 hour ago









        Reejesh PK

        1101212




        1101212










        answered 16 hours ago









        Sakthivel sockkalingamSakthivel sockkalingam

        414




        414





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55029269%2flcd-display-with-pic16f877a%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

            Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

            Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved