;******************************************************************************
.cdecls C,LIST, "msp430g2231.h"
;------------------------------------------------------------------------------
.text ; Progam Start
;------------------------------------------------------------------------------
RESET mov.w #0280h,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
SetupP1 bis.b #001h,&P1DIR ; P1.0 output
mov #0000h, r5
mov #0000h, r6
mov #0500h, r12
mov #FFFFh, r13
mov #FFFFh, r14
mov #0100h, r15
add r15,r6
addc #0000,r5
add r14,r6
addc #0000,r5
add r13,r6
addc #0000,r5
add r12,r6
addc #0000,r5
clrc
rrc r5
rrc r6
clrc
rrc r5
rrc r6
;------------------------------------------------------------------------------
; Interrupt Vectors
;------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET ;
.end
Ders: MikroişlemcilerProf. Dr. Bekir Tevfik Akgün