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

Thread: Teensy Audio question

  1. #1

    Teensy Audio question

    Hi guys,

    So I'm looking at starting an audio project with Teensy using an external DAC (12 bit MCP4922 - initially) and wondering if i can use Teensy Audio Library code to start off?

    I've looked over the Teensy Audio Library page (https://github.com/PaulStoffregen/Audio) and there is no mention that i can find regarding using external DACs. Only onboard DACs as shown in the pictures towards the bottom of the page.

    Any help would be great, thanks.

    Cheers,
    M

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,238
    The audio library does not have any support for this type of SPI interface DAC. In theory you could try to add it, but because this requires SPI and a special pulse, doing it efficiently with DMA would be very difficult. Doing it the normal SPI way from interrupts would be very inefficient, requiring 44100 interrupts per second which do 32 bits of SPI communication and generate a pulse.

    You really should look for a DAC with I2S interface instead of SPI. They are well supported with very efficient DMA transfers.

  3. #3
    Thanks Paul.

    I've had a look on mouser and there isn't even a I2S interface type category. It seems a lot of dac's use SPI so wondering if this is something you may implement in the future?

    This was another DAC I was looking at: 16bit (https://www.mouser.com/ProductDetail...wHtpNXHnspc%3d)

    Uses Serial, 3-Wire, SPI...

  4. #4
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,919
    Quote Originally Posted by mtiger View Post

    I've had a look on mouser and there isn't even a I2S interface type category. It seems a lot of dac's use SPI so wondering if this is something you may implement in the future?
    I think, most AUDIO Dacs use I2S...

    https://eu.mouser.com/Semiconductors...rd=i2s&FS=True

  5. #5
    Senior Member
    Join Date
    Dec 2014
    Posts
    304
    Digi-key hits > 0 products for "dac i2s": https://www.digikey.com/products/en?keywords=dac%20i2s
    (although of course many of those are "the same thing" in slightly different packaging.)

Posting Permissions

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