//OUTPUT /*int ROG=4; int CLK=3; */ //INPUT int VOUT = A0; void setup() { Serial.begin(115200); DDRD = B11111110; DDRC = B00000000; } void loop() { // DUMMY Laeufe: for (int j=0; j<3; j++){ PORTD = B00001000; // ROG=low, clk=high for(int i=0; i<80;i++){ //5us __asm__("nop\n\t"); } PORTD = B00011000; //ROG=high, clk=high for(int i=0; i<48;i++){ //4us __asm__("nop\n\t"); } for (int i=0; i<1065; i++){ PORTD = B00010000; //ROG=high,CLK=low for(int i=0; i<16;i++){ //1us __asm__("nop\n\t"); } PORTD = B00011000; //ROG=high,CLK=high for(int i=0; i<16;i++){ __asm__("nop\n\t"); } } PORTD = B00011000; //ROG=high, clk=high for(int i=0; i<32;i++){ //2us __asm__("nop\n\t"); } } //BEGINN DER MESSUNG PORTD = B00001000; // ROG=low, clk=high for(int i=0; i<80;i++){ __asm__("nop\n\t"); } PORTD = B00011000; //ROG=high, clk=high for(int i=0; i<48;i++){ __asm__("nop\n\t"); } for (int i=0; i<16; i++){ PORTD = B00010000; //ROG=high,CLK=low for(int i=0; i<16;i++){ __asm__("nop\n\t"); } PORTD = B00011000; //ROG=high,CLK=high for(int i=0; i<16;i++){ __asm__("nop\n\t"); } } for (int i=0; i<2048; i++){ PORTD = B00010000; //ROG=high,CLK=low for(int i=0; i<16;i++){ __asm__("nop\n\t"); } PORTD = B00011000; //ROG=high,CLK=high for(int i=0; i<16;i++){ __asm__("nop\n\t"); } Serial.print(analogRead(VOUT)); //Hier muss das Signal ausgelesen werden } for (int i=0; i<6; i++){ PORTD = B00010000; //ROG=high,CLK=low for(int i=0; i<16;i++){ __asm__("nop\n\t"); } PORTD = B00011000; //ROG=high,CLK=high for(int i=0; i<16;i++){ __asm__("nop\n\t"); } } PORTD = B00011000; //ROG=high, clk=high for(int i=0; i<32;i++){ __asm__("nop\n\t"); } }