ORG 0F000h main mov.w #280h,SP ; Stackpointer mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT mov.b #0,&P6OUT mov.b #$FF,&P6DIR mov.w #TASSEL_0+TACLR+TAIE+MC_2,&TACTL ; clockselect, Clear TAR mov.w #CM_1+CAP+CCIE,&TACCTL0 ; capture on rising edge mov.w #CM_1+CAP+CCIE,&TACCTL2 ; capture on rising edge bis.w #GIE,SR ; enable interrupts Mainloop ; mov #WDTPW+WDTCNTCL,&WDTCTL jmp Mainloop ; *************************************** ; ********** Empfangsinterrupt ********** ; *************************************** TimerA_Interrupt mov.b #$0,&P6OUT nop mov.b #$FF,&P6OUT reti ; *************************************** ; ********** Interruptvektoren ********** ; *************************************** ORG 012Eh ; Interruptvektor TimerA DW TimerA_Interrupt ORG 0FFFEh ; MSP430 RESET Vector DW main END