# UART communication bet controller and smart card reader over UART

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?

• 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. – Aircraft Nov 20 '15 at 7:06
• You should reverse the 2. arrow pointing in the direction of data flow. – Martin Zabel Nov 20 '15 at 7:10
• 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? – Electroholic Nov 20 '15 at 8:23
• 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? – Martin Zabel Nov 20 '15 at 9:24
• I want to use same lines for MAX232. I am basically trapping(reading) UART signals. – Electroholic Nov 20 '15 at 9:30

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.