| ??? 11/21/07 07:52 Read: times |
#147293 - Oops, should have been ANL BA Responding to: ???'s previous message |
Oops
I rewrote the routine so that it should write as it is supposed to do. WRITE_CMD PUSH ACC ;Save A for low nibble MOV B, DATA ; DDDDCCCC ORL B, #0F0h ;bits 7..4 <- 1, clear msn iiiiCCCC ORL A, #007h ;Don't affect bits 0-3, clear lsn 7654oxxx ANL B, A ;High nibble to display 7654oCCC MOV DATA, B CLR RS SETB EN NOP NOP CLR EN POP ACC ;Prepare to send DDDDCCCC SWAP A ; 32107654 MOV B, DATA ; DDDDCCCC ORL B, #0F0h ;bits 7..4 <- 1, clear msn iiiioCCC CLR EN ORL A, #007h ;Don't affect bits 0-3, clear lsn 3210oiii ANL B, A ;low nibble to display 3210oCCC MOV DATA, B CLR RS SETB EN NOP NOP CLR EN ACALL Delay50us RET The CCCC are the control bytes (wich should remain unchanged), DDDD is the old data and 0123 or 4567 is the new data "i" is a logical 1 and "o" is a logical 0. But this doesn't work either... I really do'n know where I messed up. Could anyone help me? Regards |
| Topic | Author | Date |
| 4 bit LCD trouble | 01/01/70 00:00 | |
| Possible Error | 01/01/70 00:00 | |
| DATA is port EN is pin | 01/01/70 00:00 | |
| Initialization | 01/01/70 00:00 | |
| I think I did initialize correct | 01/01/70 00:00 | |
| Logical operations | 01/01/70 00:00 | |
| Oops, should have been ANL BA | 01/01/70 00:00 | |
| Clobbering your data | 01/01/70 00:00 | |
| topic gone?? | 01/01/70 00:00 | |
| code library | 01/01/70 00:00 | |
| Try LCD Tutorial in tutorials section | 01/01/70 00:00 | |
| Tutorial uses 2 ports | 01/01/70 00:00 | |
| previous comments... | 01/01/70 00:00 | |
| All tested an nailed the problem | 01/01/70 00:00 | |
| yes, timing | 01/01/70 00:00 | |
Some code shortening: | 01/01/70 00:00 |



