Announcement

Collapse
No announcement yet.

Help configuring A/D parameters on 18F87K22

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help configuring A/D parameters on 18F87K22

    MCU running at 16Mhz. ADCS bits are set to 101 (16Tosc). If I wish to use a programmable acquisition time, how do I calculate the values for the ACQT bits?

    Regards,

    Andy

  • #2
    There are several things that needs to be taken into consideration. If you want to calculate it the complete procedure is outlined in section 23.3 in the datasheet.

    In the electrical specifications for the device it says that MINIMUM acquistion time, with a source impedence of 50ohm or less, is 1.4us (table 31-28). The example calculation uses 2.5k (which is the recommended MAXIMUM source impedence) and arrives at 2.5us

    IME there's no such thing as too long acqusition time so if you're not hunting instruction cycles and don't want to bother with calculating it, just go with something like 6-8Tad in your case.

    /Henrik.

    Comment


    • #3
      Hi Henrik,

      Thanks for your reply. I think I am missing something very basic here - what is the relationship between uS and Tad? Or, to ask a different way - how may uS is one Tad?

      Andy

      Comment


      • #4
        Andy, It all depends on the frequency you have selected for the A/D clock. Attached is the data sheet relevant to the 18F87K22.
        18F87K22.pdf
        Dave Purola,
        N8NTA
        EN82fn

        Comment


        • #5
          Hi Dave,

          Thanks for replying. I think I am over thinking this and maybe the answer to my question is simple and obvious:

          MCU running at 16Mhz
          ADCS bits are set to 101 (16Tosc)

          16MHz/16 = 1Mhz; 1/1MHz = 1uS... so in this example, Tad =1uS

          Am I correct?

          Andy

          Comment


          • #6
            That's correct Andy.

            Comment


            • #7
              Thanks Henrik!

              I think sometimes my brain over complicates simple things...

              Andy

              Comment

              Working...
              X