View previous topic :: View next topic |
Author |
Message |
martines Guest
|
lcd jm162b problem |
Posted: Thu Jul 06, 2006 4:58 am |
|
|
hi all,
i,m newbie so sorry if the question is stupid
i'm trying to start the jm162b(2x16) lcd with pic16f877a (and also i've got 18f458 -tried with it as well) with the integrated lcd.c driver in ccs.
i also tried few modified drivers i found in this forum as well, also tried just to modify the delay time in lcd.c from 15 to 30ms. no luck again :(
- the bars on the first line are always black and thats it
appears that the chip is ks0070b ( sasmsung) ,so if somebody have used this one succesfully pls help with the initialization.
10x in advance
Martin
Bulgaria |
|
|
Ttelmah Guest
|
|
Posted: Thu Jul 06, 2006 6:50 am |
|
|
How are you supplying V5?.
If this is set wrong, you will just see black squares, no matter whether the chip is initialised or not. You need about 0.5v on this line.
Best Wishes |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Jul 06, 2006 11:35 am |
|
|
Post a list of the connections that you have between the LCD pins
and the PIC pins. |
|
|
martines Guest
|
hi |
Posted: Thu Jul 06, 2006 12:31 pm |
|
|
i'm using the pin config from the flex_lcd.c driver
LCD_DB4 PIN_D0
LCD_DB5 PIN_D1
LCD_DB6 PIN_D2
LCD_DB7 PIN_D3
LCD_E PIN_A1
LCD_RS PIN_A3
LCD_RW PIN_A2
at first it didnt work ,what i did was to change the delay time in init_lcd()
from 15 to 30ms and it started; the strange thing is that the initial message "Ready..." appears ok ; but if i try to change even a letter(for example"ready..") and the screen is coming back to black line |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Jul 06, 2006 1:34 pm |
|
|
Things to try:
1. Increase the initial delay to a much larger value, such as 50 ms.
2. Check the +5v power supply. Make sure it stays at a constant +5v.
3. If those two things don't help, then configure the LCD and driver
for Write-only mode. Instructions:
A. Break the connection between the LCD_RW pin and pin A2 on
the PIC.
B. Connect the LCD_RW pin to ground.
C. Don't connect anything to pin A2 on the PIC.
D. In the Flex_lcd.c driver, comment out #define statement for
USE_RW_PIN. Example:
Code: | // #define USE_RW_PIN 1 |
E. Re-compile the program.
F. Re-program the PIC and test it. |
|
|
martines Guest
|
:) |
Posted: Thu Jul 06, 2006 3:04 pm |
|
|
@PCM programmer
10000000 thanks, your the best.
Just the 50ms change did the job
So to save time and labour to everybody else using jm162 lcd (samsung)
the PCM programmer's flex_lcd.c driver is working perfect with minor change in the init part where 15ms should be 50ms.
10x again and best regards.
Martin
Bulgaria |
|
|
|