Probleme mit 9833

Gast #1332196
Lesenswert?

hallo leute, ich habe probleme mit dem 9833.
Ich bekommen KEIN Signal angezeigt.
kann mir jmd. weiterhelfen?
prog im anhang...

mfg








#include <avr/io.h>
#include <stdlib.h>



#include <util/delay_basic.h>


unsigned char x;




void warte(unsigned char zahl)            //warteschleife. warte ist 
100µsek. * zahl

{


  do
  {
    _delay_loop_1(0x00AA);
     --zahl;                  //1 von der Variable Zahl abziehen...





  }
   while (zahl >0);              // solange zahl > 0

}






int main(void)
{
  DDRD = 0xff;
  DDRB = 0xff;
  DDRA = 0x00;
  PORTD |= (1<<PD7) ; // FSYNC HIGH
  while(1)
  {

    while (PINA & (1<<PA1));
    {
      while (!(PINA  &(1<<PA1))) ;
      {

////////////////////////////CONFIG////////////////////////////////////// 
//////
        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 0
        warte(30);
        PORTD &=~(1<<PD7); // FSYNC LOW
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 1
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 2
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 3
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 4
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 5
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 6
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 7
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN  8
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 9
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 10
        warte(30);
        PORTD &=~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 11
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN  12
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 13
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 14
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 15
        warte(30);
        PORTD &= ~(1<<PD6);
        warte(10);
        PORTD |= (1<<PD7) ; // FSYNC HIGH


///////////////////////////FREQUENZ-0/////////////////////////////////// 
///////////

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 0
        PORTD &=~(1<<PD7); // FSYNC LOW
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN  1
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 2
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN   3
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN   4
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN  5
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN  6
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN  7
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN  8
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN  9
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN  10
        warte(30);
        PORTD &=~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN  11
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN  12
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN  13
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN  14
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 15
        warte(30);
        PORTD &= ~(1<<PD6);
        warte(10);
        PORTD |= (1<<PD7) ; // FSYNC HIGH

/////////////////////////////CONFIC///////////////////////////////////// 
//

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 0
        warte(30);
        PORTD &=~(1<<PD7); // FSYNC LOW
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 1
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 2
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 3
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 4
        warte(30);
        PORTD &= ~(1<<PD6);




        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 5
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 6
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 7
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 8
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 9
        warte(30);
        PORTD &= ~(1<<PD6);



        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 10
        warte(30);
        PORTD &=~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 11
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN  12
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 13
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 14
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 15
        warte(30);
        PORTD &= ~(1<<PD6);
        warte(10);
        PORTD |= (1<<PD7) ; // FSYNC HIGH

///////////////////////////PHASE-0////////////////////////////////////// 
//

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 0
        warte(30);
        PORTD &=~(1<<PD7); // FSYNC LOW
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 1
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 2
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 3
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 4
        warte(30);
        PORTD &= ~(1<<PD6);




        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 5
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 6
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 7
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 8
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 9
        warte(30);
        PORTD &= ~(1<<PD6);



        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 10
        warte(30);
        PORTD &=~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 11
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5);   // ZU ÜBERTRAGENDES BIT EINGEBEN  12
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 13
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 14
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD |= (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 15
        warte(30);
        PORTD &= ~(1<<PD6);
        warte(10);
        PORTD |= (1<<PD7) ; // FSYNC HIGH




        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 0
        warte(30);
        PORTD &=~(1<<PD7); // FSYNC LOW
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 1
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 2
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 3
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 4
        warte(30);
        PORTD &= ~(1<<PD6);




        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 5
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 6
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 7
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 8
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 9
        warte(30);
        PORTD &= ~(1<<PD6);



        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 10
        warte(30);
        PORTD &=~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5); // ZU ÜBERTRAGENDES BIT EINGEBEN 11
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN  12
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 13
        warte(30);
        PORTD &= ~(1<<PD6);

        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 14
        warte(30);
        PORTD &= ~(1<<PD6);


        warte(30);
        PORTD |= (1<<PD6);
        warte(30);
        PORTD &=~ (1<<PD5);  // ZU ÜBERTRAGENDES BIT EINGEBEN 15
        warte(30);
        PORTD &= ~(1<<PD6);
        warte(10);
        PORTD |= (1<<PD7) ; // FSYNC HIGH



      }
    }
  }
}

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren