Saturday, November 29, 2014

SOLAR TRACKING PANEL



/* SOLAR TRACKING SYSTEM*/










ORG 0H
ACALL LCDSTART
ACALL DISPLAY
MOV R0,#11H
ACALL STARTMOTOR

LCDSTART: MOV A,#38H
ACALL CMD
ACALL DELAY
MOV A,#0EH
ACALL CMD
ACALL DELAY
MOV A,#01H
ACALL CMD
ACALL DELAY
MOV A,#06H
ACALL CMD
ACALL DELAY
RET

DISPLAY: MOV A,#83H
ACALL CMD
ACALL DELAY
MOV A,#'S'
ACALL DATAWRT
ACALL DELAY
MOV A,#'O'
ACALL DATAWRT
ACALL DELAY
MOV A,#'L'
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'R'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'T'
ACALL DATAWRT
ACALL DELAY
MOV A,#'R'
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'C'
ACALL DATAWRT
ACALL DELAY
MOV A,#'K'
ACALL DATAWRT
ACALL DELAY
MOV A,#'I'
ACALL DATAWRT
ACALL DELAY
MOV A,#'N'
ACALL DATAWRT
ACALL DELAY
MOV A,#'G'
ACALL DATAWRT
ACALL DELAY
MOV A,#0C7H
ACALL CMD
ACALL DELAY
MOV A,#'S'
ACALL DATAWRT
ACALL DELAY
MOV A,#'Y'
ACALL DATAWRT
ACALL DELAY
MOV A,#'S'
ACALL DATAWRT
ACALL DELAY
MOV A,#'T'
ACALL DATAWRT
ACALL DELAY
MOV A,#'E'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#9DH
ACALL CMD
ACALL DELAY
MOV A,#'B'
ACALL DATAWRT
ACALL DELAY
MOV A,#'Y'
ACALL DATAWRT
ACALL DELAY
MOV A,#0D9H
ACALL CMD
ACALL DELAY
MOV A,#'C'
ACALL DATAWRT
ACALL DELAY
MOV A,#'S'
ACALL DATAWRT
ACALL DELAY
MOV A,#'E'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'S'
ACALL DATAWRT
ACALL DELAY
MOV A,#'E'
ACALL DATAWRT
ACALL DELAY
MOV A,#'C'
ACALL DATAWRT
ACALL DELAY
MOV A,#'-'
ACALL DATAWRT
ACALL DELAY
MOV A,#'B'
ACALL DATAWRT
ACALL DELAY
RET

STARTMOTOR: MOV A,#01H
ACALL CMD
ACALL DELAY
MOV A,#82H
ACALL CMD
ACALL DELAY
MOV A,#'S'
ACALL DATAWRT
ACALL DELAY
MOV A,#'O'
ACALL DATAWRT
ACALL DELAY
MOV A,#'L'
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'R'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'T'
ACALL DATAWRT
ACALL DELAY
MOV A,#'R'
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'C'
ACALL DATAWRT
ACALL DELAY
MOV A,#'K'
ACALL DATAWRT
ACALL DELAY
MOV A,#'E'
ACALL DATAWRT
ACALL DELAY
MOV A,#'D'
ACALL DATAWRT
ACALL DELAY
MOV R5,#0DH
BACK: MOV A,R0
MOV P3,A
       MOV R0,A
ACALL DELAY1
MOV A,#9AH
ACALL CMD
ACALL DELAY
MOV A,#'6'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY

MOV A,#33H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'7'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY

MOV A,#22H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'8'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY

MOV A,#66H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'9'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY

MOV A,#44H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'1'
ACALL DATAWRT
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY

MOV A,#88H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'1'
ACALL DATAWRT
ACALL DELAY
MOV A,#'1'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY

MOV A,#11H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'1'
ACALL DATAWRT
ACALL DELAY
MOV A,#'2'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'N'
ACALL DATAWRT
ACALL DELAY
MOV A,#'O'
ACALL DATAWRT
ACALL DELAY
MOV A,#'O'
ACALL DATAWRT
ACALL DELAY
MOV A,#'N'
ACALL DATAWRT
ACALL DELAY


MOV A,#33H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#'1'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'P'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY


MOV A,#22H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#'2'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'P'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY

MOV A,#66H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#'3'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'P'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY

MOV A,#44H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#'4'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'P'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY


MOV A,#88H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#'5'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'P'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY

MOV A,#11H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#'6'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'P'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY








RET




CMD: MOV P0,A
CLR P2.0
CLR P2.1
SETB P2.2
ACALL DELAY
CLR P2.2
RET
DATAWRT: MOV P0,A
SETB P2.0
CLR P2.1
SETB P2.2
ACALL DELAY
CLR P2.2
RET


DELAY: MOV R7,#0FFH
LOOP2: MOV R6,#0FFH
LOOP1: DJNZ R6,LOOP1
DJNZ R7,LOOP2
RET

DELAY1: MOV R1,#0FFH
BACK3: MOV R2,#50H
BACK2: MOV R3,#50H
BACK1: DJNZ R3,BACK1
DJNZ R2,BACK2
DJNZ R1,BACK3
RET

END









No comments:

Post a Comment