# Detecting whether the card is present or not in a smart card reader

Recently I bought a 32320 Smart Card Reader. I had no trouble making the circuit, but I could not figure out what command to use to tell if the card is in or not. Any ideas?

-
No, because we don't know what a "32320" is! –  Federico Russo May 24 '12 at 16:12
Do you have a link to the datasheet? (and no, the linked document is not a datasheet) –  Kellenjb May 24 '12 at 16:18
In the linked document, you have the CD pin. Did you try using it? It should provide card presence information. –  AndrejaKo May 24 '12 at 16:25
Pin 2 = CD = Card Detect changes when card is inserted. Read it. –  Russell McMahon May 24 '12 at 16:28

The code examples for the card reader is well hidden on their site. Nice products. hard to find docs. Look for the smart card code examples.

And dont worry if you dont give us enough information, It was hard for me to find it too.

**'' Define Smart Card connections
' allows non-contiguous pin usage
cd := cdpin
dira[cd] := 0
pub detect | ok
'' Detects insertion and presence of Smart Card
if (ina[cd] == 1)               ' inserted?
start                         ' check card
ok := (write(\$A0) == ACK)
stop
else
ok := false
return ok  *


http://obex.parallax.com/objects/649/

-