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
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
add a comment |
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
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
add a comment |
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
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
c
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
add a comment |
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
add a comment |
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
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
edited 1 hour ago
Reejesh PK
1101212
1101212
answered 16 hours ago
Sakthivel sockkalingamSakthivel sockkalingam
414
414
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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