Continue to Site

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.

  • 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.

Wake up LCD !!

Status
Not open for further replies.
hi tt,
I'm sorry I dont use 'C' programming at all.:eek:

i see .....
well, thanks for the advice ...
i will keep on figure out the problem....

By the way...
if PIC has any problem, it wont be able to programmed, right?
 
Last edited:
i see .....

By the way...
if PIC has any problem, it wont be able to programmed, right?

You should be able to read/verify the program within the PIC, why do think it may have a problem.?

BTW: other members are quite upto speed with 'C', they may suggest idea's.
 
You should be able to read/verify the program within the PIC, why do think it may have a problem.?

BTW: other members are quite upto speed with 'C', they may suggest idea's.

Because I'd tried on 2 tests it still behave the same...
well, how am i able to find any C expert here? hehe ..
really thanks ....
 
I was building a simple wattmeter using the schematic as shown here
And the ASM code for PIC16F88 here to drive the JHD162A LCD as well.
(The code is on 4 bits HD44780, but is compatible with KS0066 driver used here.)
However after I'd built the circuit, I found that LCD shows nothing.
And I wonder if I had done something wrong on my code or what, or maybe thay said I need some kind of driver "wake-up" for the LCD module?
Thanks if you can help.

Hi,
I try debug your code in MPLAB IDE+ Proteus it function ok.
When you first power on, you must to see dark block display on LCD, if you can see then wiring PIC<->LCD not correct,if not:

If you follow schematic then just turn pot R1 to 0V then power on again if you still not see block, I think it not enough power for LCD

If you build by PCB supply by **broken link removed** ,the VO pin tire direct to DC+ ,I don't think you would see anything if VO=DC+, try reconnect VO to 0V via resistor (0 to 10K) if you want ligh or dark
Good luck
 
Hi,
I try debug your code in MPLAB IDE+ Proteus it function ok.
When you first power on, you must to see dark block display on LCD, if you can see then wiring PIC<->LCD not correct,if not:

If you follow schematic then just turn pot R1 to 0V then power on again if you still not see block, I think it not enough power for LCD

If you build by PCB supply by **broken link removed** ,the VO pin tire direct to DC+ ,I don't think you would see anything if VO=DC+, try reconnect VO to 0V via resistor (0 to 10K) if you want ligh or dark
Good luck

Well, i guess big possibilities on the power supply as i measured a 9V source turns out to be only 4.8V. I tried diagnostic on it .. however i still face the same problem.... weird~

During diagnostic, i still manage to see the black square.

What is the differences between Vdd and Vss anyway?
 
Well... I am getting a bit twitchy here. :p
I am trying to get these things fixed as soon as possible.
Here, I'd changed the PIC to 16F88 by delete the comment in front of the directive processor...
I recheck my circuit twice and i think there should not be a problem.
However I still facing LCD show nothing.
I searched that JHD 162A is compatible with the HD 44780.
Does it need a wake up on the LCD driver as well?

Well I built it with successfully by the way:
**broken link removed**

However when i planning to burn the HEX file to my PIC, i saw this:
**broken link removed**
May I know the problem on the configuration?

By the way, I'd included all the related files for my project HERE.
Hope I can find someone that can help. Thanks. :)
 
hi tt,
Downloaded your *.rar,,, very slow download for 8.6Mb.

I'll try your asm etc... :rolleyes:


EDIT:
Looked thru the source code.
There is no point in working on a complete program if one part of the hardware is not working.

Look at this short LCD diagnostic code.
It was derived within Oshonsoft and it does work in simulation, I dont have a 16F88 on the shelf.
In the code are the PORTB pin assignments for the LCD, almost the same as yours.
As you are working on a project board it should be a simple matter to re configure the LCD pins on your project board,
DONT change the program to suit your existing wiring.
If the LCD does not work with this simple program I would suggest trying a new LCD.

Lets know what you find.:)
BTW: what are you setting the INTOSC freq too.?
 

Attachments

  • LCD88b.asm
    4.3 KB · Views: 176
Last edited:
hi tt,

I have added OSCCON for 4MHz clock
 

Attachments

  • LCD88c.asm
    4.4 KB · Views: 163
hi tt,
Downloaded your *.rar,,, very slow download for 8.6Mb.

I'll try your asm etc... :rolleyes:


EDIT:
Looked thru the source code.
There is no point in working on a complete program if one part of the hardware is not working.

Look at this short LCD diagnostic code.
It was derived within Oshonsoft and it does work in simulation, I dont have a 16F88 on the shelf.
In the code are the PORTB pin assignments for the LCD, almost the same as yours.
As you are working on a project board it should be a simple matter to re configure the LCD pins on your project board,
DONT change the program to suit your existing wiring.
If the LCD does not work with this simple program I would suggest trying a new LCD.

