Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: PCM signal (Read 7036 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

PCM signal

Hi all , I am new here.

I got one question but do not know which box i should put.

I am doing the project about digital class D amplifier. My assigned worked is digital PWM . So my input is the PCM signal 44.1khz and 16 bit . I need to detect the value sampling point from the PCM and then produce the new sampling point due to new algorithm. The problem i am facing is I do not know the format of PCM .
The PCM signal is the squence of the binary bit (1001010101101...1) , but i need to know whether it is unsigned or signed format. What i meant is i need to know whether PCM used the 2's complement or not, since i need to detect the value of PCM sampling point.


Can anyone tell me the format of PCM signal? does it use the 2's complement when produce the PCM signal.

Many thanks,
Clark

PCM signal

Reply #1
This should go to the Scientific/R&D. There you can get some help.

Anyway, raw PCM samples are written in 2's complement. First value is for the left channel, then follows the right. You just need to figure out the byte order—Intel (LSB, MSB) or Motorola (MSB, LSB).

This is the output from the Audition of a 16 bit stereo file made just from the 4 samples: 0 0 -1 1 (left channel, right, left, right). It is saved as raw 16 bit PCM in Intel format. Then displayed in hex viewer:

00000000: 00 00 00 00 FF FF 01 00 |
If age or weaknes doe prohibyte bloudletting you must use boxing

PCM signal

Reply #2
It depends on the system.  Saying "PCM" is like saying "FM" (frequency modulation).    If I remember correctly, a 16-bit Windows WAV file is stored as signed integers (I think it's 2's compliment),  but an 8-bit Windows WAV file is stored as unsigned integers.

But, I assume you're working with a PCM stream, rather than a PCM file...  If you're using an S/PDIF connection, you'll need to find the specs/protocol.  ...The Wikipedia S/PDIF article doesn't look like it's got the kind of detail you need, but it does have some links that might lead you to the actual standards. 

If you are trying to decode streaming data, it seems to me that it could get very complicated with all sorts of variations including the various multichannel options from mono to 5.1 channel surround.

If we are talking about  S/PDIF...  In the "real world", all of that S/PDIF stuff would be left to the chip designer.  The amplifier designer would choose an existing S/PDIF interface-chip, and he would use the specs from the chip manufacturer to design the interface between that chip and the amp's other circuitry.  If you are actually going to built this thing yourself (for a university project, or something), you should probably consider doing something similar.

PCM signal

Reply #3
Thank all your information

My prof got mention that i need to know how they store the data in the CD(compart Disk).(44.1khz and 16 bits)

What i research is they store the PCM signal in the CD, or can say they store the sequence of th bit string:0s or 1s , and the information can be dectected by laser of Cd players.

so the binary sequence in the CD is 2 complement or just the unsigned binary num ?

I am so sorry if i ask some stupid question

Many thanks

PCM signal

Reply #4
Just to make it clear, I want to know for the normal PCM signal ( used in  CD, or just for music , not video), the common PCM is signed( -2^(b/2) to 2^(b/2) -1) or unsigned ( 0 to 2^b -1) sampling with b is the resolution. Which one is common used, signed or unsigned range?


Can mod/admin move this topic to the Scientist R/D for me ? Thank alot

Many thanks,

PCM signal

Reply #5
Just to make it clear, I want to know for the normal PCM signal ( used in  CD, or just for music , not video), the common PCM is signed( -2^(b/2) to 2^(b/2) -1) or unsigned ( 0 to 2^b -1) sampling with b is the resolution. Which one is common used, signed or unsigned range?

The PCM data on CDs is 16-bit signed integers. They range from -32768 to +32767.

PCM signal

Reply #6
thank a lot .., one more request . Do you have any material or document about PCM in CD ?


Again, thank a lot

PCM signal

Reply #7
Here is a standard about CD-ROM. Audio CD is basically the same, but without scrambling, and without error correction blocks (like CD-ROM mode 2 form 2) : http://www.ecma-international.org/publicat...ds/Ecma-130.htm
I don't know if it deals with the NRZ part (the conversion from the EFM data into pits and lands).

Taking the PCM data from the laser signal is a quite challenging task. You would have to build an NRZ decoder, then a control chip in order to identify sync headers, then an EFM decoder (table D1 of ECMA 130), then a de-interleaver, then an error correcter, then another de-interleaver, then another error correcter, then a last de-interleaver (figure C2 of ECMA-130).

Amazingly enough, this have already been done by the guys at CDFreaks :
http://club.cdfreaks.com/showthread.php?t=129410
http://club.cdfreaks.com/showthread.php?t=191196

 

PCM signal

Reply #8
I want to know for the normal PCM signal ( used in  CD, or just for music , not video), the common PCM is signed( -2^(b/2) to 2^(b/2) -1) or unsigned ( 0 to 2^b -1) sampling with b is the resolution.


In case you're writing a report; I think it should say 2^(b-1) rather than 2^(b/2).