Two audio boards on a 4.1

SteveSFX

Well-known member
Hi people

Is it feasible to run 2x Teensy 4.1 audio SGTL5000 boards off the same 4.1?

I know you can't 'stack' them, but is that just asking too much of the processor and with too many shared pins?
 
Yes - there's various threads and web pages around which give more-or-less comprehensive information on how to do it. The info pane for the QuadI2S objects in the Design Tool is a good starting point. The Teensy 4.x can comfortably manage 4i4o.

Note that much of the advice refers to Revision C (Teensy 3.x) or D (Teensy 4.x) adaptors. There's a gotcha with the Revision D2 adaptors, in that they can't have their I²C address changed, so I'd recommend getting at least one Rev D. The D2 was created due to supply issues with the SGTL5000, and I don't know if that's been resolved.

You need to
  • Hardware changes:
    • move DIN and DOUT to different pins
    • change the I²C address of one of the audio adaptors
  • Software
    • use AudioInputI2SQuad and AudioOutputI2SQuad objects
    • use two SGTL5000 control objects
    • use setAddress(HIGH) on one of the control objects before you use any other functions
 
Ah OK thanks. Yes, the changing i2c address is probably the biggest issue then (as in... not possible )
 
If you have the rev D2 audio board, it's usable for channels 1-2 (because the I2S address is fixed). You'll need rev D (with the pads to configure I2C address) for channels 3-4 or channels 1-2.

You definitely can use rev D2 and rev D together to get 4 channels. Or two rev D. The only combination that can't work** is two rev D2, because rev D2 can't be configured for channels 3-4.

Rev D2 was only made in the first half of 2023, due to chip shortages at that time. By mid-2023, all new audio shields shipped by PJRC were again rev D. Some distributors may have sold lingering D2 stock later in 2023.

CPU-wise, Teensy 4.1 can easily handle 4 audio channels. Even Teensy 3.2 could do this. The earlier rev B and rev C audio shields meant for the Teensy 3.x boards also had the I2C address pads and pads to separate the other I2S data. Many people did indeed build 4 channel audio projects on Teensy 3.2 with those earlier audio shields. Of course Teensy 4.1 is ~11X faster than Teensy 3.2, so you can do much more, or run CPU-heavy effects like the ladder filter which couldn't possibly run on Teensy 3.2 and uses about half the CPU on Teensy 3.6, but Teensy 4.1 can indeed run 4 of those.



** - use of two rev D2 could theoretically be made to work by wiring up the 2nd audio shield's SDA and SCL to a different I2C port and editing the code to use it, or by use of a signal mux chip, or a number of other ways of dealing with conflicting I2C addresses. But none of those are recommended. Just get the rev D audio shield for channels 3-4.
 
Back
Top