Hello list, I am programming some assembly for the MSP430F1611 chip
(specfically the one thats on  tmote-sky sensors). I am trying out the
msp430-gcc examples and I am trying to toggle Port 5.4 periodically as
illustrated in the software toggle example. Unfortunately the
following code does not work at all when I flash the device and I was
hoping someone might have some insight as to why as I am fairly sure
I'm going insane between rereading the docs and the code :)

            .section    .text
RESET:
StopWDT:    mov.w   #WDTPW+WDTHOLD,&WDTCTL  ; Stop WDT
SetupP1:
            bis.b   #0x05, &P5DIR            ; P5.4  output
            bis.b   #0x06, &P5DIR            ; P5.5  output
            bis.b   #0x07, &P5DIR            ; P5.6  output
            mov.b   #llo(0xFFFF), &P5OUT     ; Toggle off P5
Mainloop:
            xor.b   #0x10, &P5OUT            ; Toggle P5.4
Wait:       mov.w   #16000, R15             ; Delay to R15
L1:         dec.w   R15                             ; Decrement R15
            jnz     L1                                   ; Delay over?
            jmp     Mainloop                       ; Again

;------------------------------------------------------------------------------
;           Interrupt Vectors Used MSP530x13x/14x
;------------------------------------------------------------------------------
            .section    .vectors
            .org    0x1E,0xFF                     ; MSP530 RESET Vector
            .word   RESET

Thanks!
Ali

Reply via email to