Timers for counting Telephone rings...!?

Status
Not open for further replies.

goug

New Member
Hello, I am new to PIC, and actually working with a 16F877A for my final project;

I built a circuit that detects telephone rings and sends 5V input to RA0 of PORTA each time the telephone rings. The PIC will set RB0 of PortB when the telephone rings 5 times let say.

Counting rings is not the problem. But what if someone calls 2 rings and after 10 min another person calls 3 rings... it will be detected as 5 successive rings; I don't want that to happen, so got the idea to set a timer that waits 30 seconds then send an interrupt to PIC.

How to declare and set a timer that waits 30 seconds then send an interrupt to PIC?

Is there any other idea about how to count rings knowing that the cadence 5V/0V to pic's input is the same as telephone ringing tone 1.18s/4.52s?

I tried to use Timer2, but didn't understand the pre/post-scaler issue

Can anyone help? THanks a lot :">
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…