Reading 8bit ADC in parallel
hunpary
Posts: 1
Hello,
I would like to have a question about ina register in propeller, Basically I am using a development board.
What I am trying to do in assembly is to read 8bit ADC value in parallel at a 7mhz rate. the code is attached.
In a new cog, it just is keeping reading ADC and storing each into designated address.
In the other side, spin code is getting the stored ADC values and sending them to PC in order to check through the serial port.
But I haven't gotten any right value from this program except for zeros.
In addition, I tried to read ADC at a fixed address but it was the same as the previous one.
I read through the manual, but it is talking about the OUTA rather than INA.
I hope to see if my code works or not and to know how to set up to read ADC in parallel with an example.
Thank you for your help.
adc_asm.spin
I would like to have a question about ina register in propeller, Basically I am using a development board.
What I am trying to do in assembly is to read 8bit ADC value in parallel at a 7mhz rate. the code is attached.
In a new cog, it just is keeping reading ADC and storing each into designated address.
In the other side, spin code is getting the stored ADC values and sending them to PC in order to check through the serial port.
But I haven't gotten any right value from this program except for zeros.
In addition, I tried to read ADC at a fixed address but it was the same as the previous one.
I read through the manual, but it is talking about the OUTA rather than INA.
I hope to see if my code works or not and to know how to set up to read ADC in parallel with an example.
Thank you for your help.
adc_asm.spin
spin
2K
Comments
Something more like this?
The PASM loop is going to run much much faster than SPIN can keep up, so expect the whole adc array to be updated many times for a few SPIN lines...