Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

SmartCard Communication

Status
Not open for further replies.

zmanultra

New Member
Hi everyone

im new to this forum, and i was hoping for someone to help me on this project, its a a project for the whole year and this is wots up.

iv done alote of reasearch about this learnt alot of stuff and need help in pic basic pro now.

the project is about the following

How can i acquire information from a smartcard interfaced with my pc via a serial port com1. connection.
The smartcard is a goldwafer which contains a PIC 16F84A and EEPROM 24C16,
And the reader im using is a smartmouse/phoenix.

this is a brife discription of what happens when the card is insertede:

the smartcard interface is controlled from the reader to the card i.e. the reader always initiates the transaction and the card replies. if you need the reader to recognize that a card is present; use the ATR; program the card's processor to send out an ATR; a string upon reset. then have the reader trigger reset when the card inserted switch is triggered.

as far as card transactions, its pretty simple; program the card so that it delivers an ATR on reset then jumps into an input loop, waiting for a query; you can do this following the iso 7816 standards if you want the system to be compatible with others or using a much simpler protocol if its just for this one project. at minimum you really just need some serial routines to send and recieve data from the card. one thing to keep in mind is that many programmers clock the card at 3.57 mhz so you will need to write serial routines for that clock rate (or whatever clock rate your particular reader uses)

start:
1. send ATR (just a string of bytes) out at 9600 baud
2. wait for an input command, usually 5 bytes is the norm
3. if command=... then goto ExecuteThisCommand
4. if command= ... then goto ExecuteNExtCommand
...
...
5. After a command is executed, maybe send a response (called an ACK, usually 2 bytes)
6. goto 2


and thats basically it.. the card starts by sending the ATR and then just sits in an input loop, waiting for commands and executing the ones that it receives.

how can i write a simple application in pic basic pro ....that i can put in the pic....and then just wait for a input or command from the DTE (terminal) or me. and then when the pic gets the command (the commang can be like to check if the pin is right...send a messgae or a char in which the other program will expect to get.

please help i have no one to help me dudes i beg use

:(
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top