> -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Pedro Drummond > Sent: Wednesday, January 07, 1998 19:45 > To: PICLIST@MITVMA.MIT.EDU > Subject: tones via phone line > > > Hello, friends. > > I need some help. > > In this project I am involved with, I have to send certain numbers through > the phone line. Since it is just a few numbers each time, I decided not to > use a modem chip, and just code my digits in 3 frequencies (440 Hz, 1400 Hz, > 2300 Hz) right out of the processor. > > Basically, what I do to send the code "32" is send 3 pulses (100 ms each) of > 1400 Hz, one pulse of 2300 Hz (same duration) as a separator, and then 2 > more pulses of 1400 Hz. Pulses are separated by a 100ms silence. Roughly, > that's what I am doing. Could not be simpler. > > Concerning the hardware, I have a strong clear signal going out and a > beautiful square wave at the receiver's opamp output. > > I am decoding these frequencies by measuring the pulse width. If the result > is the same for, say, 5 consecutive measurements, then the corresponding > frequency is validated. > > Well, it works great... in some phone lines. And not so great in others, > specially if both phones are separated by a greater distance. I don't know > why, but the decoder tends to miss some pulses in this situation. > > Why this is happening ? Someone told me that it would be better to fill the > 100 ms silences with some frequency, just to keep feeding signal to my > receiver's amplifier. > I don't think it makes much sense, though... Just wondering, why aren't you using DTMF? It is easy, slightly immune t o noise, and there are quite a few encoding and decondings chips out there, true you already have the code for generating and detecting your signals, but by using DTMF you would be compatible with alot of what is out there now. Just a thought. As for your frequencies, 2300hz mught be your problem, it is kinda high, and although almost every phone line out there will pass it, I am concerned that some lines might attenuate (sp?) it a little, which might be throwing off your amp. Just a though, from a person who knows little about analog electronics, but who does know something of modem communications. If you want, and have the time, change to lower freqeuncies, perhaps 600 and 1200hz? That should give enough seperation and although your maximum baud rate would be lower, you are sticking with a 100 interfreq delay so it shouldn't really have much of an effect. Just a thought. TTYL and good luck.