Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: How long the comparator mux settling time, tweensy 3.2?

  1. #1

    How long the comparator mux settling time, tweensy 3.2?

    //MUX Control Register (CMPx_MUXCR), comparator Plus Input Mux Control (PSEL bit 5-3) & Minus Input Mux Control(MSEL bit 2-0)
    CMP0_MUXCR = 0b00011010; // Comparator0+ In3 "U"(bit 5-3), Comparator0- In2 "V"(bit 2-0)
    //--------------------------------------------------------------
    //Comparator settling time
    delayMicroseconds (1); // not specified in Tweensy 3.2 MPU manual
    //--------------------------------------------------------------
    //CMP Status and Control Register (CMPx_SCR), Analog Comparator Output(bit0)
    if (CMP0_SCR & 1)
    {
    Serial.println (F("U>V"));
    }
    else
    {
    Serial.println (F("U<V"));
    }
    I could not find the comparator settling time sepcs. in MPU manual.

    Takao

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,041
    The timing specs are in the datasheet (not the reference manual).

    https://www.pjrc.com/teensy/datasheets.html

    Look for section 6.6.2 on pages 43-44.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •