thu gọn như vậy là đúng rồi đó
Thông báo
Collapse
No announcement yet.
Hỗ trợ lập trình cho vi điều khiển dòng 8051
Collapse
X
-
Các bác biên dịch giúp e code ASM này sang file HEX với, e xin cảm ơn:
ORG 0000H
start:
call A
call A
call A
call B
call B
call B
call C
call C
call C
call D
jmp start
A:
mov p0, #11111110b
mov p1, #10011111b
mov p2, #11111001b
call delay
mov p0, #11111101b
call delay
mov p0, #11111011b
call delay
mov p0, #11110111b
call delay
mov p0, #11110111b
mov p1, #11110110b
mov p2, #01101111b
call delay
mov p0, #11111011b
call delay
mov p0, #11111101b
call delay
mov p0, #11111110b
call delay
ret
B:
mov p0, #11111110b
mov p1, #00000000b
mov p2, #00000000b
call delay
mov p0, #11111101b
call delay
mov p0, #11111011b
call delay
mov p0, #11110111b
call delay
mov p0, #11111011b
call delay
mov p0, #11111101b
call delay
ret
C:
mov p0, #00000000b
mov p1, #11110000b
call delay
mov p1, #00001111b
call delay
mov p2, #11110000b
call delay
mov p2, #00001111b
call delay
mov p2, #11110000b
call delay
mov p1, #00001111b
call delay
mov p1, #11110000b
call delay
ret
D:
mov p0, #00000000b
mov p1, #11111111b
mov p2, #11111111b
call delay
mov p1, #11111110b
mov p2, #11111111b
call delay
mov p1, #11111100b
mov p2, #11111111b
call delay
mov p1, #11111000b
mov p2, #11111111b
call delay
mov p1, #11110000b
mov p2, #11111111b
call delay
mov p1, #01110000b
mov p2, #11111111b
call delay
mov p1, #01110000b
mov p2, #11110111b
call delay
mov p1, #01110000b
mov p2, #01110111b
call delay
mov p1, #01110000b
mov p2, #00110111b
call delay
mov p1, #01110000b
mov p2, #00010111b
call delay
mov p1, #01110000b
mov p2, #00000111b
call delay
mov p1, #01110000b
mov p2, #00000110b
call delay
mov p1, #01100000b
mov p2, #00000110b
call delay
mov p1, #01000000b
mov p2, #00000110b
call delay
mov p1, #00000000b
mov p2, #00000110b
call delay
mov p1, #00000000b
mov p2, #00000010b
call delay
mov p1, #00000000b
mov p2, #00000000b
call delay
mov p1, #00100000b
mov p2, #00000000b
call delay
mov p1, #01100000b
mov p2, #00000100b
call delay
mov p1, #01100000b
mov p2, #00000110b
call delay
mov p1, #01100000b
mov p2, #00000111b
call delay
mov p1, #01110000b
mov p2, #00000111b
call delay
mov p1, #01110001b
mov p2, #00000111b
call delay
mov p1, #01110011b
mov p2, #00000111b
call delay
mov p1, #01110111b
mov p2, #00000111b
call delay
mov p1, #01111111b
mov p2, #00000111b
call delay
mov p1, #11111111b
mov p2, #00000111b
call delay
mov p1, #11111111b
mov p2, #00001111b
call delay
mov p1, #11111111b
mov p2, #10001111b
call delay
mov p1, #11111111b
mov p2, #11001111b
call delay
mov p1, #11111111b
mov p2, #11101111b
call delay
mov p1, #11111111b
mov p2, #11111111b
call delay
ret
delay:
mov r1,#2
lap2:
mov r2,#200
lap1:
mov r3,#250
djnz r3,$
djnz r2,lap1
djnz r1,lap2
ret
end
Comment
-
Bác vietlamdt biên dịch giúp e đoạn mã này sang file HEX, bác upload lên Mediafire dưới dạng file.HEX nhé:
ORG 0000H
start:
call A
call A
call A
call B
call B
call B
call C
call C
call C
call D
jmp start
A:
mov p0, #11111110b
mov p1, #10011111b
mov p2, #11111001b
call delay
mov p0, #11111101b
call delay
mov p0, #11111011b
call delay
mov p0, #11110111b
call delay
mov p0, #11110111b
mov p1, #11110110b
mov p2, #01101111b
call delay
mov p0, #11111011b
call delay
mov p0, #11111101b
call delay
mov p0, #11111110b
call delay
ret
B:
mov p0, #11111110b
mov p1, #00000000b
mov p2, #00000000b
call delay
mov p0, #11111101b
call delay
mov p0, #11111011b
call delay
mov p0, #11110111b
call delay
mov p0, #11111011b
call delay
mov p0, #11111101b
call delay
ret
C:
mov p0, #00000000b
mov p1, #11110000b
call delay
mov p1, #00001111b
call delay
mov p2, #11110000b
call delay
mov p2, #00001111b
call delay
mov p2, #11110000b
call delay
mov p1, #00001111b
call delay
mov p1, #11110000b
call delay
ret
D:
mov p0, #00000000b
mov p1, #11111111b
mov p2, #11111111b
call delay
mov p1, #11111110b
mov p2, #11111111b
call delay
mov p1, #11111100b
mov p2, #11111111b
call delay
mov p1, #11111000b
mov p2, #11111111b
call delay
mov p1, #11110000b
mov p2, #11111111b
call delay
mov p1, #01110000b
mov p2, #11111111b
call delay
mov p1, #01110000b
mov p2, #11110111b
call delay
mov p1, #01110000b
mov p2, #01110111b
call delay
mov p1, #01110000b
mov p2, #00110111b
call delay
mov p1, #01110000b
mov p2, #00010111b
call delay
mov p1, #01110000b
mov p2, #00000111b
call delay
mov p1, #01110000b
mov p2, #00000110b
call delay
mov p1, #01100000b
mov p2, #00000110b
call delay
mov p1, #01000000b
mov p2, #00000110b
call delay
mov p1, #00000000b
mov p2, #00000110b
call delay
mov p1, #00000000b
mov p2, #00000010b
call delay
mov p1, #00000000b
mov p2, #00000000b
call delay
mov p1, #00100000b
mov p2, #00000000b
call delay
mov p1, #01100000b
mov p2, #00000100b
call delay
mov p1, #01100000b
mov p2, #00000110b
call delay
mov p1, #01100000b
mov p2, #00000111b
call delay
mov p1, #01110000b
mov p2, #00000111b
call delay
mov p1, #01110001b
mov p2, #00000111b
call delay
mov p1, #01110011b
mov p2, #00000111b
call delay
mov p1, #01110111b
mov p2, #00000111b
call delay
mov p1, #01111111b
mov p2, #00000111b
call delay
mov p1, #11111111b
mov p2, #00000111b
call delay
mov p1, #11111111b
mov p2, #00001111b
call delay
mov p1, #11111111b
mov p2, #10001111b
call delay
mov p1, #11111111b
mov p2, #11001111b
call delay
mov p1, #11111111b
mov p2, #11101111b
call delay
mov p1, #11111111b
mov p2, #11111111b
call delay
ret
delay:
mov r1,#2
lap2:
mov r2,#200
lap1:
mov r3,#250
djnz r3,$
djnz r2,lap1
djnz r1,lap2
ret
end
Comment
Bài viết mới nhất
Collapse
-
Trả lời cho Kiểm tra biến ápbởi lamvu0677nhân tiện cho mình hỏi thêm về cái phần test hipot (cao áp),là để kiểm tra độ bền cách điện giưa các cuộn dây,mà thấy thông số test thường ở mức 4kvac,vậy nếu mấy con fail đó xài bình thường vẫn dduocj phải không ạ,vì điện mình làm gì lên tới mức đó
-
Channel: Điện tử dành cho người mới bắt đầu
10-11-2024, 08:52 -
-
Trả lời cho Kiểm tra biến ápbởi lamvu0677máy đo số vòng thì cty có ,mà nó to quá,tưởng có máy nào gọn gọn bỏ túi được thì tiện hơn,vì đi lại nhiều...
-
Channel: Điện tử dành cho người mới bắt đầu
10-11-2024, 08:47 -
-
bởi tmcodonMình thấy diễn đàn có chuyên mục quảng cáo rồi mà. Bạn đóng góp để mở luồng riêng
-
Channel: Hướng dẫn sử dụng diễn đàn
09-11-2024, 13:36 -
-
bởi Nicole08Xin chào mọi người, tôi đã sử dụng Flashforge Inventor 2 được gần 5 năm và rất hài lòng với nó, nhưng tuần trước đã xảy ra sự cố. Có vẻ như động cơ bước đưa sợi in vào đầu nóng đã bị hỏng. Mọi thứ khác có vẻ ổn trên máy...
-
Channel: Điện tử dành cho người mới bắt đầu
09-11-2024, 12:55 -
Comment