Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/02/03 23:12
Read: times


 
#47303 - RE: removing from check list
Responding to: ???'s previous message
Now really iam thankful to all of you again for providing me helpful replies..now please try to understand that iam not neglecting the suggestions that are given by you people. for this monitoring thing but just to make my question clear iam putting some more information but before that in reponse to ijaz and other ..i promise that as soon as my pbx thing is complete i will place every thing on the interesting link on this website so that next time when any one thing of designing pbx he has some source ..may i call my pbx design link as PBX Bible..

any ways..

after few experiments i have understand how to use MT8816 , controller and my SLIC circuit..

Now i have made hardware for four users. Now working on its software... working step by step...

Firstly controller have to monitor p2.0,p2.1,p2.2,p2.3 to check which telephone is off-hook or on hook or pulse dialing is occurring out of four.

for this i have made the following program (hope it will not drive you all mad at me again i have used interrupts ) but before that few notes

1) Now the aim is to make such code which can do scanning work for four bits after 10 milliseconds interrupt, check which telephone set is off_hook,

2) as soon as controller find off-hook,

3) That Bit is branch to the sub-routine of Dial Tone and waiting for dialing

4) if dialing is done program branches to dialing scheme otherwise

5) see if the telephone is off-hook for more than 5 Seconds then remove it from Dial tone and sent it to Engage Tone list untill that set goes on-hook again.

6) Now the main program generates interrupt all the time and do scanning work after 10milli-seconds.

7) how i can make the program to generate 5 seconds delay for dial tone and if in that time a digit is pressed ( low signal) then reset the timer and again wait for 5 second to let the user dial a number...

8) problem is with the second timing scheme as if i use delays then the program will not be able to do any thing else...at this stage i have used the previous and new value thing....considering that off-hook occur as a high signal comes.

timer problem how to remove from list so that if once the telephone is off-hook controller does not check its bit to see if it is off hook or not ...

now this work is for four telephone sets...at the same time all can be off-hook..do i have to use some kind of refreshing technqiue as it is used in case of 7-segment display connected to only one port and using transistors and refreshing the display 30 times a second..

some hints please.


current equ 20h ;bit wise area for current status
previous equ 21h

ORG 00H
ljmp Main
org 00bh ;timer 0 vector address
ljmp scan ; timer 0 isr



org 030h
MAIN:
mov p2,#0ffh ; using p2 as input
MOV current,#0ffh
mov previous,#0ffh
mov tmod,#00000001b ;timer 0 in 16 bit mode.
mov th0,#high(-10000) ;10milli-second high time
mov tl0,#low(-10000) ;10milli-second low time
setb ea
setb et0
setb tr0



SCAN:
mov th0,#high(-10000) ;10milli-second high time
mov tl0,#low(-10000) ;10milli-second low time
mov A,P2 ; current state of telephone sets.
mov current,A
CPL A
XRL A,previous

; now the following checks are for detecting which telephone out of four goes off_hook, scannig is done after 10milliseconds

OFF_HOOK0:
JNB ACC.0,OFF_HOOK1
PUSH ACC
CALL 1ST_TIME0 ;dialtone&waiting 4 dialing
POP ACC

OFF_HOOK1:
JNB ACC.1,OFF_HOOK2
PUSH ACC
CALL 1ST_TIME1
POP ACC

OFF_HOOK2:
JNB ACC.1,OFF_HOOK3
PUSH ACC
CALL 1ST_TIME2
POP ACC

OFF_HOOK3:
JNB ACC.1,CHECK_PREVIOUS
PUSH ACC
CALL 1ST_TIME3
POP ACC


CHECK_PREVIOUS:
MOV A,PREVIOUS

OLD _OFF_HOOK0:
JNB ACC.0,OLD_OFF_HOOK1
PUSH ACC
CALL OLD_OFF0
POP ACC

OLD _OFF_HOOK1:
JNB ACC.1,OLD_OFF_HOOK2
PUSH ACC
CALL OLD_OFF1
POP ACC

OLD _OFF_HOOK2:
JNB ACC.2,OLD_OFF_HOOK3
PUSH ACC
CALL OLD_OFF2
POP ACC

OLD _OFF_HOOK3:
JNB ACC.3,clean_up
PUSH ACC
CALL OLD_OFF3
POP ACC

clean_up:
mov A,current
mov pre,A
LJMP scan
reti




List of 26 messages in thread
TopicAuthorDate
removing from check list            01/01/70 00:00      
   RE: removing from check list            01/01/70 00:00      
      RE: removing from check list            01/01/70 00:00      
      RE: removing from check list            01/01/70 00:00      
      RE: removing from check list            01/01/70 00:00      
         RE: removing from check list            01/01/70 00:00      
   RE: removing from check list            01/01/70 00:00      
   RE: removing from check list            01/01/70 00:00      
      RE: removing from check list            01/01/70 00:00      
         RE: removing from check list            01/01/70 00:00      
            mahmood Elnasser            01/01/70 00:00      
         RE: removing from check list            01/01/70 00:00      
   same old war            01/01/70 00:00      
      RE: same old waqar            01/01/70 00:00      
      RE: same old war            01/01/70 00:00      
         Tutorials addition            01/01/70 00:00      
         RE: same old war            01/01/70 00:00      
            RE: same old war            01/01/70 00:00      
         RE: same old war            01/01/70 00:00      
         Stepper Motor Control            01/01/70 00:00      
            RE: Stepper Motor Control            01/01/70 00:00      
               RE: Stepper Motor Control            01/01/70 00:00      
                  RE: Stepper Motor Control            01/01/70 00:00      
   i will make the circuit            01/01/70 00:00      
      Congratulations - Mike            01/01/70 00:00      
         RE: Congratulations - Mike            01/01/70 00:00      

Back to Subject List