Forum Discussion
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.