1

Тема: AD9281 - двух канальный АЦП 8-bit 28 MSPS

http://forum.rcl-radio.ru/uploads/images/2019/09/6740a42a93914b81812da36a539994f7.png

Данный контент доступен только зарегистрированным пользователям.

http://forum.rcl-radio.ru/uploads/images/2019/09/f2b8aaf0cb6efa476d3221912c84e0a0.png

http://forum.rcl-radio.ru/uploads/images/2019/09/7f66ce9076a5fea74e9466b543b3fa4e.gif


Напряжение входное для АЦП от 0 до 2 В


void setup(){ Serial.begin(9600);
 pinMode(9, OUTPUT);//clock
 pinMode(2, OUTPUT);//select
 TCCR1A = 0x40;TCCR1B = 0x09;OCR1A = 0;// 1/2 F
}

void loop(){
digitalWrite(2,HIGH);
Serial.print("A = ");
Serial.print(PINC);

delay(1000);
digitalWrite(2,LOW);
Serial.print("  B = ");
Serial.println(PINC);
delay(1000);

}

Двухканальный осциллограф

Настройка максимальной амплитуды:

while(i<167){i++;display.drawLine(i-hh, 47-data_A[i]/4,i-hh, 47-data_A[i+1]/4, BLACK);}i=0;
while(i<167){i++;display.drawLine(i-hh, 25-data_B[i]/4,i-hh, 25-data_B[i+1]/4, BLACK);}i=0;

При

data_A[i]/4

- Максимальное входное напряжение 2 В без среза амплитуды, максимальное перегрузочное напряжение 5 В.

При

data_A[i]

- Максимальное входное напряжение 0.5 В без среза амплитуды, максимальное перегрузочное напряжение 5 В.

#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
#include <SPI.h>
  Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);//CLK,DIN,DC,CE,RST |||| VCC +3.3 V , BL ++ 200 OM ++ 3.3 V

  byte pin12 = (1 << 4);
  #define D12_WRITE_HIGH      PORTB |=  pin12 // Устанавливаем бит отвечающий за пин D12 в HIGH, остальные пины не трогаем
  #define D12_WRITE_LOW       PORTB &= ~pin12 // Устанавливаем бит отвечающий за пин D12 в LOW, остальные пины не трогаем
  byte data_A[168],data_B[168],i;
  unsigned long time;
  int hh,h0,h1,x,y,fff,raz,w=1,sek,hold;
  float times;

void setup(){ Serial.begin(9600);
  pinMode(9, OUTPUT);//clock
  pinMode(11,INPUT); ///  +++
  pinMode(10,INPUT); ///  ---
  pinMode(8,INPUT); /// hold
  DDRB  |=  pin12; // select
  TCCR1A = 0x40;TCCR1B = 0x09;OCR1A = 0;// 1/2 F = 8MHz D9
  display.begin();display.clearDisplay();display.display();
  display.setContrast(200); // установка контраста
  display.setTextSize(1);  // установка размера шрифта
  display.setTextColor(BLACK); // установка цвета текста
}

