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

Thread: audio DAC for Teensy 4 - what one? MCP4725?

  1. #1
    Junior Member
    Join Date
    Sep 2019
    Posts
    8

    audio DAC for Teensy 4 - what one? MCP4725?

    I have a MCP4725 wired up to a T4 on pins 16 and 17 and it "works" but I may have chosen the wrong thing. What I want to do is have non-blocking way to play short (1 sec or so) audio samples. I was thinking I could use DMA over I2C but apparently there is no library to do that on the T4 (did not see anything dma related in wire). Do I need a I2S device? The amp the dac would be driving has an input range of +/-300mv.

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,246
    The Teensy 4.0 does not have a real DAC. I was investigating how to play sounds without using an audio adapter, and came up with two simple solutions:

    If you aren't using SPI, you can use the MQS pins (10 and 12). Here is a sketch I wrote to test MQS:


    Here is a test I wrote to try out an I2S to mono adapter I bought:


    In the future, you might be able to use pins 14 & 15 for S/PDIF output, but the Teensy 4.0 support is not yet written.

  3. #3
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,525
    For audio, I2S is the preferred digital protocol, and many DACs exist on the market which support it. So, I’d say this is the way to go.

  4. #4
    Junior Member
    Join Date
    Sep 2019
    Posts
    8
    My goal here is just to be able to do non-blocking playing of short audio clips on the T4 and I can't use the Audio Shield because it is far too large to fit in my project. The MCP4725 board is about 15mm square and I am looking for a board 20mm square at max if I can't use the MCP4725. Before I go buy another board to try I was looking for a confirmation from someone that whatever board I got would actually work and do what I needed it to do on the T4. I see that you can do I2c inside an ISR on the i2c_t3 library but I think that library does not work with the T4. Has anyone used any DAC in a non-blocking way on the T4 other than the Audio Shield?

Posting Permissions

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