single wire hardware uart

Dear Team,
I googled alot and read a lot. but I am not understand how to avoid the char sent by TX it will loop back to RX since the TX and RX were
tied together.
how to avoid this in hardware level or software level?

what am trying to do is emulate a 7816 smart card.

Thanks
BL.

On the Arduino the RX and TX lines are not tied together

Please post a schematic of your system

Post a link to the datasheet for the 7816 smart card.

Why not write your own "SoftwareSerial" code to de exactly what you want? The code in this Thread may provide a starting point.

...R

thank for reply my post :slight_smile:

it is a iso7816 smart card simulator. just like old days for "Fun Card". but the "fun card" or the like they all need the external clock from GSM phone or card reader to work.

am trying to make a smart card which has it own clock runs at 16Mhz.

and I/O of smart card only has one wire. so I need tied the RX and TX together to connect.

for software uart. because I am not good at math. so I do not know how to calculate the "ETU" which runs at 3.25Mhz.

http://www.smartcardsupply.com/Content/Cards/7816standard.htm

by the way am not good at English as well.
thanks
BL

have you seen this thread

http://forum.arduino.cc/index.php/topic,22664.0.html

However if I search on single wire rs232 it doesnt turn up anything particularly useful

Are you sure single wire rs232 is even possible ?

how to avoid this in hardware level or software level?

You could put a unique character in the data being sent to identify the sender, which would allow the detection and discarding of self generated data packets.

zoomkat:

how to avoid this in hardware level or software level?

You could put a unique character in the data being sent to identify the sender, which would allow the detection and discarding of self generated data packets.

for other project seem OK to do that. but in 7816 case it does not fit. the smart card reader should not "know" the unique character and just ignore it .or even worse it just refuse to work.

rogerClark:
have you seen this thread

http://forum.arduino.cc/index.php/topic,22664.0.html

However if I search on single wire rs232 it doesnt turn up anything particularly useful

Are you sure single wire rs232 is even possible ?

yes I have seen that thread, but the attached pic which sent by "drone" was gone. so I did not get that schematic.

it is possible , in old days the "phoenix reader" or season interface did the tricks which tied RX and TX together. since the default "ETU" is 372 thus the baud rage is 9600.

jtac-:
....snip....
am trying to make a smart card which has it own clock runs at 16Mhz.
...snip....
for software uart. because I am not good at math. so I do not know how to calculate the "ETU" which runs at 3.25Mhz.

I wonder if this performance is achievable with a 16MHz Arduino.

The spec sheet seems to say (from a quick read) that 1MHz would be sufficient.

Is this for a legal and socially responsible activity?

...R

Robin2:

jtac-:
....snip....
am trying to make a smart card which has it own clock runs at 16Mhz.
...snip....
for software uart. because I am not good at math. so I do not know how to calculate the "ETU" which runs at 3.25Mhz.

I wonder if this performance is achievable with a 16MHz Arduino.

The spec sheet seems to say (from a quick read) that 1MHz would be sufficient.

Is this for a legal and socially responsible activity?

...R

it is just my study for ISO 7816. to be honest am not quite understand " legal" or "socially responsible".

Actually I got it work. the send/receive seems work. but it seems AVR/Arduino did not responded when the APDU commands send too fast.

after several transactions the command smart card reader sent was seen by logical analyzer but AVR/arduino did not respond it.