*********************************初始化部分
LDAA #$90
STAA TSCR1 ;Enable the main timer
LDAA #$01 ;Set the rising endge for PT0
STAA TCTL4
LDD #$0000
STD PACN10
LDAA #$40 ;Enable the PACB
STAA PBCTL
CLI
LDD #60000 ;load the value for timer
STD MCCNT
LDAA #$07
STAA TSCR2
LDAA #$F7 ;Set the MDC.Interrupt enable;Set the mode for onece
STAA MCCTL ;Return the present value while read;MDC enable;16div
*****************************中断部分
INTT0:
LDX PACN10
STX $1004
LDD #$0000
STD PACN10
LDD #60000
STD MCCNT
LDAA #$01
RTI
******************
用这两句来读取,可是读不到数据,老大帮我看看是不是程序那里有错,我怀疑是中断没有产生
LDX PACN10
STX $1004 |