Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/31/99 12:55
Read: times


 
#466 - RE: Look up Table - Code
WRITE: MOV A,#0
MOV R0,#0
MOV DPTR,#TABLE ;point data
;pointer at the
;first line of table

LOOP: MOVC A,@A+DPTR ;the first time
; A <-- 01001000b first line
SETB EN
SETB RS
CLR RW
MOV DATABYTE,A ; databyte maybe
;p0
CLR EN
ACALL WAIT
INC R0 ; r0=r0+1
MOV A,R0 ; A<--R0
CJNE A,#5,LOOP ;continue till
; the end of the table
RET

TABLE: DB 01001000B
DB 01001111B
DB 01001110B
DB 01000100B
DB 01000001B


---------------------
If u use the above routine with the routines and the code about LCD tutorial in this site u will find that it's very simple to use look up tables not only to write data in the lcd but to initialize,clr and many others
Good luck

List of 2 messages in thread
TopicAuthorDate
Look up Table - Code            01/01/70 00:00      
RE: Look up Table - Code            01/01/70 00:00      

Back to Subject List