1
0
mirror of git://projects.qi-hardware.com/nn-usb-fpga.git synced 2025-04-21 12:27:27 +03:00

Adding new SAKC version, including LED circuit.

Adding compiling script to Scope Demo
This commit is contained in:
Carlos Camargo
2010-05-20 11:49:05 -05:00
parent 47b7172e98
commit 26b0c73a84
40 changed files with 108970 additions and 553 deletions

View File

@@ -17,11 +17,11 @@ MainWindow::MainWindow(QWidget *parent)
timer1->start(50);
connect(timer1, SIGNAL(timeout()), this, SLOT(updateGraph()));
/*ADC1 = new ADCw;
ADC1 = new ADCw;
ADC1->testADC();
ADC1->setBufferLen(240);
ADC1->setClockDiv(ADC_SPI_CLKDIV_MIN); //Max. speed
ADC1->setMuxChannels(1);*/
ADC1->setMuxChannels(1);
printf("\nTaking 120 samples by channel at Fs=99KHz (trigger=50ms)\n");
}
@@ -38,11 +38,11 @@ void MainWindow::updateGraph()
deltaCountCH1=0; deltaCountCH2=0;
idxCH1=0; idxCH2=0;
//dataADC=ADC1->takeSamplesADC(0);
dataADC=ADC1->takeSamplesADC(0);
for(int i=0; i< 240/2; i++)
{
//tempD = dataADC[i]&0x0FFF;
tempD = sin(10*PI*i/200)*0x200+0x200;
tempD = dataADC[i]&0x0FFF;
//tempD = sin(10*PI*i/200)*0x200+0x200;
ui->Graph->addPoint1(tempD+0x3ff);
sign2_CH1 = getSign(tempD-0x200);
@@ -57,8 +57,8 @@ void MainWindow::updateGraph()
sign1_CH1=sign2_CH1;
//tempD = (dataADC[i]>>16)&0x0FFF;
tempD = cos(10*PI*i/200)*0x200+0x200;
tempD = (dataADC[i]>>16)&0x0FFF;
//tempD = cos(10*PI*i/200)*0x200+0x200;
ui->Graph->addPoint2(tempD);
sign2_CH2 = getSign(tempD-0x200);