Open thejpster opened 11 months ago
SDATA_OUT
, BIT_CLK
, SDATA_IN
, SYNC
and RESET
)
BIT_CLK
is generated by the CODEC so would be an input on the RP2040. BIT_CLK
as an input.RESET
input. Unsure how critical that is.QFN. Has 12 MHz "USB Mode" like TLV320AIC23, but it doesn't have a crystal driver and it's unclear whether it'll actually let you run MCLK and LRCLK unsynchronised.
Edit: Obsolete and not in stock at Digikey
Another option is to put the RP2040 into receive-mode. You just massively oversample the BCLK pin, waiting for the transition, and then clock out the DAC bit and clock in the ADC bit, using auto-push/pull on the FIFO. You spin once waiting for LRCLK on start-up to lock yourself to the left/right. This removes the need to find a CODEC with a PLL that can lock to LRCLK without an MCLK.
As used on the Pico Explorer board and the Pico VGA demo board. Internal PLL to generate SCK from BCLK - you can just ground the SCK pin and feed it BCLK, LRCLK and DATA. Single analog stereo output, so you'd need a headphone amplifier.
PCM5100A, PCM5101A and PCM5102A only differ in SNR - PCM5102A is best.
JLCPCB have 4000 in stock at $1.45. You'd need a matching ADC...
I2S ADC with internal PLL. Only requires LRCLK and BCLK in, and generates DATA out. Designed to go with PCM5100. Four stereo inputs. PCM1862 same but worse SNR. TSSOP-30.
JLCPCB have 4000 in stock at $1.43.
Edit: No JLCPCB now have none
Like a PCM5100 but it has I2C volume control. Unfortunately it's not in stock at JLCPCB.
Like a PCM512x but you can program the DSP instead of relying on the ROM routines. $5 at JLCPCB and only low stocks available.
RSPKOUT receives its audio signal via an additional submixer. This submixer supports combining a traditional alert sound (from the RAUXIN input) with the right channel headphone output mixer signal.
We can wire the BMC PWM beeper output into the RAUXIN pin, which will then be passed to the built-in loudspeaker drive circuit. So, the unit can do PCM beeps but also play PCM audio over the internal speaker (like a Risc PC). This also means it can chime on start-up like a Macintosh.
The MA35D1 board from Nuvoton includes this CODEC, and the user manual has a full schematic including the audio section.
Suggested by Ben Jordan.
Edit: This chip has now been obsoleted
That Nuvoton part won't work - the max PLL scaling factor is 12 and that doesn't get us high enough with a 1.536 MHz input from the RP2040.
I'll see if I can operate the existing TLV320AIC23 in clock-out mode. If so, this search gets a lot easier.
Stop the press! The PIO at 150 MHz ish is more than fast enough to oversample a 12 MHz BCLK and 48 kHz LRCLK from the CODEC. So I need to start again and stop worrying about PLLs.
I think the next step is to make a NAU88C22YG break-out board using the schematic from the MA35D1 board as noted above.
See https://oshwlab.com/Analityk/nau8822, where someone has already made a break-out board.
TI withdrew the TLV320AIC23B, marking it obsolete. This means JLCPCB no longer stock it.
Specifications included:
Edit: Experiments show the RP2040 can take in a 12 MHz BCLK and 44.1 kHz or 48 kHz LRCLK, meaning any notes below about PLLs or taking in clocks are moot. Anything that can generate a BCLK up to 12 MHz should be fine - higher is untested.