Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 28, 2024, 02:13:57 14:13


Login with username, password and session length


Pages: [1]
Print
Author Topic: Need Help for LCD Driver  (Read 4161 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, 02:53:43 14: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: 4639

Thank You
-Given: 823
-Receive: 4194


There is no evidence that I muted SoNsIvRi


« Reply #1 on: April 05, 2010, 03:06:14 15: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, 03:10:03 15:10 by pickit2 » Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
Sepiroth
Newbie
*
Offline Offline

Posts: 27

Thank You
-Given: 5
-Receive: 6


« Reply #2 on: April 05, 2010, 03:19:25 15: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
Active Member
***
Offline Offline

Posts: 218

Thank You
-Given: 26
-Receive: 63


« Reply #3 on: April 12, 2010, 06:43:11 18: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