cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Card interface using standard UART

tyronevs
Associate II
Posted on September 11, 2007 at 03:14

Smart Card interface using standard UART

1 REPLY 1
tyronevs
Associate II
Posted on September 11, 2007 at 03:14

Good morning all,

I am battling to get something right on the STR712 that works quite well on Atmel's SAM7S.

I need to interface to smart cards using the normal UARTs on the MCU. I know that this is possible as I have done it on an Atmel SAM7S as well as an Altera Cyclone FPGA running a NIOS II processor.

The reason why I want to change from the SAM7 to the STR712, is that there are 4 UARTs in the STR, as opposed to only 2 UARTs (excl. the debug UART) on the SAM7S. I am aware of the ISO7816 mode that can be used, but this cannot be done on all the UARTs.

The way I got it to work on the SAM7S is to run the TX line trough two BC337 NPN transistors with pull-ups to the I/O line of the smart card. This same line is also connected to the UART RX line. Thus, all that needs to happen in software is that when you transmit, the RX'er is switched off, and once your have finished TX'ing, you switch the TX'er off and the RX'er on.

I have tried many things using the STR712SK/IAR, but I am not getting any luck. It seems like the device I am interfacing to see's my data, but I am not getting any data back after the ATR. I am wondering if there isn't line contention, as there is no way that I can see from the datasheets that you can switch the TX'er off. (This you can do with the SAM7S)

I have checked my data on a scope and everything looks 100%. (Data rate 8960 8-E-1)

Can anyone tell me if there is a way to switch the TX'er off?

If I can't get this working soon, I need to use the SAM7S, and the problem is that I will then need double the amount of MCU's. (I need to emulate 32 smart cards!!!) So this would mean instead of using 8 STR7's, I will need 16 SAM7S's!!!!

Please advise. (I know the clever guys are out there!!! :-] )

Regards,

Gizmo