Lets know what you find.:)
BTW: what are you setting the INTOSC freq too.?

Thanks for the LCD diagnostic code...
I compile it and burn the HEX file exactly into my PIC...
I tried to wire as shown below (is it a comment by the way?)
Code:
; 13: Define LCD_LINES = 2
; 14: Define LCD_CHARS = 16
; 15: 
; 16: Define LCD_BITS = 4
; 17: Define LCD_DREG = PORTB
; 18: Define LCD_DBIT = 0 'low nibble PORTB for 4 data lines
; 19:  'portb,0 = D0
; 20:  'portb,1 = D1
; 21:  'portb,2 = D2
; 22:  'portb,3 = D3

Connection as shown below:
**broken link removed**
All I can see is ....
Yes there is a contrast on the block and yet i see it blinking periodically...
somehow there is alphabet inside but overall just blinking black square ...
 
Last edited:
How about R/W, RS and E line?
RB0 have to go to lcd pin 11
rb1 to 12
and so on
 
Last edited:
How about R/W, RS and E line?
RB0 have to go to lcd pin 11
rb1 to 12
and so on

Thanks for reply ....
I'd connected LCD RS to RB5, LCD RW to ground and LCD E to RB4 as mentioned here:
Code:
; 12: 
; 13: Define LCD_LINES = 2
; 14: Define LCD_CHARS = 16
; 15: 
; 16: Define LCD_BITS = 4
; 17: Define LCD_DREG = PORTB
; 18: Define LCD_DBIT = 0 'low nibble PORTB for 4 data lines
[COLOR="Red"][B]; 19:  'portb,0 = D0
; 20:  'portb,1 = D1
; 21:  'portb,2 = D2
; 22:  'portb,3 = D3[/B][/COLOR]
; 23: 
[COLOR="Red"][B]; 24: Define LCD_RSREG = PORTB
; 25: Define LCD_RSBIT = 5
; 26: 
; 27: Define LCD_EREG = PORTB
; 28: Define LCD_EBIT = 4[/B][/COLOR]
; 29: 
; 30:
 
Last edited:
hi tt
Your dwg wiring is not the same as my code.!
Also did you see my edit ref the OSCCON line,

Code:
; 19:  'portb,0 = D0
; 20:  'portb,1 = D1
; 21:  'portb,2 = D2
; 22:  'portb,3 = D3

Where and how is the Contrast pot connected to the LCD.?
 
Last edited:
hi tt
Your dwg wiring is not the same as my code.!
Also did you see my edit ref the OSCCON line,

Code:
; 19:  'portb,0 = D0
; 20:  'portb,1 = D1
; 21:  'portb,2 = D2
; 22:  'portb,3 = D3

Where and how is the Contrast pot connected to the LCD.?

OK..so I might connect it wrongly here .... Mind to give me advice?
OSCCON line? You mean the one posted as lcd88c.asm?
The contrast pot i can see (with backlight ON) is juz the second line with black square ....
the connection of the pot is as shown at the schematic above.
 
OK..so I might connect it wrongly here .... Mind to give me advice?
OSCCON line? You mean the one posted as lcd88c.asm?
The contrast pot i can see (with backlight ON) is juz the second line with black square ....
the connection of the pot is as shown at the schematic above.

hi,
Its the lcd88c.asm .:)

If the pot is connected as shown, how will it change the contrast.?

I'll post a dwg.
Where are you located.?
 
hi,
Its the lcd88c.asm .:)

If the pot is connected as shown, how will it change the contrast.?

I'll post a dwg.
Where are you located.?

Well.... the contrast is good where it turns black and fade out in another round ...
I stay at Malaysia ...
 
Last edited:
Well.... the contrast is good where it turns black and fade out in another round ...
I stay at Malaysia ...

Hi,
Edited your dwg also attached lcd88d.asm

OK.?:)
 

Attachments

  • LCDcon1.png
    LCDcon1.png
    10.9 KB · Views: 221
  • LCD88d.asm
    4.4 KB · Views: 170
Hi,
Edited your dwg also attached lcd88d.asm

OK.?:)

Thanks ... I will try it once I have my PIC burner back ....
Will post the result in around 3 hours later ...
By the way if the contrast pot functioned like the one i mentioned.... so does it mean it is not necessary to connect to -5V, right?
 
Last edited:
Hi ttbuddy,
Could you check LM2936-3.3 output is 3.3V, I thought the Ic connect wrong way,also seem RB4 not connect to E LCD pin
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top