On Mon, 23 Sep 2002, Nathan wrote:
>
> I am wanting to sample input from a telephone, encode that input into
> mu-law audio format, and then send that data over a LAN to another
> machine. I found a company that sells boards that use the CS8900
> ethernet chips (preassembled and kits), as well as a tutorial on how
> to send UDP packets over an ethernet link using it. Right now however,
> I am more concerned with sampling the signal from the telephone, and
> to make sure my basic design for that is correct.
As I recall mu-law is 8 bit coding of 12 bit dynamic range. So if you wish
to provide full dynamic range you should convert at 12 bits and have a
lookdown table. If full dynamic range is important to you. Personally I'd
probably use a 10 bit PIC since I have them already.
>
> Since human speech usually is below 4000 hz, the minimum sample rate I
> would need is 8,000 samples per second. Since the signal itself's
> highest frequency should be around 4000 hz, a 12 bit resolution (4096
> possible values) should work. Is this correct?
First part yes, second part no. The lowest sample rate for 4000 Hz is 8000
samples per second. It has nothing to do with resolution of the converter.
> I have been looking at the PIC16C77X MCUs.. I was also looking at the
How about the 18F252 or 18F452? Cheaper and better.
{Quote hidden}> So here are some more somewhat basic questions:
>
> The pinout diagram shows pins 11 as AVdd, pin 12 as AVss, pin 4 as
> VRef- and pin 5 as VRef+. These are all of the pins I will
> need to use specifically for the ADC part of things, correct? I wish to
> have a telephone connected via a standard telephone cord to an RJ11 jack
> on a standalone unit (with among other things the PIC in it). A 9V power
> supply will be used to power the phone line. Since 9v is way too much to
> connect to the AD on the PIC (correct?), a resistor will need to be used
> to get it below the 4.096V level (which is the max voltage level for
> AVDD,AVSS right?).
>
> So, basically I was thinking the negative terminal on the battery can
> be connected to the RING pin on the RJ11 jack, and the TIP pin on the
> jack can be connected to the Avdd pin on the PIC, and have the AVss
> pin connected to the positive terminal on the battery... I would need
> a resistor inbetween the RJ11 TIP pin and the AVDD pin (correct?)..
Interfacing to the telephone line requires a bit more understanding of
telephone lines in general. First off, it's balanced line audio. You are
familiar with unbalanced lines.
Secondly, if it is telephone lines outside of the central office, it has
DC on it as well. So you need to block the DC.
You can probably get away with a less-than-perfect interface with the
phone line to prove your concept. Just don't hook an oscilloscope or any
other grounded piece of equipment to the phone line in a way that grounds
either tip or ring.
> what to use for VREF + or VREF -... In the datasheet it mentions "The
> analog reference voltages are software selectable to either the
> device's analog positive and negative supply voltages (AVDD/AVSS),
> the voltage level on the VREF+ and VREF- pins, or the internal
> voltage reference if available (VRH, VRL)." Does this mean that only
> the AVDD, and AVSS pins are necessary, and VREF+ and - are not needed,
> assuming I set the reference voltage to the analog positive and negative
> supply?
Yes, that's what you'd want to do. Amplify the audio so it has 2.5 volts
of DC on it and enough signal to go rail to rail at maximum level.
Keep asking questions!
Cheerful regards,
Bob
--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspam
.....mitvma.mit.edu