void loop(){
   if(digitalRead(8)==HIGH){hold++;hh=0;if(hold>1){hold=0;}delay(200);}
   if(digitalRead(11)==HIGH&&hold==1){hh++;if(hh>84){hh=84;}delay(200);}
   if(digitalRead(10)==HIGH&&hold==1){hh--;if(hh<0){hh=0;}delay(200);}
   if(digitalRead(11)==HIGH&&hold==0){raz++;hh=0;w=1;if(raz>10){raz=10;}delay(200);}
   if(digitalRead(10)==HIGH&&hold==0){raz--;hh=0;w=1;if(raz<0){raz=0;}delay(200);}
   
   display.clearDisplay();
   
    if(hold==0){ 
       if(times>0.05){i=0;sinn();while(i<167){i++;D12_WRITE_HIGH;data_A[i]=PINC;D12_WRITE_LOW;data_B[i]=PINC;delayMicroseconds(sek);};i=0;}
       if(times==0.05){i=0;sinn();while(i<167){i++;D12_WRITE_HIGH;data_A[i]=PINC;D12_WRITE_LOW;data_B[i]=PINC;}i=0;}
       if(times==0.02){   sinn();pinc();
       }}i=0;
       
  switch(raz){
   case 0: times=50;sek=1900;fff=0;break;
   case 1: times=20;sek=750;fff=0;break;
   case 2: times=10;sek=400;fff=0;break;
   case 3: times=5;sek=200;fff=0;break;
   case 4: times=2;sek=80;fff=0;break;
   case 5: times=1;sek=37;fff=0;break;
   case 6: times=0.5;sek=18;fff=0;break;
   case 7: times=0.2;sek=6;fff=0;break;
   case 8: times=0.1;sek=3;fff=4;break;
   case 9: times=0.05;fff=5;break;
   case 10: times=0.02;fff=10;break;  
   }
   
   setka();
///////////////////////////// ВЫВОД НА ЭКРАН ////////////////////////////////////////   
   display.print(times,3);display.print(" mS ");
   if(hold==1){display.print("HOLD   ");}
   if(hold==0){display.print("AUTO   ");} 


 while(i<167){i++;display.drawLine(i-hh, 47-data_A[i]/4,i-hh, 47-data_A[i+1]/4, BLACK);}i=0;
 while(i<167){i++;display.drawLine(i-hh, 25-data_B[i]/4,i-hh, 25-data_B[i+1]/4, BLACK);}i=0;
   display.display();
 
 
}
void sinn(){
 D12_WRITE_HIGH;while(PINC>10){h0++;if(h0>10000){break;}}h0=0;  
                while(PINC>5){h0++;if(h0>10000){break;}}h0=0;
                while(PINC<10){h1++;if(h1>10000){break;}}h1=0;
              }
