‎Connecting CXD2567M+CXD2562Q via I2S‎

Hey guys! There is a board from Sony CDP-515. I want to connect it via the I2s bus to the media player and use it as an external DAC. Who can tell you where to hook the MCLK wire? Maybe someone has already experimented?
 

Attachments

  • 12345.jpg
    12345.jpg
    484.8 KB · Views: 322
  • SONY CDP-515.pdf
    SONY CDP-515.pdf
    4.3 MB · Views: 324
Last edited:
If nothing else helps, you could use a ASRC board with CS8422. Very convenient and cheap little boards where you could set-up all 3-wire input and output formats with only one (two) resistors as you need.
Even without studying all the datasheet, it takes you only the correct input/output wiring, a handfull of 1k 0805 resistors (even better if you have 2k and 4k also by hand - you just combine them as needed) according to the table attached.
Well, maybe you should read the CS8421 datasheet too 😉

Edit: output sample rate (=MCLK) depends on the crystal oscillator used. Get an 11,286MHz XO for 44,1kHz to fit almost everthing. Some boards had 24,576Mhz installed while others I received with 27MHz (~217kHz).
 

Attachments

  • CS8421.png
    CS8421.png
    20.6 KB · Views: 128
  • ASRC.png
    ASRC.png
    105.5 KB · Views: 126
something i wrote for my CDP-X303ES USB DAC conversion in 2019, that configures the cxd2567m+cxd2562q:
C:
#include <avr/interrupt.h>
#include <avr/io.h>
#include <avr/power.h>
#include <avr/sleep.h>
#include <stdint.h>
#include <util/delay.h>

#define AMUTE PB0
#define USB_POWER PB1
#define ATT PD5
#define SHIFT PD4
#define LATCH PD3

static void send(uint16_t word)
{
    //    if (PORTA & _BV(PA0))
    //        return;

    // Send 16 bits starting with LSB, just like the CDP
    for (uint8_t bit = 0; bit < 16; bit++) {
        PORTD &= ~_BV(SHIFT);

        if ((word >> bit) & 1) {
            PORTD |= _BV(ATT);
        } else {
            PORTD &= ~_BV(ATT);
        }

        // the part allows lower wait times of <600ns, but doing roughly what the CDP does in this whole function
        _delay_us(5);
        PORTD |= _BV(SHIFT);
        _delay_us(5);
    }

    PORTD &= ~_BV(LATCH);
    _delay_us(5);
    PORTD |= _BV(LATCH);
    _delay_us(32);
}

int main(void)
{
    PORTA = _BV(PA0) | _BV(PA1);

    PORTB = _BV(AMUTE);
    DDRB = _BV(AMUTE) | _BV(USB_POWER);

    PORTD = _BV(ATT) | _BV(SHIFT) | _BV(LATCH); // puls them up before changing direction, so that they don't go down even for the short time until DDRD is set
    DDRD = _BV(ATT) | _BV(SHIFT) | _BV(LATCH);

    // switching on I2SoverUSB's USB section before DAC init, therwise DAC fails to init properly
    PORTB |= _BV(USB_POWER); // switch on the optocoupler LED. Could probably just connect it to CDP's RST but whatever. No reason to use an optocoupler, a transistor would do but whatever.
    _delay_ms(3000); // DAC fails to init without delay

    switch (PINA & (_BV(PA0) | _BV(PA1))) { // DIP switches on my PCB
        // exactly as the CDP does, except here attenuations immediately follow the 3 init commands, whereas on the CDP full attenuation happens ~4 seconds later, followed by the 0db half a second later
        case 0b00:
            send(0b0100010000010000);
            send(0b1000000001000000);
            send(0b0001000000000000); // on the CDP it's 0x1000, 0x2000 makes no audible difference
            send(0b0000000000000000); // set full attenuation
            send(0b0000010000000000); // set attenuation to 0 dB (1024 steps accross [1;0x400], zero being complete attenuation)
            break;
        case 0b01: // same just without the redundant(?) full attenuation
            send(0b0100010000010000);
            send(0b1000000001000000);
            send(0b0001000000000000); // can't hear it. might as well skip it altogether
            send(0b0000010000000000); // set attenuation to 0 dB (1024 steps accross [1;0x400], zero being complete attenuation)
            break;
        case 0b10: // without the redundant attenuation and 32bit frame?
            send(0b0100010000100000); // makes the 32bit channel frame work i dunno
            send(0b1000000001000000);
            send(0b0001000000000000); // can't hear it. might as well skip it altogether
            send(0b0000010000000000); // set attenuation to 0 dB (1024 steps accross [1;0x400], zero being complete attenuation)
            break;
        default:
            for (;;) { // signal fault state forever
                PORTB ^= _BV(AMUTE);
                _delay_ms(1000);
            }
    }

    PORTB &= ~_BV(AMUTE); // OK to unmute now

    // Power down the AVR
    cli();
    power_all_disable();
    set_sleep_mode(SLEEP_MODE_PWR_DOWN);
    sleep_enable();
    sleep_cpu();

    for (;;) { // it should never reach here
        PORTB ^= _BV(AMUTE);
        _delay_ms(0xff);
    }
}
I2SoverUSB v.III also connects in place of old 45Mhz XTAL.
i still use this modded CDP to this day