在利用定时器A模拟串口的时候,有这样一个函数
;-----------------------------------------------------------------------------
TX_Byte; Subroutine that will TX Byte from RXTXData Buffer
;-----------------------------------------------------------------------------
TX_1 mov.w &TAR,&CCR0 ; Current state of TA counter
cmp.w &TAR,&CCR0 ; !!Prevent async capature!!
jne TX_1 ;
add.w #Bitime,&CCR0 ; Some time till first bit
mov.w #OUTMOD2+OUTMOD0+CCIE,&CCTL0 ;
TX_Wait bit.w #CCIE,&CCTL0 ; Wait for TX completion
jnz TX_Wait ;
ret ; Return from subroutine
其中
jnz TX_Wait ;
ret ; Return from subroutine
是否有误呢?我认为应当是