-
1. Re: ADC problem
helic_263931 Nov 21, 2012 9:13 AM (in response to userc_42486)To make sure it really is an ADC problem, some debug ideas:
- debug your code to see what you get as a result from the ADC (your LCD write code might also be wrong)
- use an external value as ADC input to check that it is working correctly
- route the connection between IDAC and ADC to an external pin and measure the voltage there
-
2. Re: ADC problem
userc_42486 Nov 21, 2012 9:33 AM (in response to userc_42486)Hi Sir,
Upto PGA working and ADC also working properly individualy but when i am cascading both,i am not getting anything .
Thanks
PRP
-
3. Re: ADC problem
JoMe_264151 Nov 21, 2012 9:58 AM (in response to userc_42486)1 of 1 people found this helpfulRoute the output of the PGA to a pin to observe it is within the input-range of the ADC, watch it with oscilloscope.
Bob
-
4. Re: ADC problem
userc_42486 Nov 21, 2012 10:20 AM (in response to userc_42486)i Did that i got output from PGA with 4v and my ADC input range is 0 to Vdd which is 5v but still i am facing problem
-
5. Re: ADC problem
JoMe_264151 Nov 21, 2012 11:55 AM (in response to userc_42486)1 of 1 people found this helpfulThere are some critical settings with ADC, can you post at least the settings of the ADC when not the complete zipped project.
Bob
-
-
7. Re: ADC problem
userc_42486 Nov 21, 2012 10:10 PM (in response to userc_42486)i am unable to upload the project what to do ?
-
-
9. Re: ADC problem
helic_263931 Nov 22, 2012 9:46 AM (in response to userc_42486)1 of 1 people found this helpfulWhen I open this project with Creation 2.1, it complains about outdated devices to be used. Do you use a PSoC3 Engineering Silicon? If yes, which one?
Can you update to the newest version of creator?
-
10. Re: ADC problem
helic_263931 Nov 22, 2012 10:12 AM (in response to userc_42486)1 of 1 people found this helpfulOne thing to note in your project is that the TIA output can get negative when the IDAC writes to the full values (31.875µA * 40kOhm gives 1.28V which is way larger than the reference voltage).
Also, is there a reason why you read the ADC result 4 times, and discard the first 3 readings?
Btw: since you don't change the IDAC - what is the result you see on the LCD? When I calculated correctly, it should 1.4V (4*(0.4-1.5µA*40kOhm), and it should be stable.
-
11. Re: ADC problem
userc_42486 Nov 22, 2012 10:53 AM (in response to userc_42486)Hi hli,
actually i am doing this project on glucose so there first we get transients so we eliminate those . in this uploaded project as a sample i am giving a constant 1.25uA , and the version i am doing is ES2 040 PSoC ,which supports only 2.0
thanks
PRP
-
12. Re: ADC problem
DaKn_263916 Nov 22, 2012 2:27 PM (in response to userc_42486)1 of 1 people found this helpfulBasically your TIA output ranges from 400 mV to Vss per your settings.
There is a spec missing in TIA datasheet, and also the OpAmp datasheet in the main part
spec, and that is common mode ranges for various power level settings of the TIA. So I
would start using TIA set to high power for initial debug. Then feed a SW ramp from 0 uA
to 10 uA and verify you get a ramp from .4 to Vss out of the TIA. Ramp from PGA should be
1.6V to 0 V.
I norticed you typed
Vin = (float) ADC_DelSig_1_CountsTo_Volts(ADCResult);
The cast is un-needed as the function returns a float.
Regards, Dana.
-
13. Re: ADC problem
helic_263931 Nov 22, 2012 2:33 PM (in response to userc_42486)1 of 1 people found this helpfulWe still don't know what the problem is: what do you mean by 'garbage values'?
-
14. Re: ADC problem
DaKn_263916 Nov 22, 2012 2:36 PM (in response to userc_42486)1 of 1 people found this helpfulOne othjer issue, when you write the ADC inside a fast looping structure, you
get a lot of screen jitter due to noise, and display is a little unreadable. Keep
in mind LCD has its own controller refreshing the LCD and fast updates to this
asynch interface cause visual issues even if no charaxcter is changing.
Two approaches -
1) Delay the loop so screen update not so frequent
2) Build a buffer for the display. When you go to write display you check buffer,
character for character, what you want to write, and only write those LCD characters
that have changed compared to whats in the buffer, updating buffer with the new
character after. This makes a very stable display. Prefered method by far.
You will still get jitter, but now only the digits/characters that are changing, not the
whole LCD display line.
Regards, Dana.