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

Thread: DAC:speed conversion and reference voltage

  1. #1

    DAC:speed conversion and reference voltage

    Hello everyone
    I just have a little question:
    Is there a ready function to set the reference voltage and conversion speed of the DAC in teensy 3.2??
    I read in datasheet of the processor of teensy that its possible to set them but I don't know if there is a ready functions or other way to do so .
    Can any one help me?

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,490
    If using analogWrite(), you use analogReference() to configure the DAC reference. The conversion speed is simply how often your code calls analogWrite().

    If using the audio library, there is a similar function. Read the dac documentation (right side panel) for details.

    https://www.pjrc.com/teensy/gui/?info=AudioOutputAnalog

    The conversion speed when using the audio library is 44117 Hz (actually 48 MHz / 1088), the exact same rate as all other processing done in the audio lib.

    The DAC hardware only has 2 possible reference settings, either the 1.2V internal ref, or the 3.3V power. When in 3.3V mode, the AREF pin voltage is ignored. That AREF pin only controls the ADC. It's ignored by the DAC, so even though we use the same word "EXTERNAL", the DAC's hardware doesn't have any option to actually use the AREF pin. It's only the internal 1.2V ref or the 3.3V power.

  3. #3
    thanks for replying sir

    your answer is very useful for me.

  4. #4
    Junior Member
    Join Date
    Jan 2020
    Posts
    1
    I wanted to check to see if this is still the case. Is there any way to get a 5V reference on the DAC? It would simplify my project greatly if I didn't have to use an external DAC.

  5. #5
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,573
    Quote Originally Posted by MajorMar View Post
    I wanted to check to see if this is still the case. Is there any way to get a 5V reference on the DAC? It would simplify my project greatly if I didn't have to use an external DAC.
    No NXP did not update the chip.

  6. #6
    Member
    Join Date
    Nov 2012
    Location
    Olympia, WA
    Posts
    55
    Quote Originally Posted by MajorMar View Post
    I wanted to check to see if this is still the case. Is there any way to get a 5V reference on the DAC? It would simplify my project greatly if I didn't have to use an external DAC.
    An op-amp could add gain, buffer, and protect the Teensy.

Posting Permissions

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