write1: mov a, #0f8h mov hda, a clr a mov lda, a call send1 ;*******相位
mov a, #34h;#20h;#00100000b mov hda, a mov a, fd4 mov lda, a call send1 mov a, #25h;#21h;#00100001b mov hda, a mov a, fd3 mov lda, a call send1 mov a, #36h;#22h;#00100010b mov hda, a mov a, fd2 mov lda, a call send1 mov a, #27h;#23h;#00100011b mov hda, a mov a, fd1 mov lda, a call send1;*******************频率
mov a, #0c0h mov hda, a clr a mov lda, a call send1;******************启动 ret send1: mov a, hda mov senddata, a clr fs1 call dsend mov a, lda mov senddata, a call dsend setb fs1 ret ;******************************** dsend: mov r0, #8 mov a, senddata jxs: rlc a mov sdata1, c nop setb sclk1 nop clr sclk1 djnz r0, jxs ret |