??? 07/28/05 13:41 Read: times |
#98353 - Whats wrong with 2nd line? Responding to: ???'s previous message |
Thanks for the reply guys, I have been half succesful so far, LCD is working displaying what I want it to (Almost),the problem is this, i want to display data on second line as well but for some reason can not, I am unable to figure out whats wrong or what should I do,I understand almost same kind of post was submitted few days back but solution was suggested in language C, i would be pleased if someone could recommend solution in Assembly,
please advise. Below is the code DB0 EQU P1.0 DB1 EQU P1.1 DB2 EQU P1.2 DB3 EQU P1.3 DB4 EQU P1.4 DB5 EQU P1.5 DB6 EQU P1.6 DB7 EQU P1.7 DATA EQU P1 EN EQU P3.7 RS EQU P3.4 RW EQU P3.5 ORG 00H JMP MAIN MAIN: MOV P1, #00H MOV P3, #00H JMP START START: CALL INITIALISE CALL CLEAR_LCD MOV A,#'H' LCALL WRITE MOV A,#'E' LCALL WRITE MOV A,#'L' LCALL WRITE MOV A,#'L' LCALL WRITE MOV A,#'O' LCALL WRITE CLR RS MOV DATA, #0C0H SETB EN CLR EN LCALL DELAY MOV A, #'J' CALL WRITE JMP LAST WRITE: SETB RS CLR RW MOV DATA, A SETB EN CLR EN CALL DELAY RET CLEAR_LCD: CLR RW CLR RS MOV DATA,#01H SETB EN CLR EN CALL DELAY RET INITIALISE: CLR RW CLR RS MOV DATA, #38H SETB EN CLR EN CALL DELAY CLR RS MOV DATA, #0EH SETB EN CLR EN CALL DELAY CLR RS MOV DATA, #06H SETB EN CLR EN CALL DELAY RET DELAY: MOV R2, #06H LOOP4: MOV R3, #06H LOOP3: MOV R4, #06H LOOP2: MOV R5, #06H LOOP1: DJNZ R5, LOOP1 DJNZ R4, LOOP2 DJNZ R3, LOOP3 DJNZ R2, LOOP4 RET LAST: SJMP LAST END The program code given above does not give any errors in assembler and does display HELLO on top line perfectly fine but as I am trying to display 'J' in bottom line, it simply does not. appreciate your time. regards James |
Topic | Author | Date |
89C2051 and LCD | 01/01/70 00:00 | |
Notes | 01/01/70 00:00 | |
8052 tutorial, ever used? | 01/01/70 00:00 | |
STOP! | 01/01/70 00:00 | |
Nope | 01/01/70 00:00 | |
and read the tutorial - see left column | 01/01/70 00:00 | |
which he clearly states he has done | 01/01/70 00:00 | |
Whats wrong with 2nd line? | 01/01/70 00:00 | |
Works here | 01/01/70 00:00 | |
re: works here | 01/01/70 00:00 | |
Try different cursor position | 01/01/70 00:00 | |
Different Cursor position | 01/01/70 00:00 | |
Whats on screen | 01/01/70 00:00 | |
re: darkish lines | 01/01/70 00:00 | |
Contrast | 01/01/70 00:00 | |
True, | 01/01/70 00:00 | |
Maybe | 01/01/70 00:00 | |
What about this? | 01/01/70 00:00 | |
Strange | 01/01/70 00:00 | |
Ok then try this | 01/01/70 00:00 | |
or maybe this | 01/01/70 00:00 | |
re: or may be this | 01/01/70 00:00 | |
c language ? | 01/01/70 00:00 | |
I think | 01/01/70 00:00 | |
LCD is fine | 01/01/70 00:00 | |
Try this | 01/01/70 00:00 | |
re: Try This | 01/01/70 00:00 | |
Yes it works | 01/01/70 00:00 | |
my flat forehead | 01/01/70 00:00 | |
I agree | 01/01/70 00:00 | |
Or... | 01/01/70 00:00 | |
today | 01/01/70 00:00 | |
PROBLEM SOLVED | 01/01/70 00:00 | |
it was discussed | 01/01/70 00:00 | |
Isn't that because... | 01/01/70 00:00 | |
Glad you got it working | 01/01/70 00:00 | |
Startup delay![]() | 01/01/70 00:00 |