想得到26us的红外载波周期,但输出的实际周期是24.7us,为何,高手帮忙看看:
TCCVAL EQU 220 ;256-220 = 36(52-8*2), 26us/at 4MHz/no prescale
SR_TCC: disi MOV stack_a,a ;Save the value of A, SWAP stack_a SWAPA STATUS ;Save the value of STATUS MOV stack_s,a ;---------------------------------------------------------- mov a,@TCCVAL ;计数器初值 mov TCC,a
LedOn LedOff
TCC_Out: ;---------------------------------------------------------- SWAPA stack_s ;Restore the saved value of STATUS MOV STATUS,a SWAPA stack_a ;Restore the saved value of A clr intf
reti |