USB08 eval board problems

Discussion created by ROB LUND on Nov 29, 2007
Latest reply on Nov 29, 2007 by ROB LUND
Hello all, I'm having some very basic issues with my USB08 board.  Here's the sample code I'm trying to get working:

  LED1_DDR = 1;  LED2_DDR = 1;  LED3_DDR = 1;  BUTTON1_DDR = 0;  BUTTON2_DDR = 0;  BUTTON3_DDR = 0;  POCR_PAP = 1;     // turn on Port A pullups  LED1 = ON;  Delay(0x1000);  LED1 = OFF;  LED2 = ON;  Delay(0x1000);  LED2 = OFF;    LED3 = ON;  Delay(0x1000);  LED3 = OFF;  for (;;)  // main loop  {    if (BUTTON1 == CLOSE)   // mode switch depressed—    {      button1_flag = 1;           // button1 successfully pressed      LED1 = ON;    }    else    {      button1_flag = 0;           // button1 successfully released      LED1 = OFF;    }    if (BUTTON2 == CLOSE)   // mode switch depressed–    {      button2_flag = 1;           // button2 successfully pressed      LED2 = ON;    }    else    {      button2_flag = 0;           // button2 successfully released      LED2 = OFF;    }    if (BUTTON3 == CLOSE)   // mode switch depressed˜    {      button3_flag = 1;           // button3 successfully pressed      LED3 = ON;    }    else    {      button3_flag = 0;           // button3 successfully released      LED3 = OFF;    }  } // end for() loop

I define the buttons and LEDs as such:
#define BUTTON1         PTA_PTA4#define BUTTON2         PTA_PTA5#define BUTTON3         PTA_PTA6#define BUTTON1_DDR     DDRA_DDRA4#define BUTTON2_DDR     DDRA_DDRA5#define BUTTON3_DDR     DDRA_DDRA6

#define LED1      PTD_PTD0
#define LED2      PTD_PTD1
#define LED3      PTD_PTD2

#define LED1_DDR  DDRD_DDRD0
#define LED2_DDR  DDRD_DDRD1
#define LED3_DDR  DDRD_DDRD2

 What I'm seeing is that none of the LEDs are working on this board.  I have sample code from the manufacturer that does in fact work, so I know the board is good.  I can program the board with their code and with mine, so that's not an issue.

Also, I can confirm that the Port A pullup register code isn't working.  If I look at the first switch port bit, PTA4 on the scope, it's floating low.  If I hook up my own external pullup resistor, I can see the switch S1 work as expected.  Yet, my LEDs are illuminating.

I have a working clock at OSC2.

It's like this code isn't compiling right.  Any thoughts?