void setka(){
 for(x=0;x<83;x=x+26-fff){
 for(y=10;y<47;y=y+4){
   display.drawPixel(x, y, BLACK);}}
}        
void pinc(){
  D12_WRITE_HIGH;data_A[0]=PINC;PINC;D12_WRITE_LOW;data_B[0]=PINC;
  D12_WRITE_HIGH;data_A[1]=PINC;PINC;D12_WRITE_LOW;data_B[1]=PINC;
  D12_WRITE_HIGH;data_A[2]=PINC;PINC;D12_WRITE_LOW;data_B[2]=PINC;
  D12_WRITE_HIGH;data_A[3]=PINC;PINC;D12_WRITE_LOW;data_B[3]=PINC;
  D12_WRITE_HIGH;data_A[4]=PINC;PINC;D12_WRITE_LOW;data_B[4]=PINC;
  D12_WRITE_HIGH;data_A[5]=PINC;PINC;D12_WRITE_LOW;data_B[5]=PINC;
  D12_WRITE_HIGH;data_A[6]=PINC;PINC;D12_WRITE_LOW;data_B[6]=PINC;
  D12_WRITE_HIGH;data_A[7]=PINC;PINC;D12_WRITE_LOW;data_B[7]=PINC;
  D12_WRITE_HIGH;data_A[8]=PINC;PINC;D12_WRITE_LOW;data_B[8]=PINC;
  D12_WRITE_HIGH;data_A[9]=PINC;PINC;D12_WRITE_LOW;data_B[9]=PINC;
  D12_WRITE_HIGH;data_A[10]=PINC;PINC;D12_WRITE_LOW;data_B[10]=PINC;
  D12_WRITE_HIGH;data_A[11]=PINC;PINC;D12_WRITE_LOW;data_B[11]=PINC;
  D12_WRITE_HIGH;data_A[12]=PINC;PINC;D12_WRITE_LOW;data_B[12]=PINC;
  D12_WRITE_HIGH;data_A[13]=PINC;PINC;D12_WRITE_LOW;data_B[13]=PINC;
  D12_WRITE_HIGH;data_A[14]=PINC;PINC;D12_WRITE_LOW;data_B[14]=PINC;
  D12_WRITE_HIGH;data_A[15]=PINC;PINC;D12_WRITE_LOW;data_B[15]=PINC;
  D12_WRITE_HIGH;data_A[16]=PINC;PINC;D12_WRITE_LOW;data_B[16]=PINC;
  D12_WRITE_HIGH;data_A[17]=PINC;PINC;D12_WRITE_LOW;data_B[17]=PINC;
  D12_WRITE_HIGH;data_A[18]=PINC;PINC;D12_WRITE_LOW;data_B[18]=PINC;
  D12_WRITE_HIGH;data_A[19]=PINC;PINC;D12_WRITE_LOW;data_B[19]=PINC; 
  D12_WRITE_HIGH;data_A[20]=PINC;PINC;D12_WRITE_LOW;data_B[20]=PINC;
  D12_WRITE_HIGH;data_A[21]=PINC;PINC;D12_WRITE_LOW;data_B[21]=PINC;
  D12_WRITE_HIGH;data_A[22]=PINC;PINC;D12_WRITE_LOW;data_B[22]=PINC;
  D12_WRITE_HIGH;data_A[23]=PINC;PINC;D12_WRITE_LOW;data_B[23]=PINC;
  D12_WRITE_HIGH;data_A[24]=PINC;PINC;D12_WRITE_LOW;data_B[24]=PINC;
  D12_WRITE_HIGH;data_A[25]=PINC;PINC;D12_WRITE_LOW;data_B[25]=PINC;
  D12_WRITE_HIGH;data_A[26]=PINC;PINC;D12_WRITE_LOW;data_B[26]=PINC;
  D12_WRITE_HIGH;data_A[27]=PINC;PINC;D12_WRITE_LOW;data_B[27]=PINC;
  D12_WRITE_HIGH;data_A[28]=PINC;PINC;D12_WRITE_LOW;data_B[28]=PINC;
  D12_WRITE_HIGH;data_A[29]=PINC;PINC;D12_WRITE_LOW;data_B[29]=PINC;  
  D12_WRITE_HIGH;data_A[30]=PINC;PINC;D12_WRITE_LOW;data_B[30]=PINC;
  D12_WRITE_HIGH;data_A[31]=PINC;PINC;D12_WRITE_LOW;data_B[31]=PINC;
  D12_WRITE_HIGH;data_A[32]=PINC;PINC;D12_WRITE_LOW;data_B[32]=PINC;
  D12_WRITE_HIGH;data_A[33]=PINC;PINC;D12_WRITE_LOW;data_B[33]=PINC;
  D12_WRITE_HIGH;data_A[34]=PINC;PINC;D12_WRITE_LOW;data_B[34]=PINC;
  D12_WRITE_HIGH;data_A[35]=PINC;PINC;D12_WRITE_LOW;data_B[35]=PINC;
  D12_WRITE_HIGH;data_A[36]=PINC;PINC;D12_WRITE_LOW;data_B[36]=PINC;
  D12_WRITE_HIGH;data_A[37]=PINC;PINC;D12_WRITE_LOW;data_B[37]=PINC;
  D12_WRITE_HIGH;data_A[38]=PINC;PINC;D12_WRITE_LOW;data_B[38]=PINC;
  D12_WRITE_HIGH;data_A[39]=PINC;PINC;D12_WRITE_LOW;data_B[39]=PINC;  
  D12_WRITE_HIGH;data_A[40]=PINC;PINC;D12_WRITE_LOW;data_B[40]=PINC;
  D12_WRITE_HIGH;data_A[41]=PINC;PINC;D12_WRITE_LOW;data_B[41]=PINC;
  D12_WRITE_HIGH;data_A[42]=PINC;PINC;D12_WRITE_LOW;data_B[42]=PINC;
  D12_WRITE_HIGH;data_A[43]=PINC;PINC;D12_WRITE_LOW;data_B[43]=PINC;
  D12_WRITE_HIGH;data_A[44]=PINC;PINC;D12_WRITE_LOW;data_B[44]=PINC;
  D12_WRITE_HIGH;data_A[45]=PINC;PINC;D12_WRITE_LOW;data_B[45]=PINC;
  D12_WRITE_HIGH;data_A[46]=PINC;PINC;D12_WRITE_LOW;data_B[46]=PINC;
  D12_WRITE_HIGH;data_A[47]=PINC;PINC;D12_WRITE_LOW;data_B[47]=PINC;
  D12_WRITE_HIGH;data_A[48]=PINC;PINC;D12_WRITE_LOW;data_B[48]=PINC;
  D12_WRITE_HIGH;data_A[49]=PINC;PINC;D12_WRITE_LOW;data_B[49]=PINC;  
  D12_WRITE_HIGH;data_A[50]=PINC;PINC;D12_WRITE_LOW;data_B[50]=PINC;
  D12_WRITE_HIGH;data_A[51]=PINC;PINC;D12_WRITE_LOW;data_B[51]=PINC;
  D12_WRITE_HIGH;data_A[52]=PINC;PINC;D12_WRITE_LOW;data_B[52]=PINC;
  D12_WRITE_HIGH;data_A[53]=PINC;PINC;D12_WRITE_LOW;data_B[53]=PINC;
  D12_WRITE_HIGH;data_A[54]=PINC;PINC;D12_WRITE_LOW;data_B[54]=PINC;
  D12_WRITE_HIGH;data_A[55]=PINC;PINC;D12_WRITE_LOW;data_B[55]=PINC;
  D12_WRITE_HIGH;data_A[56]=PINC;PINC;D12_WRITE_LOW;data_B[56]=PINC;
  D12_WRITE_HIGH;data_A[57]=PINC;PINC;D12_WRITE_LOW;data_B[57]=PINC;
  D12_WRITE_HIGH;data_A[58]=PINC;PINC;D12_WRITE_LOW;data_B[58]=PINC;
  D12_WRITE_HIGH;data_A[59]=PINC;PINC;D12_WRITE_LOW;data_B[59]=PINC;  
  D12_WRITE_HIGH;data_A[60]=PINC;PINC;D12_WRITE_LOW;data_B[60]=PINC;
  D12_WRITE_HIGH;data_A[61]=PINC;PINC;D12_WRITE_LOW;data_B[61]=PINC;
  D12_WRITE_HIGH;data_A[62]=PINC;PINC;D12_WRITE_LOW;data_B[62]=PINC;
  D12_WRITE_HIGH;data_A[63]=PINC;PINC;D12_WRITE_LOW;data_B[63]=PINC;
  D12_WRITE_HIGH;data_A[64]=PINC;PINC;D12_WRITE_LOW;data_B[64]=PINC;
  D12_WRITE_HIGH;data_A[65]=PINC;PINC;D12_WRITE_LOW;data_B[65]=PINC;
  D12_WRITE_HIGH;data_A[66]=PINC;PINC;D12_WRITE_LOW;data_B[66]=PINC;
  D12_WRITE_HIGH;data_A[67]=PINC;PINC;D12_WRITE_LOW;data_B[67]=PINC;
  D12_WRITE_HIGH;data_A[68]=PINC;PINC;D12_WRITE_LOW;data_B[68]=PINC;
  D12_WRITE_HIGH;data_A[69]=PINC;PINC;D12_WRITE_LOW;data_B[69]=PINC;  
  D12_WRITE_HIGH;data_A[70]=PINC;PINC;D12_WRITE_LOW;data_B[70]=PINC;
  D12_WRITE_HIGH;data_A[71]=PINC;PINC;D12_WRITE_LOW;data_B[71]=PINC;
  D12_WRITE_HIGH;data_A[72]=PINC;PINC;D12_WRITE_LOW;data_B[72]=PINC;
  D12_WRITE_HIGH;data_A[73]=PINC;PINC;D12_WRITE_LOW;data_B[73]=PINC;
  D12_WRITE_HIGH;data_A[74]=PINC;PINC;D12_WRITE_LOW;data_B[74]=PINC;
  D12_WRITE_HIGH;data_A[75]=PINC;PINC;D12_WRITE_LOW;data_B[75]=PINC;
  D12_WRITE_HIGH;data_A[76]=PINC;PINC;D12_WRITE_LOW;data_B[76]=PINC;
  D12_WRITE_HIGH;data_A[77]=PINC;PINC;D12_WRITE_LOW;data_B[77]=PINC;
  D12_WRITE_HIGH;data_A[78]=PINC;PINC;D12_WRITE_LOW;data_B[78]=PINC;
  D12_WRITE_HIGH;data_A[79]=PINC;PINC;D12_WRITE_LOW;data_B[79]=PINC;  
  D12_WRITE_HIGH;data_A[80]=PINC;PINC;D12_WRITE_LOW;data_B[80]=PINC;
  D12_WRITE_HIGH;data_A[81]=PINC;PINC;D12_WRITE_LOW;data_B[81]=PINC;
  D12_WRITE_HIGH;data_A[82]=PINC;PINC;D12_WRITE_LOW;data_B[82]=PINC;
  D12_WRITE_HIGH;data_A[83]=PINC;PINC;D12_WRITE_LOW;data_B[83]=PINC;
  D12_WRITE_HIGH;data_A[84]=PINC;PINC;D12_WRITE_LOW;data_B[84]=PINC;
  D12_WRITE_HIGH;data_A[85]=PINC;PINC;D12_WRITE_LOW;data_B[85]=PINC;
  D12_WRITE_HIGH;data_A[86]=PINC;PINC;D12_WRITE_LOW;data_B[86]=PINC;
  D12_WRITE_HIGH;data_A[87]=PINC;PINC;D12_WRITE_LOW;data_B[87]=PINC;
  D12_WRITE_HIGH;data_A[88]=PINC;PINC;D12_WRITE_LOW;data_B[88]=PINC;
  D12_WRITE_HIGH;data_A[89]=PINC;PINC;D12_WRITE_LOW;data_B[89]=PINC;  
  D12_WRITE_HIGH;data_A[90]=PINC;PINC;D12_WRITE_LOW;data_B[90]=PINC;
  D12_WRITE_HIGH;data_A[91]=PINC;PINC;D12_WRITE_LOW;data_B[91]=PINC;
  D12_WRITE_HIGH;data_A[92]=PINC;PINC;D12_WRITE_LOW;data_B[92]=PINC;
  D12_WRITE_HIGH;data_A[93]=PINC;PINC;D12_WRITE_LOW;data_B[93]=PINC;
  D12_WRITE_HIGH;data_A[94]=PINC;PINC;D12_WRITE_LOW;data_B[94]=PINC;
  D12_WRITE_HIGH;data_A[95]=PINC;PINC;D12_WRITE_LOW;data_B[95]=PINC;
  D12_WRITE_HIGH;data_A[96]=PINC;PINC;D12_WRITE_LOW;data_B[96]=PINC;
  D12_WRITE_HIGH;data_A[97]=PINC;PINC;D12_WRITE_LOW;data_B[97]=PINC;
  D12_WRITE_HIGH;data_A[98]=PINC;PINC;D12_WRITE_LOW;data_B[98]=PINC;
  D12_WRITE_HIGH;data_A[99]=PINC;PINC;D12_WRITE_LOW;data_B[99]=PINC;
  D12_WRITE_HIGH;data_A[100]=PINC;PINC;D12_WRITE_LOW;data_B[100]=PINC;  
  D12_WRITE_HIGH;data_A[101]=PINC;PINC;D12_WRITE_LOW;data_B[101]=PINC;
  D12_WRITE_HIGH;data_A[102]=PINC;PINC;D12_WRITE_LOW;data_B[102]=PINC;
  D12_WRITE_HIGH;data_A[103]=PINC;PINC;D12_WRITE_LOW;data_B[103]=PINC;
  D12_WRITE_HIGH;data_A[104]=PINC;PINC;D12_WRITE_LOW;data_B[104]=PINC;
  D12_WRITE_HIGH;data_A[105]=PINC;PINC;D12_WRITE_LOW;data_B[105]=PINC;
  D12_WRITE_HIGH;data_A[106]=PINC;PINC;D12_WRITE_LOW;data_B[106]=PINC;
  D12_WRITE_HIGH;data_A[107]=PINC;PINC;D12_WRITE_LOW;data_B[107]=PINC;
  D12_WRITE_HIGH;data_A[108]=PINC;PINC;D12_WRITE_LOW;data_B[108]=PINC;
  D12_WRITE_HIGH;data_A[109]=PINC;PINC;D12_WRITE_LOW;data_B[109]=PINC;
  D12_WRITE_HIGH;data_A[110]=PINC;PINC;D12_WRITE_LOW;data_B[110]=PINC;
  D12_WRITE_HIGH;data_A[111]=PINC;PINC;D12_WRITE_LOW;data_B[111]=PINC;
  D12_WRITE_HIGH;data_A[112]=PINC;PINC;D12_WRITE_LOW;data_B[112]=PINC;
  D12_WRITE_HIGH;data_A[113]=PINC;PINC;D12_WRITE_LOW;data_B[113]=PINC;
  D12_WRITE_HIGH;data_A[114]=PINC;PINC;D12_WRITE_LOW;data_B[114]=PINC;
  D12_WRITE_HIGH;data_A[115]=PINC;PINC;D12_WRITE_LOW;data_B[115]=PINC;
  D12_WRITE_HIGH;data_A[116]=PINC;PINC;D12_WRITE_LOW;data_B[116]=PINC;
  D12_WRITE_HIGH;data_A[117]=PINC;PINC;D12_WRITE_LOW;data_B[117]=PINC;
  D12_WRITE_HIGH;data_A[118]=PINC;PINC;D12_WRITE_LOW;data_B[118]=PINC;
  D12_WRITE_HIGH;data_A[119]=PINC;PINC;D12_WRITE_LOW;data_B[119]=PINC;
  D12_WRITE_HIGH;data_A[120]=PINC;PINC;D12_WRITE_LOW;data_B[120]=PINC;
  D12_WRITE_HIGH;data_A[121]=PINC;PINC;D12_WRITE_LOW;data_B[121]=PINC;
  D12_WRITE_HIGH;data_A[122]=PINC;PINC;D12_WRITE_LOW;data_B[122]=PINC;
  D12_WRITE_HIGH;data_A[123]=PINC;PINC;D12_WRITE_LOW;data_B[123]=PINC;
  D12_WRITE_HIGH;data_A[124]=PINC;PINC;D12_WRITE_LOW;data_B[124]=PINC;
  D12_WRITE_HIGH;data_A[125]=PINC;PINC;D12_WRITE_LOW;data_B[125]=PINC;
  D12_WRITE_HIGH;data_A[126]=PINC;PINC;D12_WRITE_LOW;data_B[126]=PINC;
  D12_WRITE_HIGH;data_A[127]=PINC;PINC;D12_WRITE_LOW;data_B[127]=PINC;
  D12_WRITE_HIGH;data_A[128]=PINC;PINC;D12_WRITE_LOW;data_B[128]=PINC;
  D12_WRITE_HIGH;data_A[129]=PINC;PINC;D12_WRITE_LOW;data_B[129]=PINC;
  D12_WRITE_HIGH;data_A[130]=PINC;PINC;D12_WRITE_LOW;data_B[130]=PINC;
  D12_WRITE_HIGH;data_A[131]=PINC;PINC;D12_WRITE_LOW;data_B[131]=PINC;
  D12_WRITE_HIGH;data_A[132]=PINC;PINC;D12_WRITE_LOW;data_B[132]=PINC;
  D12_WRITE_HIGH;data_A[133]=PINC;PINC;D12_WRITE_LOW;data_B[133]=PINC;
  D12_WRITE_HIGH;data_A[134]=PINC;PINC;D12_WRITE_LOW;data_B[134]=PINC;
  D12_WRITE_HIGH;data_A[135]=PINC;PINC;D12_WRITE_LOW;data_B[135]=PINC;
  D12_WRITE_HIGH;data_A[136]=PINC;PINC;D12_WRITE_LOW;data_B[136]=PINC;
  D12_WRITE_HIGH;data_A[137]=PINC;PINC;D12_WRITE_LOW;data_B[137]=PINC;
  D12_WRITE_HIGH;data_A[138]=PINC;PINC;D12_WRITE_LOW;data_B[138]=PINC;
  D12_WRITE_HIGH;data_A[139]=PINC;PINC;D12_WRITE_LOW;data_B[139]=PINC;
  D12_WRITE_HIGH;data_A[140]=PINC;PINC;D12_WRITE_LOW;data_B[140]=PINC;
  D12_WRITE_HIGH;data_A[141]=PINC;PINC;D12_WRITE_LOW;data_B[141]=PINC;
  D12_WRITE_HIGH;data_A[142]=PINC;PINC;D12_WRITE_LOW;data_B[142]=PINC;
  D12_WRITE_HIGH;data_A[143]=PINC;PINC;D12_WRITE_LOW;data_B[143]=PINC;
  D12_WRITE_HIGH;data_A[144]=PINC;PINC;D12_WRITE_LOW;data_B[144]=PINC;
  D12_WRITE_HIGH;data_A[145]=PINC;PINC;D12_WRITE_LOW;data_B[145]=PINC;
  D12_WRITE_HIGH;data_A[146]=PINC;PINC;D12_WRITE_LOW;data_B[146]=PINC;
  D12_WRITE_HIGH;data_A[147]=PINC;PINC;D12_WRITE_LOW;data_B[147]=PINC;
  D12_WRITE_HIGH;data_A[148]=PINC;PINC;D12_WRITE_LOW;data_B[148]=PINC;
  D12_WRITE_HIGH;data_A[149]=PINC;PINC;D12_WRITE_LOW;data_B[149]=PINC;
  D12_WRITE_HIGH;data_A[150]=PINC;PINC;D12_WRITE_LOW;data_B[150]=PINC;
  D12_WRITE_HIGH;data_A[151]=PINC;PINC;D12_WRITE_LOW;data_B[151]=PINC;
  D12_WRITE_HIGH;data_A[152]=PINC;PINC;D12_WRITE_LOW;data_B[152]=PINC;
  D12_WRITE_HIGH;data_A[153]=PINC;PINC;D12_WRITE_LOW;data_B[153]=PINC;
  D12_WRITE_HIGH;data_A[154]=PINC;PINC;D12_WRITE_LOW;data_B[154]=PINC;
  D12_WRITE_HIGH;data_A[155]=PINC;PINC;D12_WRITE_LOW;data_B[155]=PINC;
  D12_WRITE_HIGH;data_A[156]=PINC;PINC;D12_WRITE_LOW;data_B[156]=PINC;
  D12_WRITE_HIGH;data_A[157]=PINC;PINC;D12_WRITE_LOW;data_B[157]=PINC;
  D12_WRITE_HIGH;data_A[158]=PINC;PINC;D12_WRITE_LOW;data_B[158]=PINC;
  D12_WRITE_HIGH;data_A[159]=PINC;PINC;D12_WRITE_LOW;data_B[159]=PINC;
  D12_WRITE_HIGH;data_A[160]=PINC;PINC;D12_WRITE_LOW;data_B[160]=PINC;
  D12_WRITE_HIGH;data_A[161]=PINC;PINC;D12_WRITE_LOW;data_B[161]=PINC;
  D12_WRITE_HIGH;data_A[162]=PINC;PINC;D12_WRITE_LOW;data_B[162]=PINC;
  D12_WRITE_HIGH;data_A[163]=PINC;PINC;D12_WRITE_LOW;data_B[163]=PINC;
  D12_WRITE_HIGH;data_A[164]=PINC;PINC;D12_WRITE_LOW;data_B[164]=PINC;
  D12_WRITE_HIGH;data_A[165]=PINC;PINC;D12_WRITE_LOW;data_B[165]=PINC;
  D12_WRITE_HIGH;data_A[166]=PINC;PINC;D12_WRITE_LOW;data_B[166]=PINC;
  D12_WRITE_HIGH;data_A[167]=PINC;PINC;D12_WRITE_LOW;data_B[167]=PINC;
}