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
Joined
Mar 25, 2014
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
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
 

embRTS

Full Member level 4
Joined
Sep 8, 2013
Messages
216
Helped
36
Reputation
72
Reaction score
35
Trophy points
28
Location
Bangalore
Activity points
1,209
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 //
}
 

deepum

Newbie level 4
Joined
Mar 25, 2014
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
39
can you tel something same with example??
 

horace1

Advanced Member level 5
Joined
Nov 18, 2008
Messages
2,123
Helped
596
Reputation
1,188
Reaction score
573
Trophy points
1,393
Location
Norwich, UK
Activity points
13,069
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

Top