;74HC164送数据到I/O口 Data0:1011 Data1:0001
SONG:
LDI PDCR ,1111B ;
ldi TEMP ,08H ;
SONG_1:
LDA Data0 ,00H
ADDM Data0 ,00H
LDA Data1 ,00H
ADCM Data1 ,00H
BC SONG_2
SONG_3:
ANDIM PD_OUT ,1101 ;送0到PD.1口
JMP $+2
SONG_2:
ORIM PD_OUT ,0010 ;送1到PD.1口
STA PORTD ,00H;
nop
nop
nop
nop
orim PD_OUT ,0001B;PD.0输出高电平传送PD.1的数据
sta PORTD ,0
nop
nop
nop
nop
andim PD_OUT ,1110B;PD.0输出低电平等待下次传送数据
nop
sbim TEMP ,01H
bnz SONG_1
;数据传送完毕之后是0101 1000和开始的Data0、Data1不一致? |