basic microcontroller interfacing circuits and programs
lcd interfacing with 89c52..................
; ***********************************************
; * PRAVEEN LABS..... *
; * LCD INTERFACING *
; ***********************************************
ORG 0000H ; RESET ENTRY POINT
;;;;;;;;;;;; LCD PROG..... ;;;;;;;;;;;;;;;;;;;;;;
MAIN:
MOV A,#38H
ACALL COMMAND1
MOV A,#0EH
ACALL COMMAND1
MOV A,#06H
ACALL COMMAND1
MOV A,#0CH
ACALL COMMAND1
MOV A,#01H
ACALL COMMAND1
;;;;;;;;;; DISPLAY POINT ;;;;;;;;;;
ACALL DELAY
MOV A,#80H
ACALL COMMAND1
MOV DPTR,#DATA0
ACALL PASS_DATA1
ACALL DELAY
MOV A,#0C0H
ACALL COMMAND1
MOV DPTR,#DATA1
ACALL PASS_DATA1
ACALL DELAY
ACALL DELAY
SJMP MAIN
;;;;;;;;;;;;DISP COMMANDS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PASS_DATA1:
JUMP1: CLR A
MOVC A,@A+DPTR
ACALL DATA_D1
acall secdel
acall secdel
INC DPTR
CJNE A,#00H,JUMP1
RET
COMMAND1:
ACALL READY1
CLR P2.0
CLR P2.1
SETB P2.2
MOV P0,A
CLR P2.2
RET
DATA_D1:
ACALL READY1
SETB P2.0
CLR P2.1
SETB P2.2
MOV P0,A
CLR P2.2
RET
READY1:
SETB P0.7
CLR P2.0
SETB P2.1
HEX1: CLR P2.2
SETB P2.2
JB P0.7,HEX1
RET
;;;;;;;;;;;;;;; 1 BY 1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SECDEL:
MOV 75H,#0FFH
MOV 76H,#0FFH
HERE8:
DJNZ 75H,HERE8
DJNZ 76H,HERE8
RET
;;;;;;;;;;;;;;;;;;;;; DELAY ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DELAY: MOV 70H,#0FFH
MOV 71H,#0FFH
MOV 72H,#02H
LOOP:
DJNZ 70H,LOOP
DJNZ 71H,LOOP
DJNZ 72H,LOOP
RET
;;;;;;;;;;;;;;; DISPLAY DATA ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DATA0: db "PRAVEEN LABS....",00
DATA1: db " LCD INTERFACING",00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
END
Subscribe to:
Post Comments (Atom)
4 comments:
Awesome post, Holly. Excellent analysis–and definitely something I haven’t seen done before. Looking forward to seeing what comes of this!
This situation is problematic under normal conditions, but becomes downright dangerous when the driver must back upUsed Vans
fabulous post having the explanation about the electrical and electronic.
Electrical Power Transformers
Thanks.....
Nice blog telling us about the Electronics stuff.
Click here for more information on PLC and SCADA Training
Post a Comment