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.

Problem ADC with Tiva TM4C123G

Other Parts Discussed in Thread: EK-TM4C123GXL
Hello my name is yohan guerraz and I am currently in work-study at Valeo.

My company put me on a project which consists in recovering a battery voltage with a tiva TM4C123G which will have several functions including an ADC.

My problems are as follows:

1- I don't understand how we define / use the pins on the tiva (how I can do in my program to get information on a specific pin).

2- I don't really understand how ADC works on the tiva I have an example of an ADC project but I haven't found much explanation on the internet.

If you have the answer, can you help me please ?

Thank you in advance for the time you will devote to my problem.

cordially,

Guerraz Yohan
 
  • Hello Guerraz,

    I would recommend you download TivaWare as a starting point here: https://www.ti.com/tool/SW-TM4C

    Once you have TivaWare, we have multiple ADC examples for you to reference to learn more about the ADC.

    I would recommend looking at the following two projects inside of your TivaWare installation:

    • examples\peripherals\adc\single_ended.c
    • examples\boards\ek-tm4c123gxl\adc_udma_pingpong

    We also have documentation of the APIs for the ADC peripheral inside of our DriverLib's User Guide: https://www.ti.com/lit/pdf/spmu298

    And finally, you can reference this app note from Stellaris MCUs on how to use the ADC, the ADC module is the same in TM4C MCUs: https://www.ti.com/lit/pdf/spma001

    Best Regards,

    Ralph Jacobi

  • hello Ralph Jacobi first of all thank you for your answer which helped me a lot and I am sorry not to have answered it rather.
    However, I come up against a new problem. I would like to know if it is possible to use several AINX with the SSMUX3 in one and the same function or am I obliged to recreate a configuration function for each AINX because for the moment I have the possibility of applying my adc on the AIN9?
    Thank you in advance for your answer cordially Guerraz Yohan

  • Hello Yohan,

    It is US Holiday today and I am going to be out of office tomorrow as well. I will reply when I return back on Wednesday. Alternatively, you can open a new thread about this question and one of my colleagues may get to it sooner.