DTMF? and caller ID info

List,

Here's an application note that appeared on AVRfreaks running a FSK modem on an ATmega 8 - just what you need for software based Caller ID.

http://www.avrfreaks.net/modules/FreaksFiles/files/406/DN_027.pdf

Basically you need to amplify the caller ID FSK signal so that it is an approximate square wave, but still contains the timing information of the original sine signal contained in the edges.

By using a timer to time the period between edges you can determine whether the sigmal is high tone or low tone ( Bell 202 standard uses 1200Hz to represent a "1" and 2200Hz to represent a "0" - see this Wiki http://en.wikipedia.org/wiki/Bell_202_modem ) The firmware just sets a digital output high if it detects 1200Hz or sets it low if it sees 2200Hz. The toggling digital output represents a crude demodulation of the serial data.

To accurately decode this, I found that if you feed the waggling digital output back into the Rx pin of the UART (set for 1200 baud reception), it re-times it nicely and produces clean error free data.

I developed the code to the point where the PIC would only answer calls from certain incoming numbers - such as my cell phone, and let all others just ring the phone normally. This would allow you to access for example a home automation device which you could then control with DTMF tones sent from the cell phone.

Alternatively a remote sensor connected to a phone line would only answer calls from a central server, and ignore all other voice calls - thus sharing the phone line with the householder. This works well in Europe where the Caller ID signal is put onto the line BEFORE the first ring, and so it is possible for the micro to pick-up the call before the phone actually rings - allowing the server to call at any time of day or night without disturbing the household.

G