Menu

USE_AD0? Optimising A/D use

mkstevo
2022-01-06
2022-01-06
  • mkstevo

    mkstevo - 2022-01-06

    I'm using a 12F1571 and am trying to squeeze my code into the memory space.

    I can just do this if I use the A/D optimising code:
    Use_AD0 False
    Use_AD1 True
    Use_AD2 False
    ...
    USE_AD34 False

    and so on.

    I am assuming, that if I'm using pin 6 (PortA.1) as my A/D in, I need to have "Use_AD1 True" and all the others false?

    It's just I've noticed that I had set Use_AD0 True, and all others false - which I might have expected not to work, but it has been?
    Perhaps the compiler is cleverer than I am, and set the A/D correctly when I tried to perform my ReadAD10(AN1,True)?

     
    • Anobium

      Anobium - 2022-01-06

      I am assuming, that if I'm using pin 6 (PortA.1) as my A/D in, I need to have "Use_AD1 True" and all the others false?

      Yes

      Send me your source (via email) and I will ensure this is correct.

       

Log in to post a comment.