You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Trường ĐH Bà Rịa-Vũng Tàu<br />
Khoa Điện-Điện tử<br />
db<br />
end<br />
0f8h,24h,22h,21h,22h,24h,0f8h,00h<br />
III. Chương trình mẫu:<br />
Chương trình điều khiển điều khiển led ma trận chạy chữ A màu đỏ + xanh.<br />
;===================================================================<br />
;chuong trinh dieu khien led ma tran chay chu A mau do + xanh<br />
;ket noi p0 voi hang cua ma tran<br />
;ket noi p2 cung chieu voi connects dieu khien cot<br />
;===================================================================<br />
dind bit p2.0<br />
dinx bit p2.1<br />
clk bit p2.2<br />
oe bit p2.4<br />
st bit p2.5<br />
clr_ bit p2.6<br />
;======================================<br />
tocdo equ 20h<br />
bd_cot equ 21h<br />
goc equ 40h<br />
dich equ 4dh<br />
;======================================<br />
org 00h<br />
;------------------------------------------ktao_machu<br />
mov 40h,#00h<br />
mov 41h,#00h<br />
mov 42h,#00h<br />
mov 43h,#00h<br />
mov 44h,#00h<br />
mov 45h,#00h<br />
mov 46h,#00h<br />
mov 47h,#00h<br />
mov 48h,#0f8h<br />
mov 49h,#24h<br />
mov 4ah,#22h<br />
mov 4bh,#24h<br />
mov 4ch,#0f8h<br />
mov 4dh,#00h ;dich<br />
mov 4eh,#00h<br />
mov 4fh,#00h<br />
mov 50h,#00h<br />
mov 51h,#00h<br />
mov 52h,#00h<br />
mov 53h,#00h<br />
mov 54h,#00h<br />
;---------------------------------khoi tao 6b595<br />
clr dind<br />
clr dinx<br />
clr clk<br />
setb<br />
clr<br />
oe<br />
st<br />
- 56 - Thực hành Vi xử lý