Forum Rule: Always post complete source code & details to reproduce any issue!
Page 3 of 3 FirstFirst 1 2 3
Results 51 to 58 of 58

Thread: CS42448 board update for T4 pinouts and improved performance

  1. #51
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,088
    I should also mention, if you were to use I2S instead of TDM, you'd be limited to only 10 channels total (eg, 2 input & 8 output, or 6 input & 4 output, or 8 input & 2 output, etc) due to the way the I2S pins are assigned on Teensy 4.

    On Teensy 3.x, the limit for I2S is 4 inputs & 4 outputs.

    TDM allows all the inputs and outputs to work simultaneously, and it does this with fewer pins. That's why we always use TDM for CS42448.

  2. #52
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    208
    Paul,

    Thanks.

    I forgot that there's a separate TDM driver after a 12 month break from the project. Basics are working again now I'm using TDM ins and outs.

    Richard
    Last edited by palmerr; 03-11-2021 at 01:09 AM. Reason: Simplfy

  3. #53
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    208
    I have (finally) published full details of this project - including Gerbers, BoM, schematics and design notes, on my github: https://github.com/palmerr23/AudioToy

    Cross posting in the Projects section of the forum includes some photos: https://forum.pjrc.com/threads/68166...mixer-hardware

  4. #54
    I am using a CS42448 in one of my projects. I am having a problem with the VQ not initializing to 2.5v consistently. Sometimes it initializes to random values around a volt.

    I tried the "magic bit" fix refenced in this post // https://forum.pjrc.com/threads/41371...l=1#post215881 But it didn't help. BTW, I am using the Audio library control_cs42448.h and .cpp to init the CS42448.

    Have you experienced any VQ=2.5v initialization issues?

  5. #55
    Senior Member
    Join Date
    Jun 2018
    Location
    USA
    Posts
    197
    Quote Originally Posted by palmerr View Post
    I have (finally) published full details of this project - including Gerbers, BoM, schematics and design notes, on my github: https://github.com/palmerr23/AudioToy

    Cross posting in the Projects section of the forum includes some photos: https://forum.pjrc.com/threads/68166...mixer-hardware
    palmerr, Congratulations on your achievement. Thank you for sharing this with the community. You've done a really remarkable job at creating this.

  6. #56
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    208
    Neal,

    I haven't had any issues with VQ and haven't needed to tweak the 'magic bit'. I always buffer it before using VQ.

    I use the standard Teensy Audio Library CS42448 control, and the only change I make is to turn differential inputs on.

    Code:
    // change ADCs 1-3 (channels 0..5) to differential mode (CS5343 is single ended)
    writeRegCS(CS42448I2C, 0x05, 0x00); // (I2C address, register, setting) Paul's setting = 0x1C
    Sorry I can't be more help.

    Richard

  7. #57
    I am just measuring the VQ voltage and not using it to drive anything. Do you have any delays() in your code that enables the CODEC?

    Below is my simple test sketch. It simply outputs a sine wave to the CS42448 AOUT1 DAC. When I upload from Arduino it starts fine and VQ=2.5v. If I unplug then replug the USB connecting the Teensy 4.1 to the PC, VQ goes to some random value. Here is the sketch:

    #include <Audio.h>

    AudioSynthWaveformSine sine1; //xy=306,190
    AudioOutputTDM tdm1; //xy=573,258
    AudioConnection patchCord1(sine1, 0, tdm1, 0); //AOUT1
    AudioControlCS42448 cs42448_1; //xy=784,280

    void setup() {
    AudioMemory(40);
    cs42448_1.setAddress(3); // my CS42448 address is 0x03
    cs42448_1.enable();
    cs42448_1.volume(1.0);
    sine1.amplitude(1.0);
    sine1.frequency(1000);
    }

    void loop() {
    }

  8. #58
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    208
    Neal,

    Your sketch looks fine. I haven't used the setAddress() function, but can't see why that would contribute. I guess you mean the I2C address is 0x48 + 3.

    No delays in my startup code:
    Code:
    cs42448_1.enable(); // mutes all outputs
    cs42448_1.volume(0.1); // low volumes to start
    cs42448_1.inputLevel(0.1);    
      
    // change ADCs 1-3 (channels 0..5) to differential mode (CS5343 is single ended)
    writeRegCS(CS42448I2C, 0x05, 0x00); // Paul's = 0x1C
    Looks like you're not alone with this problem - I read the "magic bit" posts and Paul's mention of it after power up sequence notes in the code.

    There's a possibility that it's something to do with the difference between a soft and hard reset.

    I haven't asked which hardware you're using - Paul's or custom? Both Paul and I use a CAT811/MAX811 (or similar voltage monitor) to provide the appropriate RST! pulse (I ignore the pin 3 MR! input, a quick look at Paul's Hackaday post indicates that he does also). The alternative is to use a GPIO pin, or a simple RC to do the job.

    I'll keep an eye out for the problem on my boards - as I haven't checked VQ since early prototypes. It's always possible that my chips are doing it and I haven't noticed.

Posting Permissions

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