| ??? 12/15/03 13:33 Read: times |
#60613 - RE: Previously Unsolved problem. Using Modem Responding to: ???'s previous message |
Russel said:
In the main procedure, you test port1== 0x7f to decide whether to hang up. I dare say you want to test the transition of p1.7 to determine when to hang up. Hi Russel Bull, that piece of code that check the MSB of P1 is for a different purpose. Im not checking that bit to see if I have to send a different command to the modem. As i said earlier, I am using another board for checking the communication with the modem and that board has an LED connected to the MSB of P1 and it was set to 0, all the others are set (by means of an external dip switch) to 1. So, any change in the first 7 bits of port 1 should trigger the next function. [quote = Russel] Also, remember that the modem doesn't respond instantaneously - some delays will be required. After sending the ATH the modem will need a few hundred milliseconds to do what you want. If after this time the modem hasn't responded you can either retry or fail the operation. Thus the beauty of the state machine. To get really smart you could execute the state machine every 100mS. Well, that was the direction I was looking for. Actually what I wanted was the sequence and Handshake protocol that the modem follows (Like Set the RTS line first, wait for CTS line then do something etc etc.. wait for xx msec for a response etc..) This protocol, I could not get anywhere (little help from Mr. Google). Thanks and by the way, Im not a lazy ass, Im an overloaded (with work) ass :) Merry Christmas, CHeers, Harsha. |



