TEENSY 4.1 to handle 2 X CS42448 possible?

Hi,
"The French Alibaba listing doesn't seem relevant to the CS42448 board,"

yes it is if you select the 4th from the left,it's named Couleur: CS42448 and see its picture,the same as posted in this thread.

cs42448 design.png
 

Attachments

  • AD1452_DSP_PCB及接口说明.pdf
    730.1 KB · Views: 106
Urgh ... I hate these sites where multiple different items are listed under one heading. That's most of them, these days, including eBay and Amazon...

OK, so we have a PNG schematic (not from the AliExpress page, as far as I can see) which is just barely readable, and contains significant errors. For example, based on the PCB layout, AD0/CS is connected to IC1 pin 8 (named CS) and CN3 pin 9 (incorrectly named SS). CN3 pin 6 is labelled EX_RST on the schematic, which I can't find anywhere else on the schematic, though the PCB layout suggests it is indeed connected to the /RST pin of the CS42448.

It'd be interesting to track down the source of the PNG, as it looks like a screenshot of another document, maybe even the schematic CAD with all the components selected. Better resolution would probably help, but removing the highlights and having it error-free would be better!

Still, it looks as if you have access to all the pins you need, and even a 3.3V supply (U1) for the I²C pull-ups.

It occurs to me that you will need to be a bit careful about powering up the Teensy and the CS42448 board at the same time. In particular, the Teensy has quite strict power sequencing, so you should not connect the 3.3V rails together!
 
I'm sorry for the bad viewing,it's a 2Mo pdf,i can't attach it,it says it's too big,i give you 3 extended resolution pictures:
 

Attachments

  • cs42448 design.png
    cs42448 design.png
    1.7 MB · Views: 65
  • cs42448 design_2.png
    cs42448 design_2.png
    892.2 KB · Views: 94
  • cs42448 design_3.png
    cs42448 design_3.png
    1.5 MB · Views: 62
You're completely right,it will be a mess with all power supplies to be connected together if i feed the teensy and cs42448 at the same time!!
I barely can feed : teensy 4.1 + display 7" 8875 + cs42448 together from the teensy ,i have to do it from the cs42448 usb,the capacitors are bigger and i think the 5v->3,3v converter much efficient for powering.
 
Thanks for that. I've re-assembled the 3 PNG files into one image and removed the annoying pale blue background, which I think has made it a smaller file, too. I also annotated the Master Control pins.
cs42448 design_all_2.png
 
Nice job done, my eyes prefer the blue color because the yellow superposition,it's a question of taste :)

i have erratics comportements with my 2 CS42448,the scanner can often show ok with the address but it's not the same when
the configuration process,so i'm thinking of using a I2C multiplexer,not expensive: TCA9548A.
Wait and see...
 
After a quick test,i can confirm the TCA9548A allows the two cs42448 to work together on the same teensy I2C port,
but if the TCA9548A only makes a blind protect to avoid interaction between the 2 modules,and with no pullups resistors at all,
each module have to wear a different address,if not,only one module makes sound.

some code to make it sounds:

Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SerialFlash.h>


// GUItool: begin automatically generated code
AudioInputTDM            tdm1;           //xy=146,1894
AudioInputTDM2           tdm2_1;         //xy=148,2202.9998779296875
AudioOutputTDM           tdm2;           //xy=642,1897
AudioOutputTDM2          tdm2_2;         //xy=643,2200.9998779296875

AudioControlCS42448      cs42448_1;      //xy=366,2039.9998779296875
AudioControlCS42448      cs42448_2;      //xy=378,2353.9998779296875

AudioSynthWaveformSine   sine1;          //xy=343,1789
AudioSynthWaveformSine   sine2;          //xy=346,1843
AudioSynthWaveformSine   sine3;          //xy=350,1895
AudioSynthWaveformSine   sine4;          //xy=350,1950
AudioSynthWaveformSine   sine6;          //xy=376,2149.9998779296875
AudioSynthWaveformSine   sine5;          //xy=377,2099.9998779296875
AudioSynthWaveformSine   sine7;          //xy=379,2200.9998779296875
AudioSynthWaveformSine   sine8;          //xy=384,2249.9998779296875


