Hi Mark,

On Wed, Nov 27, 2002 at 09:31:08AM -0500, Mark Stokes wrote:
> // Define CPU Type
> #define __MSP430_449__

just a hint: don't define __MSP430_xxx__, the compiler already does
that. Check http://mspgcc.sourceforge.net/doc_appendixA.html

> void wait(void)          //delay function
> {
>   volatile int i;        //declare i as volatile int
>   for(i=0;i<32000;i++);  //repeat 32000 times
> }

that is one mistake... mspgcc detects that it is dead-code, and will do
nothing, so it cuts the loop out of your program. Even if declared as
volatile.

check http://mspgcc.sourceforge.net/doc_appendixE.html for delay loop
instructions.

Reply via email to