【文章內(nèi)容簡(jiǎn)介】
為A相和B相(即圖中的0和1)。3. 閱讀該程序,并添加注釋(下面為了保存原版程序,打開程序的一個(gè)副本進(jìn)行修改):添加注釋后的源代碼如下:。 這是一個(gè)輸出控制的例子。 它向虛擬的I/O端口輸出值。 以控制步進(jìn)電機(jī)。 d:\emu8086\devices\ 在7號(hào)端口start=name steppermake_binsteps_before_direction_change = 20h 。 十進(jìn)制的32jmp start。 ========= 數(shù)據(jù) ===============。 二進(jìn)制的數(shù)據(jù)用以控制步進(jìn)電機(jī)。 順時(shí)針以半步循環(huán)方式(半個(gè)步距角)轉(zhuǎn)動(dòng):datcw db 0000_0110b 。BCCABBBC db 0000_0100b db 0000_0011b db 0000_0010b。 二進(jìn)制的數(shù)據(jù)用以控制步進(jìn)電機(jī)。 逆時(shí)針以半步循環(huán)方式(半個(gè)步距角)轉(zhuǎn)動(dòng):datccw db 0000_0011b 。ABABCBAB db 0000_0001b db 0000_0110b db 0000_0010b。 二進(jìn)制的數(shù)據(jù)用以控制步進(jìn)電機(jī)。 順時(shí)針以整步循環(huán)方式(一個(gè)步距角)轉(zhuǎn)動(dòng):datcw_fs db 0000_0001b 。AABBC0A db 0000_0011b db 0000_0110b db 0000_0000b。 二進(jìn)制的數(shù)據(jù)用以控制步進(jìn)電機(jī)。 逆時(shí)針以整步循環(huán)方式(一個(gè)步距角)轉(zhuǎn)動(dòng):datccw_fs db 0000_0100b 。CBC