Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] lcd programming interface with pic18f4550

Status
Not open for further replies.

deepum

Newbie level 4
Newbie level 4
Joined
Mar 25, 2014
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
39
in LCD interfacing with pic18f4550 microcontroller how to do changes in program when 4 bit data lines (c18 compiler) used. pls someone assist me..

thanks in advance
 

For 4 bit Data you have to make Bit Shifting to the Original 8 Data Lines Function,
Basically by the INSTRUCTIONS that are used for sending Data to LCD, are assumed to be sent over 8-Data Lines so when you make a function like
HTML:
LCD_8data(unsigned char rts)
{
// instructions //
}
now modified for 4 data
LCD_4data(unsigned char rt)
{
// Make BIT shift by 4 bit // /*here*/
// that DATA is to be shifted here //
}
 

can you tel something same with example??
for example
Code:
// write a data byte to LCD
int lcdPutchar(int d)
{
//    printf("%c", d);
	LCDstatus.RS=1; 				// Take RS pin high for data
	lcdNibble(d >>4);     		    // Makeup Upper Nibble
	lcdNibble(d);		            // Makeup Lower Nibble
    return 1;
}
where LCDnibble Writes a nibble (4 bits) to the LCD
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top