WM8805 Software & S/PDIF mode - 96kHz Problems
I'm trying to use the WM8805 receiver chip as a simple S/PDIF source selector, without read back and we don't need to use the Audio Interface (I2S) of the chip --> disabled.
I have two separately PSUs for Digital and PLL. (both 3V3)
I configure it to use in Software mode & S/PDIF Receive Mode (Page 22), with an Arduino using the I2C Bus, and with a simple crystal of 12MHz.
I have 2 coaxial S/PDIF in and 2 optical in.
I read in the WM8805's datasheet that when using it in S/PDIF Receive Mode, all value of PLL_N and PLL_K are automatically set to Receive and Decode data from 32kHz to 96kHz.
It's only the 192kHz mode (Mode 1) that need a Re-configuration of all the value of PLL, FreqMode, etc But i don't use it yet.
I succeed to use it with a 24b/48kHz sampling rate input (in coaxial and optical) but when switching to 24/96KHz, I can hear music, but too much "cracking" and "popping" noises appear.
I don't think there is problems with my code since the chip is configured to adjust clocking section automatically from 32kHz to 96kHz and I have no problems using it in 48kHz, it is only from 88.2 kHz that problems occur.
Is someone has any idea to clean the signal ?
Is that the problem may come from the cheap crystal (and/or these capacitors) ?
Using a High Precision TCXO may solve the problem ?
I use my computer as the source through an Audio-GD Digital Interface V2 plugged directly into my WM8805 board with a Matrix Mini-i as DAC.
Thanking you in advance,
I worked on this by replacing the 12MHz crystal by a Burson Audio low jitter clock module with a separately power supply and --> no improvements...
It seems the WM8805 doesn't want to lock on the input signal as soon as the sample rate exceeds 48kHz.
The wm8805 is on a TSSOP-to-DIP converter, maybe it plays a role, I don't have enough experience in the digital world to know...
Any idea on the origins of this problem ?
Is it possible that a bad routing with too long traces are too short distance between psu lines and data lines is the origin ?
Sorry for double posting, I don't know what to do now...
If you want picture of the installation or the (ultra-basic) Arduino code, ask me, if it can help you to move forward.
Sounds like config bug. Go hardware mode, check whether it works with 96k
I worked on my W8805 problem, and no improvements, on the contrary !
I moved from my dedicated "custom" pcb to a breadboard layout, first in Software mode, with the same problem (the W8805 doesn't want to lock on a 96kHz incoming sample rate, while in 32kHz, 44,1kHz & 48kHz there are no problems).
Considering the fact that all functions an PLL calculations are "automatic" when using a 12MHz crystal up to 96kHz (Only Mode 1 [196kHz] needs a reprogramming), i don't know what i can do more !
So as suggested, I moved to the Hardware Mode, and in this config, the result is worse, meaning the chip doesn't want to lock on a 44,1kHz or 48kHz incoming signal ! So i think to a hardware/physical problem... but which one ?!
I post some pictures of the actually breadboard, hoping it can help you ...
I also post the Arduino code, relatively basic, maybe I've forgotten something, I hope too.
W8805_HWMode1 - Download - 4shared
W8805_HWMode2 - Download - 4shared
WM8805_SWMode - Download - 4shared
NB : I wanted to insert images directly (with [IMG] tag), but pictures were too big. What is the maximum size of images for this forum to re-size them ?
Sorry for douple post, i didn't find how to edit a message...
BreadBoard with Software Mode setup :
BreadBoard with Hardware mode setup :
And another always in HardWare mode :
mmh, might be a problem with your breadboard setup and the corresponding grounding scheme.
You are dealing with quite high frequency signals in the digital domain. For SPDIF you have arround 3MHz for 48kHz and 6MHz for 96kHz.
Pin9 will output an unlock flag in hardware mode. Here you can see if the PLL was unable to log on the signal.
In hardware mode the chrystal frequency has to be exactly 12MHz in software mode while in software mode it can be 10-14MHz. This might explain the differences in your setup between HW and SW mode.
Thanks for reply.
On the BreadBoard, I know the ground layout is very ugly. But I made a dedicated pcb for the chip (above in green on the pictures) with a ground plane, and the problem was the same.
For the crystal, either in software and Hardware mode, i used a (certainly Cheap) 12MHz xtal.
I've two big doubts :
- the first on that using an adapter board (SSOP to DIP) for the WM8805. Did someone already use it successfully for prototyping ?
-The second on the ugly coaxial sockets for reception (the most critical i think) and transmission with "long" wires that may act as antennas. Is it possible that the problem might come from them ?
Thanking you in advance.
Problem solved, it works even in 192kHz !
An interface SPDIF to TTL with WM's inputs configured in TTL.
The higher the frequency, the lower the signal's level WM input.
So I added a logic buffer (hex inverter [HC, HCV, AHC, ...]) and it works fine now.
Unfortunately, I don't think this conversion stage is essential, but without, on the breadboard and the dedicated PCB, it doesn't work!
Hi Everyone !
I'm trying to improve the sketch to display the Sample frequency in the serial monitor.
This Arduino sketch is just used to get information on Frequency from the WM8805 in 4 different registers :
- bit7 of the Interrupt Status Register (INTSTAT) : an Update Signal of the Recovery Frequency (UPD_REC_FREQ). Just an Interrupt
- bit[5..4] of the SPDIF Status Register (SPDSTAT: the Recovery Frequency (REC_FREQ)
- bit [3..0] of the Channel Status Register 4 (RXCHAN4) : the Sampling Frequency (FREQ)
- bit [7..4] of the Channel Status Register 5 (RXCHAN5) : the Original Sampling Frequency (ORGSAMP)
I Must write in the SPDRX1 Register which Interrupt Status Register is to be Read Back (Page 63 of WM's Datasheet).
The problem is: The FREQ & ORGSAMP bits don't want to update and remain locked on the default value (ie 0001 & 0000, ie "Not indicated" from IEC 60958-3 International Standard" paper p.12 & p.13)
and i don't know why... :scratch1:
Here is the simplified Sketch :
Hope Someone has already get Sampling Frequency from WM8805 and will be able to help me !
Thanking you in advance,
nice job,but did it locked on 192khz in hardware mode ?it shouldn't have problems ,i see many DAC ers use the second crystal for it but dont know if it helps or the contrary
|All times are GMT. The time now is 05:48 AM.|
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Copyright ©1999-2016 diyAudio