AudioConnection          patchCord1(sine1, 0, tdm2, 0);
AudioConnection          patchCord2(sine1, 0, tdm2, 2);
AudioConnection          patchCord3(sine2, 0, tdm2, 4);
AudioConnection          patchCord4(sine2, 0, tdm2, 6);
AudioConnection          patchCord5(sine3, 0, tdm2, 8);
AudioConnection          patchCord6(sine3, 0, tdm2, 10);
AudioConnection          patchCord7(sine4, 0, tdm2, 12);
AudioConnection          patchCord8(sine4, 0, tdm2, 14);
AudioConnection          patchCord9(sine6, 0, tdm2_2, 4);
AudioConnection          patchCord10(sine6, 0, tdm2_2, 6);
AudioConnection          patchCord11(sine5, 0, tdm2_2, 0);
AudioConnection          patchCord12(sine5, 0, tdm2_2, 2);
AudioConnection          patchCord13(sine7, 0, tdm2_2, 8);
AudioConnection          patchCord14(sine7, 0, tdm2_2, 10);
AudioConnection          patchCord15(sine8, 0, tdm2_2, 12);
AudioConnection          patchCord16(sine8, 0, tdm2_2, 14);


// GUItool: end automatically generated code

// Select I2C BUS
void TCA9548A(uint8_t bus){
  Wire.beginTransmission(0x70);  // TCA9548A address
  Wire.write(1 << bus);          // send byte to select bus
  Wire.endTransmission();
  Serial.print(bus);
}


void setup() {
 
  Serial.begin(38400);
  Wire.begin();
 
cs42448_1.setAddress(0x48);
cs42448_1.enable();
cs42448_2.setAddress(0x4A);
cs42448_2.enable();
 
  AudioMemory(1500);
sine1.amplitude(0.3);
sine1.frequency(800);

sine2.amplitude(0.2);
sine2.frequency(1000);

sine3.amplitude(0.2);
sine3.frequency(1200);

sine4.amplitude(0.2);
sine4.frequency(1500);


sine5.amplitude(0.3);
sine5.frequency(800);

sine6.amplitude(0.2);
sine6.frequency(1000);

sine7.amplitude(0.2);
sine7.frequency(1200);

sine8.amplitude(0.2);
sine8.frequency(1500);


 
  if (cs42448_1.enable() && cs42448_1.volume(0.8)) {
    Serial.println("configured CS42448_1 at I2C address 0X48");
  } else {
    Serial.println("failed to config CS42448_1");
  }

  // Init cs42448 at I2C address 0X4A wired to TCA9548A channel1 (starts at 0)
  TCA9548A(0);
  if (cs42448_2.enable() && cs42448_2.volume(0.8)) {
    Serial.println("configured CS42448_2 at I2C address 0X4A");
  } else {
    Serial.println("failed to config CS42448_2");
  }

  
cs42448_1.inputLevel(5.0);
cs42448_2.inputLevel(5.0);
 
  
}


void loop() {
 
 
}

I wish next teensy 5X to have such a I2C multiplexer !!

Thank you:

lemasque700​

h4yn0nnym0u5e​

------------------------------------>:coffee::coffee::coffee:
 
Last edited:
After a quick test,i can confirm the TCA9548A allows the two cs42448 to work together on the same teensy I2C port,
but if the TCA9548A only makes a blind protect to avoid interaction between the 2 modules,and with no pullups resistors at all,
each module have to wear a different address,if not,only one module makes sound.
I'm afraid I don't really understand what you're saying here...

As discussed at length, you shouldn't need a TCA9548A to address two CS42448 chips, so long as you wire AD0/1 differently on each one. Your code certainly doesn't make use of it - you set different addresses and enable the two chips before you ever call TCA9548A(), which you only do once, and you then call inputLevel() for each CS42448 without setting the TCA9548A again.

if you could post a diagram of your wiring, including all SCL/SDA pull-ups and AD0/1 connections, and the TCA9548A, we might make sense of what's going on.

I think it's incredibly unlikely that any Teensy would have an I²C multiplexer built in: it's a very niche use-case and they're readily available for those who do need them.
 
