DAC audio signal frequency indicator - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 15th June 2012, 04:20 PM   #1
Stanga is offline Stanga  United Kingdom
diyAudio Member
 
Join Date: Apr 2009
Default DAC audio signal frequency indicator

Hi all, I often see the frequency of the incoming digital signal on a DAC shown on a display. But I cannot figure out how this is done. Does anyone have a circuit to show how the sampling frequency is read, or know how it is done in the first place?

Last edited by Stanga; 15th June 2012 at 04:29 PM.
  Reply With Quote
Old 15th June 2012, 04:45 PM   #2
macboy is offline macboy  Canada
diyAudio Member
 
Join Date: Oct 2003
Location: Ottawa, Canada
You need to measure the frequency of the word clock. This signal may be known as WCLK, LRCLK (left/right clock), or another similar name. There are other clocks used by the DAC, which may be called SYSCLK, SCLK, MCLK, BCLK, etc. You don't care about those. The word clock toggles at the sampling frequency, so 44100 Hz or 48000 Hz, etc.

If you are lucky, then the clock signal names may be labelled on the silkscreen of the PCB, or you may have a copy of the schematic. Otherwise you may need to find datasheets for the DAC (or S/PDIF receiver) to find the location of the signals. Once you find the signal, you need to measure and display it. For a microcontroller geek, it is easy to create a simple program that will count the number of transistions on that clock in a second (or a fraction of a second) and display that value on a LCD or other display. These days, microcontrollers such as the Arduino are available for the less geeky (i.e. not interested in writing assembly code and pouring over datasheets). I have never used Arduino, as I am one of the aforementioned geeks, but they are immensely popular.
  Reply With Quote
Old 15th June 2012, 05:28 PM   #3
diyAudio Member
 
Join Date: May 2010
If you are going to invest in a microcontroller to determine the sample rate, it's probably easier to read the rate from the channel status block that is stored in the S/PDIF receiver.
  Reply With Quote
Old 15th June 2012, 06:29 PM   #4
macboy is offline macboy  Canada
diyAudio Member
 
Join Date: Oct 2003
Location: Ottawa, Canada
Some S/PDIF receivers can not discriminate between 88.1 kHz and 96 kHz. It is also much easier to do count-and-display than to implement I2C or SPI to read registers in the S/PDIF chip. The exception is if there are direct hardware/pin outputs to convey this information, noting the caveat above for 88.1/96. From memory, I know that the TI DIR1703 does have "format" pins that can tell you the sampling frequency, but 88.1 and 96 are identified as the same.
  Reply With Quote
Old 15th June 2012, 06:47 PM   #5
Stanga is offline Stanga  United Kingdom
diyAudio Member
 
Join Date: Apr 2009
Wow! I am the worst coder that I have ever come across. Hardware is another matter. This might be above me, but at the same time it looks like a possible good project. I can't find anything on the net in terms of DIY attempt by anyone else.
  Reply With Quote
Old 15th June 2012, 08:29 PM   #6
diyAudio Member
 
Join Date: May 2010
macboy, the Channel Status bits are set by the transmitter, not the receiver, and the transmitter usually knows the data rate of the signal it is transmitting and can set the bits appropriately. The problems you allude to are due to S/PDIF receivers who's design predates the formal adoption of the bit assignments for additional sample rates or don't have enough pins to specifically identify all possible sample rates.

Most modern microcontrollers have dedicated interfaces for SPI and I2C. High-level development environments, such as Arduino, have libraries that use those interfaces. The APIs are trivial. I think its easier to do a simple function call to read a specific byte from the Channel Status and decode the bits to identify transmitted sample rate than count signal transitions in a defined time period.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beautiful 6E2 cateye signal level indicator siliconray Vendor's Bazaar 0 3rd October 2011 08:29 AM
Need audio input indicator graygem Analog Line Level 10 14th April 2011 12:42 AM
Signal Indicator LED Noise? turantual Solid State 4 15th August 2008 11:13 AM
"Signal Lock" Indicator for CS8412/TDA1543 Nisbeth Digital Source 7 5th January 2004 09:02 PM
Audio DAC as signal generator (Need DC output). haldor Digital Source 21 7th December 2002 01:05 AM


New To Site? Need Help?

All times are GMT. The time now is 05:06 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2