• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

write a programe for lcd

Status
Not open for further replies.

girgis adly

New Member
dear all i want to write a program for lcd screen using pic i want to appear in the screen :
(if you want to run the programe press 1
if you want to exit press 2)
how can i write that using micro C
and from where i can get information about that
please help
thanks
 

girgis adly

New Member
thanks for replay

Here's Nigel's tutorial it is very well done.
PIC Tutorial* Three - LCD Modules
You might want to shorte your input commands if your using a 16 character display...
Possibly to just Run press 1 <----13 characters
Exit press 2 <--- 14 characters
i will see this tutorial but i want to ask what the most common type of lcd screen?
and if i can to use the lcd screen to draw the output voltage will appear in the load in the circuit ?
 

be80be

Well-Known Member
What chip are you going to use microC has a sample for how to use a LCD This code from MicroC
Look at it I removed the chip set up so you'll have to look at The LCD module to see what pins to use for your LCD Should be easy to get to work.
Code:
/*
 
 * Set the port you want to use for four bit Lcd
 * Test configuration:
     MCU:             PIC16Fxxx //set for your chip
     
     Oscillator:       xxxx MHz //set for your Oscillator
     Ext. Modules:    LCD 2x16
     SW:              mikroC v6.0
 * NOTES:
     None.  // this is a redid of microC test code just removed what would mess you up
*/

char *text = "Your text here";

void main() {
  LCD_Init(&PORTD);         // Initialize LCD connected to PORTB

  LCD_Cmd(LCD_CLEAR);       // Clear display
  LCD_Cmd(LCD_CURSOR_OFF);  // Turn cursor off
  LCD_Out(1,1, text);       // Print text to LCD, 2nd row, 1st column
  Delay_ms(1000);
  LCD_Out(2,6,"TextHereTo");
}//~!
 
Last edited:
Status
Not open for further replies.

EE World Online Articles

Loading
Top