I am realising ISO7816-3 SmartCard interface with level translator. I am using MCU LPC54608 and TXB0104 as level translator. Power level on smart card - 3.0V (Class B), voltage level on MCU - 3.3V. In future also need support Class A (5.0V) and Class C (1.8V). In MCU side I/O pin have pull-up resistor 100k, in SmartCard side pull-up 100k too.
I correct receive ATR, oscillograme of it (clock frequency 2MHz):
But, if I try to send data to interface, I see this (data byte 0xAA):
I see, that data transmited, but translator switch from 1 to 0 and locked in this state.
If I didn't setup "Smart Card Interface Enable" bit in SCICTRL register, I have this oscillograme:
Thus levels sets ok.
Also, in experiments with SC0IO pin (P0.20) in GPIO-mode, I made a state transition table:
- Switch Pin State L to Pin State H, then real bus level H.
- Switch Pin State H to Pin State L, then real bus level L.
- Switch Pin State Z to Pin State L, then real bus level L.
- Switch Pin State Z to Pin State H, then real bus level H.
- Switch Pin State L to Pin State Z, then real bus level L. No switching! Because translator so work.
- Switch Pin State H to Pin State Z, then real bus level H.
So I conclude, that SC0IO in SmartCard mode work as Open-Drain. But open-drain pins (and L-Z pin-switching) - features of I2C or iButton interfaces, in ISO7816-3 this did not use!
Without TXB0104 and speed setup TA=0x96 (clock frequency 5MHz, etu value is 16) and pull up 100k, I have this oscillograme on transmit:
This confirms, that IO pin work in Open-Drain mode.
- How I can use SMARTCARD interface in push-pull mode?
- Chapter 31.5.11 of UM10912 recommended push-up resistor on I/O pin. What value should be this resistor for big baudrates (TA=0x96 or TA=0x97, i.e. ~300bps and 600bsp) on smartcard bus?
- What the level translator recommended by NXP?
SmartCard interface initialization example in attach.