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.

16*2 LCD and PIC18F4550 interfacing using mikroC compiler

Status
Not open for further replies.

akhter900

Junior Member level 1
Joined
Jun 7, 2009
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,456
lcd mikroc

Hello everybody.....

I am facing some problem to interface the 16*2 LCD (JHD 162A) with PIC 18F4550.
I am using mikroC 8.2.0.0 compiler.

Bellow is the circuit connection and program.
Anybody please check it and help me about this.

The system is not working.

=================
Connection pin
=================
LCD --------------- PIC18F4550
VSS (pin 1) ---------- GND
VDD (pin 2) ---------- +5V
VO (pin 3) ---------- POT (10k)
RS (pin 4) ---------- RD2
P/W (pin 5) ---------- RD3
E (pin 6) --------- GND
D0 -- D3 --------- X (no connection)
D4 -- D7 --------- RD4 -- RD7
=================

=================
Sample code.........
=================
unsigned char *text = "Akhter.";

void main()
{
CMCON |= 0x07;
ADCON1 |= 0x0F;
TRISD = 0x00;

Lcd_Init(&PORTD); // Initialize LCD connected to PORTD
Lcd_Cmd(Lcd_CLEAR); // Clear display
Lcd_Cmd(Lcd_CURSOR_OFF); // Turn cursor off

while(1)
{
delay_ms(1000);
Lcd_Out(1,1,text);
}
}
=================

It shows nothing on the display.
Please help me about this.

Regards,

Akhter
 

lcd 16*2 pins

post complete program
 

mikroc compiler

That is the complete program.
That simple code is not working....on my system.
 

jhd162a pic18f

It works ... at last.
Pin connection is OK... and working very well now.

I just put the following line ...... and reset the Device and Clock (008.000000MHz) again.

OSCCON=0x72; //Oscillator setting for 8MHz

Anyway ...

Thanks to all.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top