Edward Maduskuie

Hi lost error messages

Discussion created by Edward Maduskuie on Apr 14, 2013
Latest reply on Apr 22, 2013 by Monica Arvizu


I must admit I Amy very lost. In my assignment write to do the following.

  1. Initialize an array with binary numbers 0 to 9. Use a “for loop” to display each array element on the Tower LEDs and have a one-second delay between each display. Define all of the variables as unsigned character. The delay should use inline assembly language.



void main(void)  {

char  dam[10];= {0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39};  // sets the array in decimal 0-9

           unsigned char z;

        DDRB = 0xFF;

         for(z=0;z<10;z++);          // z is going to count the numbers in the array which is 10

         PORTB = dam[z] ;

          DDRT = 0xff;                // should go out to the tower through DDRT to the leds

        delay(1000);                    a delay of about 1 sec for the light on and delay for 1 sec before the next trun on

        PTT= 0x30;


          PTT = dam[z];      




Thats no big deal for most people but after 3 1/2 days to write it i'm in trouble . The red line has been giving error C2801 '}' missing . If anyone cord help a lot of thanks will go very far