Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 03, 2016, 12:33:36 12:33


Login with username, password and session length


Pages: [1]
Print
Author Topic: Need Help for LCD Driver  (Read 1490 times)
0 Members and 1 Guest are viewing this topic.
Sepiroth
Newbie
*
Offline Offline

Posts: 27

Thank You
-Given: 5
-Receive: 6


« on: April 05, 2010, 03:53:43 15:53 »

Hi all,
I'm trying to drive a 4x20 LCD with KS0066 chipset using a PIC18F6520 & HiTech PICC18 9.63 Pro. I've connected control and data pins on the same port (PORTF, 7-4 Data, 3 Rs 2 Rw 1 En 0 Backlight) of the pic. So far I've managed to get LCD to work, but whenever I reset PIC, it doesnt display at all. After resetting second time, it works, so its like its randomly working (something like works every 7 out of 10 resets). What may cause the problem? I've attached the lcd driver that im using. Thanks in advance,
Logged

-sepiroth >_>
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 3816

Thank You
-Given: 567
-Receive: 2049


There is no evidence that I muted SoNsIvRi


« Reply #1 on: April 05, 2010, 04:06:14 16:06 »

I only use C when made to, but 10ms to let things settle down is a bit low. your starting pic and jumping to LCD, try 100ms delay at start up. (200ms would be better)
here is start up for lcd in proton sample
Code:
       ' SET UP LCD 4-bit Interface
        LCD_DTPin = PORTC.0
LCD_RSPin = PORTC.5
LCD_ENPin = PORTC.4
LCD_Interface = 4     ' 4-bit Interface
LCD_Lines = 2
LCD_Type = 0
LCD_CommandUs = 2000
LCD_DataUs = 50
« Last Edit: April 05, 2010, 04:10:03 16:10 by pickit2 » Logged

Note: If you have no posts other than, I want or reporting a dead link Then you can't complain If I remove your post So Stop Leeching
Sepiroth
Newbie
*
Offline Offline

Posts: 27

Thank You
-Given: 5
-Receive: 6


« Reply #2 on: April 05, 2010, 04:19:25 16:19 »

Hi again,
I'm using a 10MHz xtal with PLL to make it 40MHz, at the main code i already put a 250ms delay, after that i try to init lcd. what makes me crazy is, if i increase the delay, it crashes, if i decrease the delay time, it crashes again, thats where i stucked tbh:') i
Logged

-sepiroth >_>
TomJackson69
V.I.P
Active Member
*****
Offline Offline

Posts: 221

Thank You
-Given: 23
-Receive: 63


« Reply #3 on: April 12, 2010, 07:43:11 19:43 »

Sepiroth,

Is your program works now?
Still need help? If so, post your complete program or at least your main function.
Also the LCD part number or made.

Tom
Logged

Con Rong Chau Tien
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC