infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

Dave

+ Reply to Thread
Results 1 to 7 of 7

Thread: ADC auto scan example

  1. #1
    EVS is on a distinguished road
    Join Date
    Aug 2013
    Posts
    11
    Points
    53.75

    ADC auto scan example

    Hi,

    I'm trying to set ADC0 to auto scan a couple of channels. But no luck.
    Is there an example of how this is done.

    Thanks,
    Evs

  2. #2
    Hi EVS,

    Which device are you using?

  3. #3
    EVS is on a distinguished road
    Join Date
    Aug 2013
    Posts
    11
    Points
    53.75
    I'm using XE167FM

  4. #4
    Hi EVS,

    Did you use DAVE for the code generation?
    If yes, it is quite simple.
    You just need to enable the Parallel Source in the general tab and choose Enable Autoscan in the Parallel tab.
    Then, you enable the ADC channels you want to use and use the function ADC0_vStartParReqChNum to include the ADC channel into the Autoscan.

  5. #5
    EVS is on a distinguished road
    Join Date
    Aug 2013
    Posts
    11
    Points
    53.75
    Quote Originally Posted by Jackson View Post
    Hi EVS,

    Did you use DAVE for the code generation?
    If yes, it is quite simple.
    You just need to enable the Parallel Source in the general tab and choose Enable Autoscan in the Parallel tab.
    Then, you enable the ADC channels you want to use and use the function ADC0_vStartParReqChNum to include the ADC channel into the Autoscan.
    Thanks for the reply.

    Yes I did al that! I also read the documentation many times. But the ADC is 0 (RESR0). If I do a single scan it works fine.
    I do a conversion request(ADC0_vStartParReqChNum (0)) but it isn't handeld by hardware and I don't know why.
    CRMR1=0x0011. I think it should work.

    Regards,

  6. #6
    Hi EVS,

    You need to call the function ADC0_vSetLoadEvent after you call the ADC0_vStartParReqChNum function.
    Last edited by Jackson; Sep 10th, 2013 at 02:11 AM.

  7. #7
    New Member New Member Ben is on a distinguished road
    Join Date
    Nov 2012
    Posts
    1
    Points
    20

    I have the same problem

    Dear,
    I also use a XE167FM, I want to read input P15.0 to P15.6 but it's not working.
    I change the input at each timer.
    When I read only one input it's ok, but if i want to read 15.0, 15.1 the next time... 15.5 the next time it's not working.
    I use :

    ADC1_vStartParReqChNum(ucCptReadSensor);
    ADC1_vSetLoadEvent();
    while(ADC1_uwBusy());

    fPressureA = (ADC1_uwGetResultData(RESULT_REG_7) + fPressureA * 20)/21;

    Do you have an idea about what is wrong?
    thank you for your help
    Benoît

+ Reply to Thread
Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.