|
Hi hling,
I tested the project which you had attached on PSoC 3 production silicon.
The project worked fairly as expected. The voltage readings obtained on the LCD was in strong correlation with the voltage measured using a multimeter. Here are some of my observations:
1) In the project, P0[7] is used as the analog pin but in the snap-shot of the development board you have attached, other pin is used.
2) As lleung has already mentioned, it is adviced to use ADC_GetResult32() when using a resolution of 16-bit or higher.
3) In the project, the infinite loop has 3 read operations done at the beginning. The result is stored in a variable named "ADCResult". But while displaying the ADC count (2nd row), there is a direct read using GetResult16( ) API. Since the ADC is running in continuous mode, before reading an ADC result, it is mandatory to make sure that the conversion is complete. You can use the already received "ADCResult" in this case.
4) In this project, since the voltage of the potentiopmeter is measured, it is advantageous to us Vdda as a reference. This is because, when ratiometric sources are involved, the change in Vdd will have very little effect on the output of ADC.
|