Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[Ideas For Design]
Read Smart Cards With A BASIC STAMP

Contributing Author  |   ED Online ID #6229  |   March 8, 1999


With eight general-purpose I/O lines and a regulated 5-V output, the BASIC STAMP 1 (created by Parallax, Rocklin, CA) can easily be interfaced to a standard smart-card connector (see the figure). Only four I/O lines, sometimes three, are needed to communicate with most of the “synchronous” smart cards, such as prepaid telephone cards, loyalty cards, or disposable “token” cards of all kinds.

The P0 to P3 I/O lines are still available for any application, related or not, to the “smart card” function.

Reading a card requires only a very short software routine. The example provided (see the listing) first resets the smart card, then reads 256 bits and stores them permanently into 32 bytes of the BASIC STAMP’s internal EEPROM memory.

Of course, a smaller number of bits could be read, at any valid location. This depends on the requirements of the application (the simplest smart cards contain only 104 bits, and the so-called “ID number” rarely exceeds 96 bits in length).

A very similar routine (using the EEPROM “read” instruction instead of the “write” instruction) could be used to check the contents of the smart card against what was previously recorded into the EEPROM.

Inserting a suitably “learned” card into the connector could energize a relay via one of the P0 to P3 I/O lines. It also could allow the execution of another part of the program, much like the way a “dongle” functions on a PC. Being powered through the “card present” contact of the card connector, the BASIC STAMP will run for quite a long time using a 9-V battery.


Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?



Reader Comments

i want smart card basic program and shematic board smart card reader or guide thank

fery -July 07, 2009

smart card

fery -July 07, 2009

POST YOUR COMMENTS HERE
Name:

Email:
Your Comments:

Enter the text from the image below


Please refresh the page if you have trouble reading this text.

Search Electronic Design
     
  
 
Web Seminar
Sponsored By:
Title: Read Pacing: A Performance Enhancing Feature of PCI Express Gen 2 Switch Devices
Speakers: 
Date: 07/01/08
Register: 

Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources