Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pulse to binary Number

Status
Not open for further replies.

waqar

New Member
Dear Sir,

1) I have designed a Hardware for 8 Telephone Set supporting Pulse Dialing no DTMF involved.Using At89c52, Crsytal 11.05 KOH , MT8816.

2) These Telephone are normal Key-Pad ones not the rotary one.

3) Now each of the 8 users can contact with each other by dialing specific Digits...which are:-

11 , 12 , 13 , 14, 15 , 16 , 17 , 18

4) Off Hook - Logical 1
On Hook - Logical 0

5) So controller give on checking 8 bits to see which telephone goes off hook.

6) Now suppose if telephone set "11" goes off-hook connected with P2.0

7) At this Stage controller jmps to telephone "11" routine and P2.0 is in logical High State.

8) Now the controller has to count the incoming Pulse Dialing from P2.0...

9)So in other words controller has to count number of logical zeros ,

10) after receiving the pulses for a specific time from the user controller check the dialed number with a lookup table and if the dialed number is in the loopup table controller perforum a task other wise perform nothing...

11) The thing which is causing me trouble is not the lookup table , not scanning the port , it is how to count the pulses in a such a way that following conditions are satisfied:-

a) User Must dial the number within 30 Seconds of Off-Hook or dial the complete number in 30 seconds otherwise he has to go on hook again and the dial .

b) the user must dial the number as mentioned above other wise controller do nothing..

c) if the user dial his own Number then also controller do nothing..


12) Now this counting thing , how to count it in a exact way:

like we can set out own parameters of Make : Break ratio and Inter-Digit Space but how to count it exact to get a Number...

Now the controller has to only look for the following digits:-

1) 11 --- means total 2 pulses.
2) 12 ---- means total 3 pulses
3) 13 ----- means total 4 pulses
4) 14 ---- means total 5 pulses
5) 15 --- means total 6 pulses
6) 16 --- means total 7 pulses
7) 17 --- means total 8 pulses
8) 18 ---- means total 9 pulses

Now can i do the following:

1) When the telephone goes off Hook,
2) 30 Second Timer Start
3) Timer is stopped if low comes to the bit
4) When this low comes controller increment a Register the number of times the bit gets low.

really i don't understand this ..like incrementing the register will not help as if 4 is pressed 4 pulses come...and how can the register increment it self and make it self 4 from 0 even if a loop is used the exact counting is not happening..

Is there any way like when ever the off hook bit goes High , the timer of 30 seconds start and the Internal Timer Counter is also get ready for pulse counting but it has to be in mind that there 8 telephone sets coz if it was not so then simply external timer counter internal pin may be used..
So like at the end of the day 8 bit binary number should be there before looking in Look Up table...

Its Like Converting Pulses into 8 bit Binary Number...

i don;'t need the entire code its just a matter of one click ...a example for one user dial like how to detect number "11" or "12"


Waqar
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top