??? 03/07/07 23:00 Read: times |
#134552 - dte-dce-dce-dte Responding to: ???'s previous message |
Eugene Yong said:
1. When i was reading a website regarding serial communication and its related signal pins, i came across this quote saying that the TxD pin of the DTE (in this case 8051) is supposed to be connected to TxD pin of the DCE (modem). This is also called as straight through cable. The question here, is why? I thought the TxD of DTE is supposed to be connected to RxD of DCE since the DCE is supposed to accept command from the DTE.
2. Also, how am i supposed to know whether the modem has successfully execute each AT Command i fed into it (before i send additional AT Command)? Is this sufficient just by looking at the TI flag everytime i send out a the last character of a command (Meaning, i am allowed to send new command once the TI flag is asserted)? Or must i wait for a status signal via CTS from the modem? 1) TX pin for a modem is an input pin. TX is always an input for a DCE. it's an output for DTE. For RX the inverse is true. The modem receives data from the line and sends it to the DTE via the RX pin. That's why you need to mess around with the cable-layout if you want to connect two DTE's back-to-back without DCE's in between. 2. Why don't you try your modem first with a serial port on a PC and hyperterminal (or any other terminal emulation program)? You will quickly notice that default answer for a correctly sent command is "OK" (most likely followed by CR/LF) However this need not be. It is possible to configure the modem such that he replies with a digit (cfr return code of a program). So, why not see for yourself and try it out first... Oh yes, don't forget that if you are writing your 8052 program, that the modem will echo each character you send to it, unless you disable echo... regards Patrick |