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.
Tool/software: Code Composer Studio
Hi,
I am having problem with initialization of 2 (or more) ADC12 channels and potentiometers. I have succeded with one, but the problem is happeng when trying with more channels. How should my initialization look like if I want to use channel 14 and channel 15 with P1 and P2?While the program runs used channel changes by users input.
Thank you for your reply!
Where can I find this Ti Resource Explorer? Is that pdf file?
I want to send from Computer-terminal number. For example numbers 1, 2 ,3 or 4. If I send 1, starts conversion on first conv. channel. The result of the conversion should be used for PWM toggling first diode.
If I send 2 from terminal, starts second conversion channel, and result is used for PWM toggling second diode.
Thank you in advance
Thank you a lot. I found the explanation for my problem.
And sorry if my English is not so good.
I have only one more question. I will ask it there, but if you think I should open new thread i will do this.
When conversion is finished I read the result, and place the value (0-4095) in an integer, for example "int adcResult". This value I want to use for PWM toggling led diode, viz this result i put in matching CCR.
But, i have problem with conversion this value to value at range 0-100. If I do PWMvalue = adcResult/4095*100, in PWMvalue will be false value. If I do PWMvalue = adcResult*100/4095.
I tried to change type of adcResult and PWMvalue, but again in PWMvalue is false value.
In adcResult, when I read result of conversion, is good value, in range 0-4095. But after conversion to value in range 0-100 i get false value. Can you say me how to convert this to value in range 0-100.
Thank you in advance.
Best regards,
Srdjan
**Attention** This is a public forum