| ??? 04/26/02 01:27 Read: times |
#22164 - RE: LED Problem*** LOOK here **** |
I managed to write the program but can anyone shorten this program????
.org 0000h ljmp main .org 0003h ljmp ext0 .org 0040h main: mov ie, #00h mov DPTR, #2000h setb it0 setb ie.7 setb ie.0 here: sjmp here ext0: inc r3 mov a, #01h movx @DPTR, a mov tmod, #01h mov r2,#14h delay: mov th0, #00h mov tl0, #00h setb tr0 wait: jnb tf0, wait clr tr0 clr tf0 djnz r2, delay mov a, #00h movx @dptr, a cjne r3, #05h, return mov a, #05h movx @dptr, a mov tmod, #01h mov r2,#14h delay2: mov th0, #00h mov tl0, #00h setb tr0 wait2: jnb tf0, wait2 clr tr0 clr tf0 djnz r2, delay2 mov a, #00h movx @dptr, a sjmp return ten: cjne r3, #10, return mov a, #0ah movx @dptr, a mov tmod, #01h mov r2,#14h delay3: mov th0, #00h mov tl0, #00h setb tr0 wait3: jnb tf0, wait3 clr tr0 clr tf0 djnz r2, delay3 mov a, #00h movx @dptr, a return: reti |
| Topic | Author | Date |
| LED Problem | 01/01/70 00:00 | |
| RE: LED Problem | 01/01/70 00:00 | |
| RE: LED Problem | 01/01/70 00:00 | |
| RE: LED Problem | 01/01/70 00:00 | |
| RE: LED Problem | 01/01/70 00:00 | |
RE: LED Problem*** LOOK here **** | 01/01/70 00:00 |