Hi,
At the beginning i have a self-made PCB with teensy 4.1 wired to a cs42448 directly with I2C at default 0X48,with no AD0 wiring (on the air)
then i discovered your library to handle 2 cs42448 at the same time.
But i never succeed to have a stable result concerning a second cs42448 with a different address on the same I2C port,
the scanner found different address but the configuration setup never succeed for the twice module,so i had
the intuition that a TCA9548A could avoid interaction between the two cs42448.
So only one cs42448 is wired directly and the second is wired at a different address (0X4A) behind the TCA9548A.
The AD1 of the second one is wired with 3,3V, i have no pullups at all.
For the call inputLevel(),maybe i'm wrong,i only use for the moment the outputs and they work for the 8 ones
with a sine generator to each.
 
Last edited:
Ok now i can handle 2xcs42448 with different address on the I2C,they do the config setup ok,
but the really problem i had was the RA8875 - FT6206 touch (0X38) ,wich was on the same I2C port,
one of the cs42448 didn't make any sound,have i the possibility to wire the FT6206 on I2C1 (17,16)?
 
There shouldn’t be a conflict with the FT6206, as it’s on a different I2C address. Is the touch driver circuit adding more pull ups?

Certainly possible to use another port, so long as the library supports it … so many don’t allow for anything other than Wire 🤬
 
Yes, but it was my choice to have a 4 wire + I2C display, i didn't foresee the problems i'll have with several
modules on the same I2C,I'm sure the buyDisplay is factory prepared for I2C pullups
If i use my display on the I2C1 port,will i use I2C transaction only at the setup:
Code:
Wire1.setSCL(16);

Wire1.setSDA(17);

Wire1.beginTransmission(0x38);

until (don't know when to close the transaction...)   Wire1.endTransmission;

or using the TCA9548A,like i did with one of the cs42448,and it worked:

Code:
// Select I2C BUS

void TCA9548A(uint8_t bus){

  Wire.beginTransmission(0x70);  // TCA9548A address

  Wire.write(1 << bus);          // send byte to select bus

  Wire.endTransmission();

  Serial.print(bus);

---> then in the setup():
 TCA9548A(0);

}

Another interessant thing i've seen in your soldering design,you put a 0 ohms resistors to have the cs42448 3,3V beside
the AD0,AD1 addressing,did you succeed with all the combinaisons?

AD0 to Gnd and AD1 to Gnd => address 0x48
AD0 to Gnd and AD1 to 3.3V => address 0x4A
AD0 to 3.3V and AD1 to Gnd => address 0x49
AD0 to 3.3V and AD1 to 3.3V => address 0x4B

It was nearly impossible for me to get

AD0 to 3.3V and AD1 to Gnd => address 0x49
AD0 to 3.3V and AD1 to 3.3V => address 0x4B

Was it because i didn't use your soldering trick?
 
Ok,i moved the TFT RA8875 touch to I2C1 (17,16) --> &Wire1 in the Adafruit_FT6206 library
and all my I2C troubles disappeared,no need pullup resistors at all,I2C si stable.
 
Good news you've got it working - presumably the RA8875 has pull-ups fitted so no more need to be added.

Apologies, I somehow missed your post #37. I didn't try all addresses, because I'm sure they'd work. You definitely need to fit a zero ohm link (or wire) to R20 before the wiring I showed in the multi-TDM thread would work, because otherwise IC1 pin 2 is floating and doesn't work for either the SCL/SDA pull-ups, or to set AD0/AD1.
 
yes it 's certainly fitted with pullups,i did some tests also with wire2,but wire1 is more stable
But i can't see any IC1 soldered on the PCB,only a drawing ,isn't it strange?
 
Pretty sure IC1 is intended to be fitted, along with R26, R27 and R28, to allow configuration of the board by setting jumpers on SIP1. It's hinted at on the schematic you posted...
 
The shematic you certainly looked at, better than me:)
Thsi cs42448is intended to be sandwiched with the UDAU1452,but only one cs42448 is to be wired,so maybe 2 cs42448 could make
a conflict with the I2C bound to UDAU1452
 
I think the title gets locked after a while. Still seems relevant, and we covered a lot of the topics that folk will need to know about to use multiple CS42448 boards, so ... good job!
 
Back
Top