Read Differential adc and print the value serially using uart

Hi all iam trying to read the differential analog voltage between AIN0 and AIN1 which is pin0.02 and pin0.03 and print the voltage which will be in micro volts from 400 micorvolt, and since the examples in sdk uses log_flush i could not get the data or not acess any data from that, i need to acess the data and print the data using uart, can anybody help me out in this, thankyou.

Parents
  • Check out the adc Done event, you will be able to acess the data from the DONE event in the evnet handler saadc_evt_handler. Check out how it is done in the SAADC example. The log_flush does not "flush" the data away or discard the data. 

    Regards,
    Jonathan

  • Fullscreen
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    The above is my code i could not print the voltage value on serial terminal, the above code is for single ended adc where do i miss i dont understand any idea please share with me.

  • Hi,

    Your handler is empty, so nothing happens, the handler completes, and the program moves on.


    Look at the saadc example, in the handler there is the following:

    Fullscreen
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    Use this to get the data.

    Regards,
    Jonathan

Reply
  • Hi,

    Your handler is empty, so nothing happens, the handler completes, and the program moves on.


    Look at the saadc example, in the handler there is the following:

    Fullscreen
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    Use this to get the data.

    Regards,
    Jonathan

Children
No Data