Other Parts Discussed in Thread: MSP430F2002
I have altered the Flashing the LED example code to flash a LED connected to the port P2.6. I can toggle all the 1.x ports, but not the 2.x ports....
I am using the MSP430F2002, have specified this in the Projects>Options...> Target.
An ideas as to what I am doing wrong???
Here's the file:
#include "msp430.h"
;-------------------------------------------------------------------------------
ORG 0FC00h ; Progam Start (1K Flash device)
;-------------------------------------------------------------------------------
RESET mov.w #0280h,SP ; Set stackpointer (128B RAM device)
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop watchdog timer
SetupP1 bis.b #000h,&P1DIR ; Set P1.0 to input direction
bis.b #00h,&P2SEL ; Set P2.x to output
SetupP2 bis.b #0F0h,&P2DIR ; Set P2.6,2.7 to output direction
Mainloop xor.b #0FFh,&P2OUT ; Toggle P2.6
Wait mov.w #050000,R15 ; Delay to R15
L1 dec.w R15 ; Decrement R15
jnz L1 ; Delay over?
jmp Mainloop ; Again
;
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
ORG 0FFFEh ; MSP430 RESET Vector
DW RESET ;
END