0
\$\begingroup\$

I am newbie to UART interface. My query is, in my application, smart card reader is interfaced with controller LPC2138 over UART interface.

Connection scheme:

uP ( TxD) --> reader (RxD)

uP ( RxD) --> reader (TxD)

I want to trap these (RxD,TxD) signals on hyper terminal, if I connect MAX232 to UART pins and if while communication bet uP and reader, MAX232 is interafced on same lines.. Is it possible ? Can I trap signals?

\$\endgroup\$
  • 1
    \$\begingroup\$ Yes connecting Max232 will work. Few months back I was working on GSM so I used the MAX232 to see the data transmission between Micro Controller and GSM module. \$\endgroup\$ – Aircraft Nov 20 '15 at 7:06
  • 1
    \$\begingroup\$ You should reverse the 2. arrow pointing in the direction of data flow. \$\endgroup\$ – Martin Zabel Nov 20 '15 at 7:10
  • \$\begingroup\$ Thanks for answer. @Martin, I'm not getting abt pin reversal you mentioned. For MAX interface, If I connect TxD to T1IN, RxD to R1Out, T1Out to Pin 2 of DB9 and R1IN to pin3, Is it correct? \$\endgroup\$ – Electroholic Nov 20 '15 at 8:23
  • \$\begingroup\$ Maybe i misunderstood your question. You want to look at the communication between uP and reader, right? Do you want to place your PC/laptop in between? This would require two serial ports. Or do you just want to connect to the existing wires? \$\endgroup\$ – Martin Zabel Nov 20 '15 at 9:24
  • \$\begingroup\$ I want to use same lines for MAX232. I am basically trapping(reading) UART signals. \$\endgroup\$ – Electroholic Nov 20 '15 at 9:30
1
\$\begingroup\$

EDIT: After some clarification...

The intended setup is only possible with two serial ports on the PC/laptop.

The MAX232 has two amplifiers to convert from the CMOS/TTL voltage level (wire to observe) to the RS232 voltage levels of the serial cable. But, the serial port of the PC/laptop (aka. DTE) has only one receive data pin (RXD, pin 2 at DE-9 connector of the DTE). The other data pin (TXD) is driven in the opposite, and thus wrong, direction.

The wire to observe must be connected to the T1IN (pin 11) or T2IN (pin 10) input of the MAX232. The level-shifted outputs are then T1OUT (pin 14) and T2OUT (pin 7), respectively. One of these outputs must then be connected to pin 9 of the DE-9 connector of the DTE.

This is also a sort of a null modem link. Thus, one must connect DTR (pin 4) to DSR (pin 6) and DCD (pin 1). As well as RTS (pin 7) to CTS (pin 8). All pin numbers are given of the DE-9 connector of the DTE.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.