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

Thread: CS42448 Differential Outputs with Teensy Audio Library

  1. #1

    CS42448 Differential Outputs with Teensy Audio Library

    Hi, I am currently working on a custom PCB project using the Teensy 4.0 with the CS42448 codec chip, based off the example project here.

    For my project I would like to achieve maximum fidelity / signal to noise ratio, and as such I am interested in using the differential input / output option (either way I am going to add active amplification / filtering to the I/O, so making this differential as opposed to single ended is not a huge increase in scope). I am wondering:

    -What effect this is likely to have on fidelity (I assume the difference will be very slight, but hopefully measurable)

    -Whether there is any additional modification or configuration will I have to do to make this work with the Audio library code for the CS42448 and the example project circuit. My understanding is that the differential IO is always active, and that in the case they are unused they are simply left floating (in the case of the negative differential outputs) or connected to ground via a capacitor (in the case of the negative differential inputs), and that to make use of the differential I/O I simply have to make the proper connections between the codec IO pins and my amplification / filter circuitry. Is this understanding correct?

    Thanks!

  2. #2
    I'm not an expert on this, so don't quote me, but...

    Quote Originally Posted by grinch View Post
    -What effect this is likely to have on fidelity (I assume the difference will be very slight, but hopefully measurable)
    It is measurable, thought it really depends. Unbalanced signals get worse off the longer the cable is. So like in a concert venue, going from the stage to the sound man booth is almost always balanced I think...but if the cable is less than a meter for instance, then the difference between balanced and unbalanced may not be noticeable. But balanced will still always be better cause common Rf noise can be picked up even on the shortest distance. Also I believe balanced can help prevent annoying noise from ground loops in unbalanced setups (though still I think ground loops can happen in balanced setups still...it is a complex subject).

    Quote Originally Posted by grinch View Post
    My understanding is that the differential IO is always active, and that in the case they are unused they are simply left floating (in the case of the negative differential outputs) or connected to ground via a capacitor (in the case of the negative differential inputs), and that to make use of the differential I/O I simply have to make the proper connections between the codec IO pins and my amplification / filter circuitry. Is this understanding correct?
    This is my general understanding too as general practice...at least that is how the MOTU audio interface I use works to accept both unbalanced and balanced, but when looking at the CS42448 datasheet (https://statics.cirrus.com/pubs/proD...CS42448_F5.pdf) right now on page 47 I see:

    Click image for larger version. 

Name:	signle-ended-cirrus.png 
Views:	17 
Size:	60.0 KB 
ID:	26429

    Which suggests to me that maybe it will function better if you specify that register to 0 if use differential mode.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,490
    Quote Originally Posted by grinch View Post
    -What effect this is likely to have on fidelity (I assume the difference will be very slight, but hopefully measurable)
    According to the datasheet, 3 dB improvement.

    Also pay attention to some of the design guidance, like on page 55: " Full analog performance will therefore not be realized using a passive filter."


    -Whether there is any additional modification or configuration will I have to do to make this work with the Audio library code for the CS42448 and the example project circuit. My understanding is that the differential IO is always active, and that in the case they are unused they are simply left floating (in the case of the negative differential outputs) or connected to ground via a capacitor (in the case of the negative differential inputs), and that to make use of the differential I/O I simply have to make the proper connections between the codec IO pins and my amplification / filter circuitry. Is this understanding correct?
    That's also my understanding, though I have personally only ever used this chip in single ended mode and only with passive filters.

    Maybe info from this project can help?

    https://forum.pjrc.com/threads/68166...mixer-hardware

  4. #4
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,450
    If you've got noisy grounds then the improvement could be more than 3dB as the ground noise is finessed.

  5. #5
    Quote Originally Posted by PaulStoffregen View Post
    That's also my understanding, though I have personally only ever used this chip in single ended mode and only with passive filters.
    Awesome, that's good to hear. The main thing I wanted to check was that there wasn't some single-ended vs differential configuration register that was getting set under the hood of the CS42448 object in the audio library. Thanks for confirming that.

  6. #6
    Also, maybe I could take this opportunity to ask how you are using the address pins? Is this for the future stackable application you mention in the article? I was thinking of having both these pins grounded since I'm only ever going to be using the one codec chip with the board I'm designing.

  7. #7
    Also, can I ask what your rationale was for using traces for the grounds rather than solid ground planes? Was debating which to go with on my layout and would love to get the benefit of your expertise.

  8. #8
    Junior Member
    Join Date
    Nov 2019
    Location
    Piedmont, OK
    Posts
    18
    Quote Originally Posted by grinch View Post
    Awesome, that's good to hear. The main thing I wanted to check was that there wasn't some single-ended vs differential configuration register that was getting set under the hood of the CS42448 object in the audio library. Thanks for confirming that.
    Actually, there is.
    The ADC configuration register must be set to differential input mode. That is done in Arduino\hardware\teensy\avr\libraries\Audio\contro l_cs42448.cpp in the default_config[] by setting CS42448_ADC_Control_DAC_DeEmphasis to whatever your design requires (per the data sheet).

    Note that the files here will be updated - and your changes overwritten - each time you update Teensyduino... so keep backups of the files that you change in the base install.

    -T

  9. #9
    Junior Member
    Join Date
    Nov 2019
    Location
    Piedmont, OK
    Posts
    18
    Quote Originally Posted by grinch View Post
    Also, can I ask what your rationale was for using traces for the grounds rather than solid ground planes? Was debating which to go with on my layout and would love to get the benefit of your expertise.
    Consider having a look at the pdf for the CS42448 evaluation board. There is a lot of good information there on implementation, although it would have been nice if they included the BOM along with the layout.

Posting Permissions

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