Kamis, 20 Juni 2013


$Mod51
org 0h
start: mov P0,#111111110b
call delay
mov P0,#11111100b
call delay
mov P0,#11111000b
call delay
mov P0,#11110000b
call delay
mov P0,#11100000b
call delay
mov P0,#11000000b
call delay
mov P0,#10000000b
call delay
mov P0,#00000000b
call delay
mov P1,#01111111b
call delay
mov P2,#01111111b
call delay
mov P3,#01111111b
call delay
mov P3,#00111111b
call delay
mov P3,#00011111b
call delay
mov P3,#00001111b
call delay
mov P3,#00000111b
call delay
mov P3,#00000011b
call delay
mov P3,#00000001b
call delay
mov P3,#00000000b
call delay
mov P2,#11111110b
call delay
mov P1,#11111110b
call delay
mov P2,#11111110b
call delay
sjmp start
delay:mov r1,#225
delay1:mov R2,#255
delay2:mov r3,#20
delay3:djnz R3,delay3
djnz R2,delay2
djnz R1,delay1
ret
end
                    

0 komentar:

Posting Komentar