Subversion Repositories DevTools

Rev

Blame | Last modification | View Log | RSS feed

;*******************************************************************************
;   MSP430L092 Demo - BlinkLED
;
;   Description: BlinkLED For L092 Target board using the Boost Converter LEDs
;
;*******************************************************************************
;
;                MSP430L092
;                -----------------
;            /|\|                 |
;             --|RST              |
;               |                 |
;   Boost    -->|P1.2             | 
;               |                 |
;                -----------------
;
;   E. Loeffler
;   Texas Instruments Inc.
;   April 2009
;   Built with Code Composer Studio Version: 4.1.2
;*******************************************************************************
 .cdecls C,LIST,  "msp430l092.h"
;-------------------------------------------------------------------------------
            .text                           ; Assemble to Flash memory
;-----------------------------------------------------------------------------
main
RESET       mov.w   #0x23FF,SP              ; Initialize stackpointer
StopWDT     mov.w   #WDTPW+WDTHOLD,&WDTCTL  ; Stop WDT
           
            mov.w   #CCSKEY,&CCSCTL0        ; open CCS
            mov.w   #SELA__HFCLK+SELS__HFCLK,&CCSCTL4   
            mov.w   #DIVA__4,&CCSCTL5 
            clr     &CCSCTL8
clkok       
            clr     &SFRIFG1
            clr     &CCSCTL7
            bit     #OFIFG, &SFRIFG1
            jnz      clkok
            
            bis.b   #04h,&P1DIR             ; P1.2 as output
                      
            mov.w   #12000,&TA1CCR0
            mov.w   #CCIE,TA1CCTL0
            mov.w   #TASSEL_1+ID_3+TACLR+MC_1,&TA1CTL
            
            bis.b   #GIE,SR  
loop
            jmp     loop
;------------------------------------------------------------------------------
Timer1 
            xor.b   #04h,&P1SEL1 
            xor.b   #04h,&P1SEL0            ; Toggle ACLK at P1.2
            reti
;------------------------------------------------------------------------------
;           Interrupt Vectors
;------------------------------------------------------------------------------
            .sect   ".reset"                ; MSP430 RESET Vector
            .short  RESET                   ;
            .sect   TIMER1_A0_VECTOR        ; Timer_A0 Vector
            .short  Timer1                  ;
            .end