Interfacing 8 bit lcd to keypad using assemley language
Thu Jan 03 2008, 07:41 pm
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
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
thanks
Fri Jan 04 2008, 02:43 am
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
thank you
Fri Jan 04 2008, 03:09 am
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
Powered by e107 Forum System