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.

Problem with displaying the output of PIC16F877 on LCD

Status
Not open for further replies.

expert

Member level 2
Joined
Nov 28, 2007
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,626
jhd162a contrast adjustment to ground

i'm using PIC16F877 to construct a LCD.I have check the output of the microchip and it is correct.but why i i cannot display my output on the LCD??

The circuit is shown in:
**broken link removed**
 

Re: LCD???

check your initialization for the LCD **broken link removed**

Edit:
didn't realize you use assembly, can't help you there :-( .
 

Re: LCD???

its fine, anyway still thxs for the source

i forgot to tell tat i'm using the model of LCD i using is "JHD162A"
 

Re: LCD???

hello

maybe u should use this circuit


**broken link removed**
 

Re: LCD???

my circuit connection is same as the circuit that you shown. the only different is i'm using 4MHz crystal and 8-bit interface.

does different crystal affect the operation of LCD?

Added after 23 minutes:

Actually i can display my output on LCD by using simulation software but dunno y cannot display hardware LCD??

anyone can HELP????
 

Re: LCD???

Try shorting the contrast adjustment pin(pin3?) of LCD to ground.
 

Re: LCD???

sashijoseph said:
Try shorting the contrast adjustment pin(pin3?) of LCD to ground.

i have short the contrast adjustment pin(pin3) to ground be4 but still can't work!
is there any other way?
 

Re: LCD???

expert said:
sashijoseph said:
Try shorting the contrast adjustment pin(pin3?) of LCD to ground.
i have short the contrast adjustment pin(pin3) to ground be4 but still can't work!
is there any other way?
The contrast pin should not be shorted to ground. It should be slightly above ground. Use a pot and adjust it.

Cheers

Ravi
 

Re: LCD???

ravimarcus said:
expert said:
sashijoseph said:
Try shorting the contrast adjustment pin(pin3?) of LCD to ground.
i have short the contrast adjustment pin(pin3) to ground be4 but still can't work!
is there any other way?
The contrast pin should not be shorted to ground. It should be slightly above ground. Use a pot and adjust it.

Cheers

Ravi

wat u mean by slightly above ground?
 

Re: LCD???

I am not sure of the voltage but it is around 100mV to 300 mV above ground.

Cheers

Ravi
 

Re: LCD???

ravimarcus said:
I am not sure of the voltage but it is around 100mV to 300 mV above ground.

Cheers

Ravi

thanks for the idea
but is there still other way?
coz i really troubleshoot for arround 2 months but the LCD still can't work.....
 

Re: LCD???

expert said:
my circuit connection is same as the circuit that you shown. the only different is i'm using 4MHz crystal and 8-bit interface.
1. At 4 MHz, there is no need to insert delay.
2. With contrast adjust, you should be able to see all the pixels up to 1st 8 character

Can you post your code? I can check it and let you know.

Cheers

Ravi
 

Re: LCD???

ravimarcus said:
Can you post your code? I can check it and let you know.

Cheers

Ravi

The circuit is shown in:
**broken link removed**
 

Re: LCD???

I have seen your code. There is a mistake in initialization. I am uploading my code. My code is for 4 bits interface. Please change it to suite your 8 bits interface.

Cheers

Ravi
 

Re: LCD???

ravimarcus said:
I have seen your code. There is a mistake in initialization. I am uploading my code. My code is for 4 bits interface. Please change it to suite your 8 bits interface.

Ravi

can u show me which part of the initialization got problem??
but y i can simulate by simulation software??
 

Re: LCD???

expert said:
can u show me which part of the initialization got problem??
but y i can simulate by simulation software??
Function set has to be done 3 times as per the flow chart in the data sheet that I read a long time back.

Simulating in MPLAB or any other simulator will be ok but the LCD module has to be initialized properly.

Cheers

Ravi
 

Re: LCD???

ok, thxs for the information
i will use ur coding to testing on my circuit
hope it can run
thxs!!!
 

Re: LCD???

ravimarcus said:
I have seen your code. There is a mistake in initialization. I am uploading my code. My code is for 4 bits interface. Please change it to suite your 8 bits interface.

Cheers

Ravi

there is alot of error in the coding??
do u simulate be4?
 

Re: LCD???

there is alot of error in the coding??
do u simulate be4?
If you assemble the code as is, it will generate the error. I have given you the routines. You will have to insert it in your file with necessary declarations and modifications.

The code that I have uploaded has been working in most of my products.

Cheers

Ravi
 

Re: LCD???

debounce movlw .5
bra msecond

ms15 movlw .15
bra msecond

msecond movwf temp
my movlw .250
movwf temp1
mx clrwdt
decfsz temp1,same
bra mx
decfsz temp,same
bra my
retlw 00

from the coding, is it a pic language coz there are no ' bra' in pic????
is it should be a 'goto' intruction??????
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top