Need code for analog to digital !
alex2
Posts: 10
I have four 12-bit analog to digital parallel converters connected to propeller.
I am using one dedicated cog to monitor/poll end-of -conversion (EOC) outputs of those four
ADCs via four i/o pins, one for each EOC.
I need one separate cog for each ADC.
The ADCs are not necessarilly synchronized, so the EOC signals are not changing at the same time.
My generic idea behind the code :
1)Poll the EOCs i/o pins -cog0
2)If any EOC active, determine which one it is and
which cog should be started to get the sample -cog0
3)Poll again -cog0 and at the same time read sample from ADC-cog1,2,3 or 4
How do I start and assign new cogs to process samples coming from each of the four ADCs ?
How will I let the other cogs (1,2,3,4) know that it is time to read sample from ADC latch ?
Please help, getting desperate.
Thanks.
I am using one dedicated cog to monitor/poll end-of -conversion (EOC) outputs of those four
ADCs via four i/o pins, one for each EOC.
I need one separate cog for each ADC.
The ADCs are not necessarilly synchronized, so the EOC signals are not changing at the same time.
My generic idea behind the code :
1)Poll the EOCs i/o pins -cog0
2)If any EOC active, determine which one it is and
which cog should be started to get the sample -cog0
3)Poll again -cog0 and at the same time read sample from ADC-cog1,2,3 or 4
How do I start and assign new cogs to process samples coming from each of the four ADCs ?
How will I let the other cogs (1,2,3,4) know that it is time to read sample from ADC latch ?
Please help, getting desperate.
Thanks.
Comments
Post Edited (Mike Green) : 10/26/2006 1:58:46 AM GMT
that looks like a good way to go about it, I should have thought of that.
I hope I will have some schematics and code later on to share, though
it may take a while.