Log in

View Full Version : Clock for smart card



aherrera
- 23rd August 2011, 19:45
I am trying to take advantage of picbasic Pro, and a smallpic to create an I2C to Smart Card interface. The point is keep it as simple aspossible and with the least amount of components as possible. If I use a 4MHzceramic resonator, I want to clock the card from the same resonator / clock asthe pic, but I need to be able to set the clock to low on the card until I needit. I was thinking a diode, resistor, clkout and RB0 or something like that. Any ideas?

Charles Linquis
- 24th August 2011, 17:34
I don't know how you are generating the clock (OSC2 perhaps?), but you can probably just put a 2.2K resistor (or so) from that pin to RB0 and then connect RB0 to the smart card.

The program code
TRISB.0 = 1 will allow the line to toggle
and the lines
PORTB.0 = 0
TRISB.0 = 0
will force it low.

All this assumes that your smart card can tolerate the 2.2K resistor in the clock line.