Discussion in "Project Help" started by    nnemdi    Dec 14, 2007.
Thu Jan 03 2008, 07:41 pm
#11
I serious dont have any idea.. why its not working.. just try one more time replace this routine..

;**********************************************************
; Feed Command/Data to the LCD module
;***********************************************************
;***********************************************************
command_byte:
clr p2.0 ; RS low for a command byte.
jmp bdelay
data_byte:
setb p2.0 ; RS high for a data byte.
nop
bdelay:
clr p2.1 ; R/w low for a write mode
setb p2.2 ;enable pulse
nop
clr P2.2 ;enable H->
L
nop
;******************* Check Busy Flag
;mov p1,#0ffh ;configure port1 to input mode
;no need to make all lines 1 just make the bit 7 as inout
setb P1.7
setb p2.1 ;set RW to read
clr p2.0 ;set RS to command
bloop:
clr p2.2 ;generate enable pulse
nop
setb p2.2
nop
;mov a,p1
;anl a,#80h ;check bit#7 busy flag
;cjne a,#00h,bloop;keep waiting until bu
jb P1.7 ,bloop ;jump if P1.7 is 1
;*****************************************
; check busy flag twice
;*****************************************
;bwait:
;clr p2.2 ;generate enable pulse
;nop
;setb p2.2
;nop
;mov a,p1
;anl a,#80h ;check bit#7 busy flag
;cjne a,#00h,bloop;keep waiting until bu
;There is no need of above commented code...
ret
Thu Jan 03 2008, 08:06 pm
#12
i dont know what is wrong with this code..do you think it is the initialisation process??? have you got a different code that i can use????

thanks
Fri Jan 04 2008, 01:59 am
#13
check the lcd library in the download secton... technically your code has to work.. else i have to compile it to look for the problem myself..
 nnemdi like this.
Fri Jan 04 2008, 02:43 am
#14
please can you compile and check it...please...i have been working on this for 3 days straight and i cant see were the problem is....please...because my lcd does not anything...please help me on this..

thank you
Fri Jan 04 2008, 03:09 am
#15
As soon as i get time.. i will do that too.. by the time.. please take a close look at the explanation of working of LCD in LCD tutorial.. you must go through it once.. analyze your code and see where you are doing mistake

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am
ktaletrryp
Fri Apr 26 2024, 10:55 pm
Robertrip
Fri Apr 26 2024, 11:20 am