CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Parse Clock and Data from Cardswipe

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
adamp524



Joined: 06 May 2010
Posts: 22

View user's profile Send private message

Parse Clock and Data from Cardswipe
PostPosted: Tue Jul 27, 2010 10:02 am     Reply with quote

I'm using a magnetic cardswipe reader which is read using two signals: clock and data. (The cards swiped are encoded in ABA Track 2 format). The clock pin is connected to an interrupt pin on the PIC and the data is connected to a standard input.

The idea is that each time the clock pulses, the input state of the data pin is read and this data added to a buffer for processing.

How would I create a buffer that can be used to store the incoming data and be checked for a full cardswipe?

I assume that there is too much processing involved to process a full cardswipe in the interrupt routine so a secondary processing function would have to be used? Any ideas on how I could implement this?

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jul 27, 2010 12:20 pm     Reply with quote

CCS card reader example and driver files:
Quote:

c:\program files\picc\examples\ex_mcr.c
c:\program files\picc\drivers\mcr.c


Card reader thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=30921

Resources (links) for interfacing to a card reader:
http://stripesnoop.sourceforge.net/devel/index.html
adamp524



Joined: 06 May 2010
Posts: 22

View user's profile Send private message

PostPosted: Wed Jul 28, 2010 2:39 am     Reply with quote

Thanks for the post, I've looked at the mcr.c file and it works well for my cardswipe BUT I need it to work without using the card present signal. Any ideas on how I could achieve this?

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 28, 2010 10:47 am     Reply with quote

What is the manufacturer and model number of your reader ?
Post a link to the website for the reader.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
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


Powered by phpBB © 2001, 2005 phpBB Group