Forum Discussion
Altera_Forum
Honored Contributor
13 years agoAuto switching between ADC channel in DE0-Nano
Hello, I'm want to create a program to collect data from 4 microphone using De0-nano board. I tried to create an auto switching program for 2 potensiometer ,using the basic ADC demo from terasic. I u...
Altera_Forum
Honored Contributor
13 years agoI don't have the adc demo code here, so I can't fully understand the exact purpose and usage of data and iCH.
The problem is definitely with the iCH <= 0 assignment in the very beginning of second always block: this will be executed at each clock pulse and will keep iCH in the zero state. Anyway I think your code is somehow wrong; cont never resets and it would keep on growing, so the cont=x conditions would be hit only once and then data will be always 0.