Kresho
2004-04-21 16:14:22 UTC
G'day list.
I have a situation as follows:
A machine will have a mag swipe card reader. The cards are encoded with any
number between 0 and 10,000,000 representing an account number. When a card
is swiped i must store the card number, time and date - 9 byte chunks of
data (24bit card number and 6bytes of date/time). When the card is swiped
again i must recall the same information and can then delete it.
Storing heaps of data is no problem - MMC or similar
However, i see an issue in catering for all these cards. Let's say that a
new person swipes his card every 10 seconds. That's 8640 swipes in a day. So
i must store 8640 chunks of data somewhere. The same person may not swipe
his card again for a number of days or weeks. Suddenly, there are thousands
(millions?) of chunks of stored data.
I can see 2 options:
1) Allocate a linearly determined memory address for each particular card.
eg: card #0 data at address h'00', card #1 data at address h'09', card #XYZ
at address 9*XYZ, etc. I would need 10,000,000 x 9 bytes or approx 90mb of
memory. That's do-able with a 128mb MMC, but rather unelegant.
2) I can store the 9byte chunks as i receive them in a free slot in memory.
When the card is swiped again i go through the stored data, from the start
of memory, till i find a match based on the card number, and then i can
access the time/date for that card and delete it leaving a free slot again.
However, if that card is the 1 millionth entry in this memory, it will take
considerable time to find that card number. Reading a million RAM locations
wouldn't be that bad (seconds) but accessing an MMC takes a bit of time and
i can see the time blowing out of all proportions.
Does anyone have any ideas how this could be done in any way other than
option 1 above? My biggest reason for not liking this option is that there
is talk of upscaling the number of possible card numbers to 1x10^12, which
suddenly makes any MMC (or other memory for that matter) look useless.
Rgds,
Kresho Sprem
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
I have a situation as follows:
A machine will have a mag swipe card reader. The cards are encoded with any
number between 0 and 10,000,000 representing an account number. When a card
is swiped i must store the card number, time and date - 9 byte chunks of
data (24bit card number and 6bytes of date/time). When the card is swiped
again i must recall the same information and can then delete it.
Storing heaps of data is no problem - MMC or similar
However, i see an issue in catering for all these cards. Let's say that a
new person swipes his card every 10 seconds. That's 8640 swipes in a day. So
i must store 8640 chunks of data somewhere. The same person may not swipe
his card again for a number of days or weeks. Suddenly, there are thousands
(millions?) of chunks of stored data.
I can see 2 options:
1) Allocate a linearly determined memory address for each particular card.
eg: card #0 data at address h'00', card #1 data at address h'09', card #XYZ
at address 9*XYZ, etc. I would need 10,000,000 x 9 bytes or approx 90mb of
memory. That's do-able with a 128mb MMC, but rather unelegant.
2) I can store the 9byte chunks as i receive them in a free slot in memory.
When the card is swiped again i go through the stored data, from the start
of memory, till i find a match based on the card number, and then i can
access the time/date for that card and delete it leaving a free slot again.
However, if that card is the 1 millionth entry in this memory, it will take
considerable time to find that card number. Reading a million RAM locations
wouldn't be that bad (seconds) but accessing an MMC takes a bit of time and
i can see the time blowing out of all proportions.
Does anyone have any ideas how this could be done in any way other than
option 1 above? My biggest reason for not liking this option is that there
is talk of upscaling the number of possible card numbers to 1x10^12, which
suddenly makes any MMC (or other memory for that matter) look useless.
Rgds,
Kresho Sprem
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads