Other Parts Discussed in Thread: HALCOGEN, TMS570LC4357,
How to implement single channel ADC and Multichannel ADC Configuration.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
How to implement single channel ADC and Multichannel ADC Configuration.
Hi Yogesh,
i) First of all i would suggest you to refer the below video tutorial
Hercules Tutorial: 12bit ADC (youtube.com)
In above example they mentioned how to do a single channel conversion for ADC in detailed.
ii) After this you can also refer ADC example in HALCoGen "Help Topics" section:
Here you can find one more ADC example:
In this example they given step by step procedure and code for two channel conversion in ADC.
iii) If necessary, you can also refer below FAQ:
In above FAQ i attached several ADC tested examples which were created during my testings.
--
Thanks & regards,
Jagadish.
I have to write a program for DUAL CHANNEL ADC inTMS570LS0432 development board so in that if I connect potentiometer to the ADC Channel so as I rotate the potentiometer the ADC value should change.
Hi Yogesh,
A potentio meter connected to the AD1IN_6 channel of ADC in TMS570LC4357 launchpad.
So, i created one example project for this.
5661.AD1IN_6_ADC_Display_Test_LC4357.zip
I tested this project and it is working as expected.
You can see the docklight data for channel-6 before adjusting potentiometer and i also captured by rotating potentiometer knob
You can see after i rotating knob into anticlockwise, my digital output got reduced.
Take this as an example and can follow the same thing on your TMS570LS0432 board as well.
--
Thanks & regards,
Jagadish.
If I connect a 10kohm potentiometer to the ADC Channel then at 0kohm the ADC read value should be 0 and at 10kohm the value of the ADC read value should be 4096. Send me code according to this logic for the TMS570LS0432 Development Board.
Hi Yogesh,
There won't be any special code for this. You can use same code that i attached.
And you can't get 4096(0x1000) from 12-bit ADC because it is a 13-bit value not 12-bit value and the max value will only be 4095(0xFFF).
And again, these is ideal case and in practical you might see some errors. because even though you adjusted to 0ohms using potentiometer there might be some value of resistance as no device will work as ideal. So, you might get some low value on ADC.
But as i said there won't be any special code for this testing, and you have to use the same code as i shared to you.
--
Thanks & regards,
Jagadish.