In theory, this should toggle the LED with about 3Hz (1MHz MCLK assumed). BUT Empty while/for loops are no reliable waiting loops. Depending on the optimization, the compiler might as well remove the whole loop, ending in your LED being toggled with ~100kHz. You should at least add a _NOP() in the loop. This will force the compiler to at least generate a construct that will execute the NOP for 50k times, resulting in ~20Hz blink frequency,
JMGross ----- Ursprüngliche Nachricht ----- Von: Andres Vahter An: GCC for MSP430 - http://mspgcc.sf.net Gesendet am: 23 Jul 2010 12:16:29 Betreff: Re: [Mspgcc-users] MSPDebug version 0.9 Hi, Is it possible to program msp430f2234 MCU with EZ430-RF2500 board and mspdebug. EZ430-RF2500 board comes with msp430f2274 MCU and it differs from f2234 only from RAM size as far as I know. I made a led togglerer for f2234, i can upload it, but it doesn't toggle pin. #include "msp430x22x4.h" volatile unsigned int i; int main(void) { WDTCTL = WDTPW + WDTHOLD; P2DIR |= 0x01; for(;;) { P2OUT ^= 0x01; i = 50000; while (i != 0) { i--; } } } for( ; ; ) Daniel, could you confirm that msp430f2234 is supported by mspdebug. Andres