Created
February 13, 2011 11:12
-
-
Save wingyplus/824594 to your computer and use it in GitHub Desktop.
lab5 question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ORG 8000H | |
MOV P1, #0FFH | |
MOV DPTR, #0E060H | |
LOOP: JNB P1.0, CHECK0 | |
JNB P1.1, SendData1 | |
JNB P1.2, SendData2 | |
JNB P1.3, SendData3 | |
JMP LOOP | |
CHECK0: JNB P1.1, SendDataE | |
JNB P1.2, SendDataE | |
JNB P1.3, SendDataE | |
JMP SendData0 | |
CHECK1: JNB P1.0, SendDataE | |
JNB P1.2, SendDataE | |
JNB P1.3, SendDataE | |
JMP SendData1 | |
CHECK2: JNB P1.0, SendDataE | |
JNB P1.1, SendDataE | |
JNB P1.3, SendDataE | |
JMP SendData2 | |
CHECK3: JNB P1.1, SendDataE | |
JNB P1.2, SendDataE | |
JNB P1.3, SendDataE | |
JMP SendData3 | |
SendData0: MOV A, #3FH | |
MOVX @DPTR, A | |
CLR P1.4 | |
JMP LOOP | |
SendData1: MOV A, #06H | |
MOVX @DPTR, A | |
CLR P1.5 | |
JMP LOOP | |
SendData2: MOV A, #5BH | |
MOVX @DPTR, A | |
CLR P1.6 | |
JMP LOOP | |
SendData3: MOV A, #4FH | |
MOVX @DPTR, A | |
CLR P1.7 | |
JMP LOOP | |
SendDataE: MOV A, #79H | |
MOVX @DPTR, A | |
CLR P1.4 | |
CLR P1.5 | |
CLR P1.6 | |
CLR P1.7 | |
JMP LOOP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ORG 8000H | |
SETB P1.0 | |
SETB P3.2 | |
LOOP: JNB P1.0, LED0 | |
JB P1.1, LED1 | |
JMP LOOP | |
LED0: SETB P3.2 | |
JMP LOOP | |
LED1: CLR P3.2 | |
JMP LOOP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ORG 8000H | |
SETB P1.0 | |
SETB P3.2 | |
LOOP: JNB P1.0, LEDALL | |
LB P1.0, LEDBLINK | |
JMP LOOP | |
LEDALL: CLR P1.0 | |
JMP LOOP | |
LEDBLINK: CLR P1.0 | |
SETB P1.0 | |
JMP LOOP | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment