| ??? 08/08/01 07:36 Read: times |
#13910 - RE: 8051 test code |
a simple program, blinks p3.4, change the loops to change the blinking speed. may need a different include file
$MOD52 ; use 8052 predefined symbols LED EQU P3.4 ; P3.4 is LED ORG 00h BLINK: CPL LED ;flash (complement) the LED CALL DELAY ; call software delay JMP BLINK ; repeat indefinately DELAY: ; delay 100ms MOV R7,#200 ; 200 * 500us = 100ms DLY1: MOV R6,#229 ; 229 * 2.17us = 500us DJNZ R6,$ ; sit here for 500us DJNZ R7,DLY1 ; repeat 200 times (100ms delay) RET END |
| Topic | Author | Date |
| 8051 test code | 01/01/70 00:00 | |
| RE: 8051 test code | 01/01/70 00:00 | |
| RE: 8051 test code | 01/01/70 00:00 | |
| RE: 8051 test code | 01/01/70 00:00 | |
RE: 8051 test code | 01/01/70 00:00 |



