Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Smartcard Communication

Status
Not open for further replies.

zmanultra

Member level 2
Member level 2
Joined
Mar 20, 2004
Messages
48
Helped
4
Reputation
8
Reaction score
2
Trophy points
1,288
Location
Australia
Activity points
524
schematic seasoninterface atr

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.


3rd. same post. Others deleted.
Warning
!


--
mw
 

8515/2313 programmer

you can find it in this web site
h**p://nokiafree.org/forums/f33/ss=65fb4bf2e6c03ea0f1aa3f45749b7f65&
 

smartmouse diagram

Try looking for 'season interface' ;)
 

smartcard send atr

Hi
sorry i think im not that clear, i need a "Code" procedure to acquire the information from the card when connected to the smartmouse/pheonix reader/writer which is connected to my communication port 1 com1 as you can see in the diagram what i mean
 

bad goldwafer atr

sorry, but this is only the programmer circuit. you use it to transfer the firmware falling out of the compiler to the PIC's Flash-ROM. This is done synchronously (CLK & I/O).
To communicate with the smart card (e.g. to read/write to the EEPROM) you need a smard card reader. The difference is, that the communication is then asynchronous. This means the PIC needs a constant clock of 3.57, 5 or 6 MHz at its CLK-pin (like all CPUs). Communication is done asynchronously via I/O-pin, similar to an RS232 communication.
I didn't understand exactly: do you have two devices?
#1 is the PIC programmer according your posted schematic.
#2 is the smartmouse/phoenix cardreader.

Mik
 

no ack on command +goldwafer

sorry.... here is an important document that contains your want.... i hope this will will help ....i should have showed you this before sory man. :wink:
 

You have:

a) a programming device,

b) (i would expect) a goldwafer or other chipcard.



You need:

c) Some kind of code you want to fill the card with (like GSM card code, TV-card code, parking garage card code or self developed code for whatever else)

d) some kind of "programming software" to push the code into the card


elecing has given you the link above. Its good for d) and some of the things of c)

I have explained to you everything in this thread:
**broken link removed**

Probably you should read the thread again, to understand what you are doing or to better express yourself what you are missing
 

zmanultra said:
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.
3rd. same post. Others deleted.
Warning
!

you need upload loader code in pic, then you can get eeprom data in phoenix mode.
 

us dont seem to understand what i mean dudes..........

i have a programmer --->pheonix/smartmouse
i have a smartcard------->Goldwafer
i know how to load files into the pic,and the EEPROM


BUT what i mean is that when writing my own "simple" application, i need the procedure of "as soon as the card enters the reader" i want -----> a code procedure to know that the card has been inserted.

when it is inserted how do u "communicate" send, update,check, recive data on it......like variables etc

i know how to program in pic assebley now and c and c++ ............but i dont need full detail...just a guid line would realy help please guys i need help i beg uzzz

:(
 

i want a routine or way to include in the program that im going to write, to get
1- know that the smartcard is inerted
2-some how get/recieve data to the pic in the smartcard

im not sure if im making sense hopfully i am.

please guys give me some help im disperate for ur help dudes :cry:
 

**broken link removed**

this site may have some usefull info
look at smartcard lock ,
 

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)
 

zmanultra said:
i want a routine or way to include in the program that im going to write, to get
1- know that the smartcard is inerted
2-some how get/recieve data to the pic in the smartcard

im not sure if im making sense hopfully i am.

please guys give me some help im disperate for ur help dudes :cry:

To get the idea how it can be done you could take a look at the Ponyprog sourcecode here:
https://sourceforge.net/project/showfiles.php?group_id=2141

best regards
 

:) rob13572468

u know when u said

"use the ATR;" and to program the cards processor to send out an ATR.

do i include that in the program that im going to write and load into the cards procssore? what im trying to say is that should i include the ART in my my program.

and one thing that i dont understand, well im trying to search and ask people but no help..thing is im buying this book called >>>>
Serial PIC'n : PIC Microcontroller Serial Communications by Roger L.evens
but im waiting for the shipment which will take one to 2 weeks..there for i need ur help man please bro im beging u man.. i realy need help man.

the thing that i dont get is that how can make an ATR i need an example or somthing....i dont know how to do a rest i just need to cross this area and ill be right..please dude give me ur wisdom bro. i beg u
 

In a personal mail I have sendt you an ebook ("smart card developers kit.zip") a few days ago which covers ALL aspects of smartcards. In Chapter 4 there is also in explained detail, WHAT the ATR (Answer To Reset) is and what to do about this.

Probably you first should read the document, try to understand the major themes, and then come back?

What you want to do is not an "easy" and "fast" thing like implementing some kind of sort algorithm. There are plenty of complex functions in an complex environment. WITHOUT some BASIC understanding of the things you want to deal with you will NEVER be able to get some progress in your task.
 

the easiest way to do this is really to use picbasic pro; it will hide alot of the details that make the project so complicated. it also has all of the serial routines available so that you will not need to write them. to answer your question, yes you want to have the ATR send functionlity coded into your program. using picbasic, it shouldnt be a big deal; write a program that follows along these lines:

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. the actual basic program would be very easy to do. keep in mind that it wouldnt be iso7816 compliant, there are a bunch of rules that you need to follow to for that but it will work for what you need....
 

one more thing... there is a company called zeitcontrol that makes a product called Basicard, which is essentialy a smartcard environment that is completely programmable in basic using an IDE that they provide as well (for free). the system is great and is also iso7816 complaint... if you need to get things done and dont have time to write a bunch of code that would by far be the fastest way to do it... the system only runs on their cards that they sell (which are preprogrammed with the basiccard environment on them) so you wouldnt be able to use the goldcard but the read that you have would work.
 

here ; there was too good informations for me , it was long time that i was looking for some information in this feild ,
i have a question , is there any smartcard which there be MCS-51 MCUs in it ( like AT89c2051 ) , and if there is , how can we recognize it ?

thanks,
 

there are a few smartcards out there with atmel cores; the funcards and jupiter cards have 8515's, 2313, 2343 in them. recognizing them gets a littlebit more difficult, and depends on whether the card contains a flash based processor or is a commercial design (i.e. built with a rom mask).

all of the flash based (programmable) smartcards are really the same basic design as the production chips available, for example, the infamous goldcard is just a pic 16F84 and 24LC16 eeprom, with the important wires brought out to the smartcard contacts (MCLR,Vcc,Vss,RB6,RB7). these cards are programmable the same way that you would program the individual chips so if you want to see if a card is atmel based, the best way is to attempt to connect it to an atmel programmer and see if things like the basic configuration bits can be read...
 

iv figued out how to write a serial routine in picbasic for the PIC in the smart card. i just send an ATR then wait for a command to be sent etc.

but i was wondering what should i do...or with what programming laugauge can i communicate with the PIC...u know act like the "DTE". in which if i can send commands to the smart card " and that one part of my project....i just dont know what laugauge to use...delphia...lab windows cvi....C++...i dont know what to dudes. please i really need ur guys help. :cry:
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top