#include "msp430x20x3.h"
;-------------------------------------------------------------------------------
ORG 0F800h ; Program Reset
;-------------------------------------------------------------------------------
RESET mov.w #0280h,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
SetupP1 bis.b #001h,&P1DIR ; P1.0 output
;
;
;
// Function 1 ------------------------------------------------------------------
Counter mov.w #20, R14 ; Set counter (R14) to 10 ON counts
;
Mainloop xor.b #001h,&P1OUT ; Toggle P1.0
Wait mov.w #050000,R15 ; Delay to R15
L1 dec.w R15 ; Decrement R15
jnz L1 ; Finished Time Delay?
dec.w R14 ; Finished Mainloop?
jnz Mainloop ;
;
;
;
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
ORG 0FFFEh ; MSP430 RESET Vector
DW RESET ;
END Mainloop ;