Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

READMAGCARD problem

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
tiago.ferreira

Bascom Member



Joined: 17 Jan 2008
Posts: 2

portugal.gif
PostPosted: Thu Jan 17, 2008 2:49 pm    Post subject: READMAGCARD problem Reply with quote

Hello,

I'm connecting a card reader to an ATMEGA64, and I'm trying to use the function READMAGCARD. The problem is that when I call that, the program stops running, and it won't go further unless I swipe a card in the reader... is there a way to stop that particular function, or a way to detect if a card is being swiped?

Thanks in advance,

Tiago Ferreira
Portugal
Back to top
View user's profile
binu_ji

Bascom Member



Joined: 07 Jan 2006
Posts: 17

india.gif
PostPosted: Tue May 20, 2008 9:45 am    Post subject: Reply with quote

Call the READMAGCARD function only after the CS line goes low, that is call the function only if the reader sense any card.
Back to top
View user's profile Visit poster's website
tiago.ferreira

Bascom Member



Joined: 17 Jan 2008
Posts: 2

portugal.gif
PostPosted: Fri Jun 06, 2008 4:22 pm    Post subject: Reply with quote

Thank you binu_ji, for your help. I had allready done that, but that only solve half the problem, because if a card is "badly swiped", the program will stop anyway until another card is swiped.
Back to top
View user's profile
binu_ji

Bascom Member



Joined: 07 Jan 2006
Posts: 17

india.gif
PostPosted: Sat Jun 07, 2008 11:24 am    Post subject: Reply with quote

Did you get the data for both direction.
I am getting 37bytes for track 2 at one direction and when i swipe the card on the other direction i am getting only 1 byte.
Anybody get this problem.
Back to top
View user's profile Visit poster's website
binu_ji

Bascom Member



Joined: 07 Jan 2006
Posts: 17

india.gif
PostPosted: Mon Jun 23, 2008 9:23 am    Post subject: Reply with quote

I have solved it now with 8051 Microcontroller with my own code to read the magnetic stripe card on both directions.
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum