JPH02281468A - Card information reader - Google Patents

Card information reader

Info

Publication number
JPH02281468A
JPH02281468A JP1103144A JP10314489A JPH02281468A JP H02281468 A JPH02281468 A JP H02281468A JP 1103144 A JP1103144 A JP 1103144A JP 10314489 A JP10314489 A JP 10314489A JP H02281468 A JPH02281468 A JP H02281468A
Authority
JP
Japan
Prior art keywords
data
card
memory
bit
byte
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1103144A
Other languages
Japanese (ja)
Inventor
Katsumi Maekawa
勝美 前川
Masaaki Meguro
目黒 雅昭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP1103144A priority Critical patent/JPH02281468A/en
Publication of JPH02281468A publication Critical patent/JPH02281468A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To eliminate the need of two kinds of reading parts and to read a magnetic card in either forward or reverse direction by rearranging a data read by the magnetic head exactly in accordance with a recording format in the forward direction when the card is inserted in the reverse direction. CONSTITUTION:A card information recording part and blank parts in front and rear of it are scanned by a card reader 1, and a data read bit by bit is stored in a 1st memory 2, whereas the data is read out every one byte by a beginning code discriminating means 3, and when this data of one byte is the data other than the blank parts, this is decided as to whether it is a beginning code or not. Then, when this data is the beginning code, the data excluding a data read out of the blank parts of the card is loaded in turn into a 2nd memory 6 by a 1st processing means 4. On the other hand, when this data is not the beginning code, the data stored in the reverse direction in the 1st memory 2 except a data of the blank parts is rearranged in the forward direction and loaded into the 2nd memory 6 by a 2nd processing means 5. By this method, the need of two kinds of reading parts is eliminated, and reading is feasible in both directions without complicating the device.

Description

【発明の詳細な説明】 (イ)産業上の利用分野 本発明は、カードが逆方向に投入されてもカード情報を
正確に読み取ることができるカード情報読み取り装置に
関する。
DETAILED DESCRIPTION OF THE INVENTION (a) Field of Industrial Application The present invention relates to a card information reading device that can accurately read card information even when a card is inserted in the opposite direction.

(ロ)従来の技術 一般に、カードに記録されている情報は1方向の読み取
りに対して有効な記録フォーマットとなっているために
、適正なカー ドであっても逆方向に投入された場合に
はカードの記録情報は誤りと判定している。
(b) Conventional technology In general, the information recorded on cards is in a recording format that is effective for reading in one direction, so even if the card is correct, it will be read in the wrong direction. has determined that the information recorded on the card is incorrect.

そのため特公昭58−58730号公報には、カードの
投入方向を検出する順、逆方向検出部を設け、カードの
投入方向に応じて、磁気ヘッドにて読み取った情報を順
方向読み取り部あるいは逆方向読み取り部の別々の出力
経路へ導入し、それぞれでディジタル信号に変換して出
力する装置についてか開示されている。
Therefore, in Japanese Patent Publication No. 58-58730, a forward direction reading section or a reverse direction detection section is provided to detect the card insertion direction, and depending on the card insertion direction, the information read by the magnetic head is transferred to the forward direction reading section or the reverse direction detection section. A device is disclosed in which the signals are introduced into separate output paths of a reading section, and each converts the signal into a digital signal and outputs the signal.

(ハ)発明が解決しようとする課題 しかしながら上記の従来技術は、カードが投入された方
向に応じて2通りの出力経路を設けなければならず装置
が複雑となる課題がある。
(c) Problems to be Solved by the Invention However, the above-mentioned prior art has a problem in that it requires two output paths depending on the direction in which the card is inserted, making the device complicated.

従って本発明は、カードが逆方向に投入された場合に、
磁気ヘッドにて読み取ったデータを順方向の記録7オー
7・7ト通9に再配列することで、2通りの読み取り部
を必要とせずに磁気カードの順、逆側方向の読み取りが
可能なカード情報読み取り装置を提供するものである。
Therefore, in the present invention, when a card is inserted in the reverse direction,
By rearranging the data read by the magnetic head into forward recording 7-o-7 and 7-to-9, it is possible to read the magnetic card in the forward and reverse directions without the need for two reading sections. The present invention provides a card information reading device.

(ニ)課題を解決するための手段 上記課題を解決するために、本発明法こよるカード情報
読み取り装置は、カード情報記録部の前後にそれぞれ余
白部を有し、該余白部には連続して2進符号“0”が記
録されるとともに、前記カード情報記録部には始め符号
、カードデータ、終わり符号、およびこれら情報の水平
奇偶検査のための水平冗長符号(LRC)が順次記録さ
れているカードからカード情報を読み取る装置であって
、前記カードリーダーがカードを走査して得た1ビット
毎のデータを順次記憶する第1メモリと、該第1メモリ
が記憶しているデータを1バイトづつ読み出してこの1
バイトのデータが前記余白部のデータ以外であると、こ
れが始め符号であるか否かを判別する始め符号判別手段
と、最大限記憶できる情報数がカード情報記録部に記録
されている情報数と同数となるように設定されている第
2メモリと、前記始め符号判別手段が判別した1バイト
のデータが始め符号であると、前記余白部のデータを除
いて前記第1メモリが順方向に記憶している1ビットご
とのデータを順次前記第2メ七Jにロードする第1処理
手段と、前記始め符号判別手段が判別した1バイトのデ
ータが始め符号でないと、前記余白部のデータを除いて
前記第1メモリが逆方向に記憶している1ビットごとの
データを順次前記第2メモリにロードする第2処理手段
とを具備している。
(d) Means for Solving the Problems In order to solve the above problems, the card information reading device according to the method of the present invention has margins before and after the card information recording section, and the margins are continuous. At the same time, a binary code "0" is recorded in the card information recording section, and a start code, card data, end code, and horizontal redundancy code (LRC) for horizontal parity check of these information are sequentially recorded. A device for reading card information from a card, the device comprising: a first memory that sequentially stores bit-by-bit data obtained by scanning the card by the card reader; and a first memory that sequentially stores data stored in the first memory in one byte. Read this one by one
If the data in the byte is other than the data in the blank area, a start code discriminating means determines whether or not this is the start code, and the maximum number of information that can be stored is the number of information recorded in the card information recording section. If the 1-byte data determined by the start code determining means is the start code, the first memory stores the data in the forward direction except for the data in the margin. a first processing means for sequentially loading the data for each bit into the second menu; and a first processing means for sequentially loading data for each bit into the second menu; and a second processing means for sequentially loading data bit by bit stored in the first memory in the reverse direction into the second memory.

(ホ)作用 本発明の原理構造図である第1図にて作用を説明する。(e) Effect The operation will be explained with reference to FIG. 1, which is a diagram showing the principle structure of the present invention.

カードリーダー1とカード7との相対運動にて、カード
リーダー1はカード情報記録部及びその前後の余白部を
走査するが、これによりカードリーダー1が読み取った
lビットごとのデータは第1メモリ2にストアされるこ
とになる。そして始め符号判別手段3は第1メモリ2が
記憶しているデータを1バイトづつ読み出して、この1
バイトのデータが余白部のデータ以外であると、これが
始め符号であるか否かを判別する。
Due to the relative movement between the card reader 1 and the card 7, the card reader 1 scans the card information recording section and the margins before and after it, and as a result, the data read by the card reader 1 for each l bit is stored in the first memory 2. It will be stored in . Then, the start code determination means 3 reads the data stored in the first memory 2 one byte at a time, and reads out the data stored in the first memory 2 one byte at a time.
If the byte data is other than the margin data, it is determined whether this is the starting code.

第1処理手段4は、始め符号判別手段3が余白部のデー
タ以外であると判断した1バイトのデータが始め符号で
あると、カードの余白部から読み取ったデータを除いて
第1メモリ2が順方向に記憶している1ビットごとのデ
ータを順次第2メモノロにロードする。いっぽう第2処
理手段5は、始め符号判別手段3が余白部のデータ以外
であると判断した1バイトのデータが始め符号でないと
、余白部のデータを除いて第1メモリ2が逆方向に記憶
している1ビットごとのデータを順方向に再配列しなが
ら第27モリ6にロードする。
If the 1-byte data determined by the start code determining means 3 to be other than the data in the margin is the start code, the first processing means 4 stores the data in the first memory 2 excluding the data read from the margin of the card. The data of each bit stored in the forward direction is sequentially loaded into the 2-memo format. On the other hand, if the 1-byte data determined by the start code discriminating means 3 to be other than the data in the margin is not the start code, the second processing means 5 stores the data in the first memory 2 in the reverse direction except for the data in the margin. The 1-bit data is rearranged in the forward direction and loaded into the 27th memory 6.

(へ)実施例 第2図は本発明の一実施例の構成をブロックにて示して
おり、カード情報読み取り装置10は、CPUIIと、
ROM12と、RAM13と、手動式のカードリーダー
14と、伝送インタフェース15とから成り、カード情
報読み取り装置10が読み取ったカード17の記録情報
は伝送インタフェース15を通して上位装置16に伝送
される。
(F) Embodiment FIG. 2 shows the configuration of an embodiment of the present invention in blocks, and the card information reading device 10 includes a CPU II,
It consists of a ROM 12, a RAM 13, a manual card reader 14, and a transmission interface 15, and the recorded information on the card 17 read by the card information reading device 10 is transmitted to the host device 16 through the transmission interface 15.

この上位装置16は、受は取ったカードの記録情報に基
づき当該カードの有効性を判別するものである。
This host device 16 determines the validity of the accepted card based on the recorded information of the card.

第4図はカードの記録7オーマツトを示しており、磁気
ストライブ部分20はカード情報記録部21と、その前
後に設けた余白部22.23とからなる。そしてこの余
白部には連続して2進符号“0”が刻時用信号として記
録されおり、カード情報記録部21には始め符号、カー
ドデータ、終わり符号、およびこれら情報の水平奇偶検
査のための水平冗長符号(LRC)が記録されている。
FIG. 4 shows a 7 format recording card, and the magnetic stripe section 20 consists of a card information recording section 21 and margin sections 22 and 23 provided before and after the card information recording section 21. In this blank space, binary code "0" is continuously recorded as a clock signal, and in the card information recording section 21, the start code, card data, end code, and horizontal odd-even check for these pieces of information are stored. A horizontal redundancy code (LRC) is recorded.

始め符号及び終わり符号としてはともに“FF”が記録
されている。またカードデータとしては、カードのセキ
ュリティー情報やカード所持者の■D情報などが記録さ
れている。
"FF" is recorded as both the start code and the end code. Also, as card data, card security information, card holder's ■D information, etc. are recorded.

RAMI 3は第3図に示すように、第1メモリM1と
第2メモリM2とを含み、メモリM、にはカードに記録
されている余白部のデータ、始め符号、カードデータ、
終わり符号、LRC符号が格納されるが、カードリーダ
ー14がカードを走査して得たこれら情報の1ピツト毎
のデータは読み取られた順序にてロードされる。またメ
モリM2には、メモリM、に格納されている情報の中か
ら抽出された始め符号、カードデータ、終わり符号。
As shown in FIG. 3, the RAMI 3 includes a first memory M1 and a second memory M2, and the memory M stores margin data, start code, card data, etc. recorded on the card.
The end code and LRC code are stored, and data for each pit of these pieces of information obtained by scanning the card by the card reader 14 are loaded in the order in which they are read. Further, the memory M2 stores the start code, card data, and end code extracted from the information stored in the memory M.

LRC符号が格納される。そして更にRAM13はカウ
ンタA、B、Cを含む。
LRC code is stored. Further, the RAM 13 includes counters A, B, and C.

第5図のフローチャートはCPUIIの制御を示すもの
で、このフローチャートにしたがってカード情報読み取
り装置10の動作を説明する。まずSlステップでは、
CPUIIは初期化を行う。
The flowchart in FIG. 5 shows the control of the CPU II, and the operation of the card information reading device 10 will be explained according to this flowchart. First, in the Sl step,
CPU II performs initialization.

そしてつぎの82ステツプでは、CPUIIはカードリ
ーダー14がカードの磁気ストライブ部分20を走査し
て得た1ビットごとのデータをメモリM、に格納する。
In the next step 82, the CPU II stores in the memory M the data bit by bit obtained by the card reader 14 scanning the magnetic stripe portion 20 of the card.

第6図はカードの読み取りによるデータがセーブされた
ときのメモリM1の記憶7オーマノトを模式的に示すも
ので、メモリM1の1ないし3バイト目の3ビット目ま
でにかけては、最初の余白部22に記録されている連続
した“0”のデータがストアされており、4バイト目の
4ビット目を第1データビットとして、ここから最終デ
ータビットである(n−1)バイトの3ビット目までに
はカード情報記録部21の情報がストアされており、そ
して(n −1)バイトの4ビット目からaバイトまで
には、後ろの余白部23に記録されている連続した“O
”のデータがストアされている。
FIG. 6 schematically shows the storage capacity of the memory M1 when the data obtained by reading the card is saved. Continuous "0" data recorded in is stored, with the 4th bit of the 4th byte as the first data bit, and from there to the 3rd bit of the (n-1) byte, which is the final data bit. The information of the card information recording section 21 is stored in the , and from the 4th bit of the (n - 1) byte to the a byte, the continuous "O" recorded in the rear margin section 23 is stored.
” data is stored.

この例においては最初の余白部22に記録されている“
0”が3バイト目の3ビット目までに及ぶために、以後
1キヤラクタは先のバイトの4ビット目から後のバイト
の3ビット目までにストアされる。
In this example, “
Since 0'' extends to the third bit of the third byte, one character is stored from the fourth bit of the previous byte to the third bit of the next byte.

しかして第6図の記憶フォーマシトが、第2図において
カード17を実線の矢印の方向でカードデータ−14に
投入したものであるとしたとき、同じカード17を点線
の矢印の方向でカードリーダー14に投入すると、メモ
リM1の記憶フォーマットは第7図のようになる。尚、
メモリM、の記憶容量は、カードに記録されている全て
のデータを記録するようにはなっていないために、同じ
余白部22に記録されていたデータであっても、第6図
と第7図とでは格納している“O”の数には差がある。
Therefore, if the memory format of FIG. 6 is the one in which the card 17 is inserted into the card data 14 in the direction of the solid line arrow in FIG. 7, the storage format of the memory M1 becomes as shown in FIG. still,
Since the storage capacity of the memory M is not designed to record all the data recorded on the card, even if the data is recorded in the same blank area 22, the data in FIGS. There is a difference in the number of "O"s stored in the figure.

したがって第7図の場合には、■キャラクタは先のバイ
トの7ビット目から後のバイトの6ビット目までにスト
アされるが、このときカードは逆方向に読み取られたた
めに、キャラクタを構成する8ビットのデータは後ろの
方がらメモリM1にストアされていく。
Therefore, in the case of Figure 7, the ■ character is stored from the 7th bit of the previous byte to the 6th bit of the subsequent byte, but at this time, since the card was read in the opposite direction, the character is The 8-bit data is stored in the memory M1 from the rear.

以下、第6図の例で説明していく。This will be explained below using the example shown in FIG.

S3ステツプでは、CPUIIはカウンタAのカウント
値にもとづきメモリM1をアドレスし、そこにストアさ
れている1バイトのデータを読み出す。つぎの84ステ
ツプでは、CPUIIはこの1バイトのデータが“00
”・かを判別し、′00”の場合すなわち余白部22か
ら読み取ったデータであると、S5ステツプにてカウン
タAに1を加算した後S3ステツプに復帰する。このよ
うな処理を繰り返して84ステツプでメモリM1から読
み出した1バイトのデータが“OO”以外であることを
検出すると、S6ステツプに進む。第6図に示す例では
、3バイト目のデータを読み取ったときに、S4ステツ
プから86ステツプに進むが、このときカウンタAは2
をカウントしている。
In step S3, the CPU II addresses the memory M1 based on the count value of the counter A and reads out 1 byte of data stored therein. In the next 84 steps, the CPU II determines that this 1-byte data is “00”.
If it is '00', that is, if the data is read from the margin section 22, 1 is added to the counter A in step S5, and then the process returns to step S3. When such processing is repeated and it is detected in step 84 that the 1-byte data read from the memory M1 is other than "OO", the process advances to step S6. In the example shown in FIG. 6, when the third byte of data is read, the process advances from step S4 to step 86, at which time counter A is 2.
is being counted.

このS6ステツプでは、CPUIIは“OO”以外であ
ると判定した1バイトのデータの1ビット目のデータが
“1”であるか否かを判III L、0”のときはS7
ステップに進む。S7ステップではこの1バイトのデー
タを1ビットシフトし、つぎに88ステツプにてカウン
タBに1を加算した後S6ステツプに復帰する。そして
このような処理の繰り返しによりデータがシフトされ、
これにより1ビ7ト目のデータが“1”となると、CP
UIIの処理はS9ステツプに進む。したがってメモリ
M、の3バイト目のデータであると、3回目のシフトに
より“1″が検出されたときにS9ステツプに進むが、
このときカウンタBは3をカウントしている。
In step S6, the CPU II determines whether the first bit of the 1-byte data determined to be other than "OO" is "1", and if it is 0, the CPU II determines whether the data is "1" or not.
Proceed to step. In step S7, this 1-byte data is shifted by 1 bit, and then in step 88, 1 is added to counter B, and then the process returns to step S6. Then, by repeating this process, the data is shifted,
As a result, when the 1st bit and 7th data becomes “1”, CP
The UII process proceeds to step S9. Therefore, if the data is the third byte of memory M, when "1" is detected in the third shift, the process advances to step S9.
At this time, counter B is counting 3.

S9ステツプでは、CPUIIはカウンタA。At step S9, CPU II is counter A.

Bのカウント値に基づき8ビットのデータをメモJM、
から読み取る。この場合の例では、カウンタA、Bはそ
れぞれ2と3をカウントしており、メモリM1の3バイ
ト目の4ビット目から4パイ!・目の3ビット目までの
8ビットのデータが読み取られる。そしてつぎの510
ステツプでは読み取った8ビットのデータが“FF”で
あるか否かを判別する。この例の場合は8ビットのデー
タが“FF”であり、CPIJI 1はカード17がカ
ードリーダー14に対し順方向に投入されたと判断して
S11ステツプに進む。このSllステップで1よ、メ
モリM1の3バイト目の4ビット目から4バイト目の3
ビット目までの8ビットのデータを1バイト目のデータ
とし、以下、kバイト目の4ビット目から(k+1)バ
イト目の3ビット目までのデータを1バイトのデータと
して抽出する処理を72バイト分行って、第8図に示す
ごとくメモリM2のアドレス1からアドレス72までに
順次ストアしていく。
Memo JM, 8-bit data based on the count value of B.
Read from. In this example, counters A and B are counting 2 and 3, respectively, and 4 pi! from the 4th bit of the 3rd byte of memory M1!・8 bits of data up to the 3rd bit are read. And the next 510
In this step, it is determined whether the read 8-bit data is "FF" or not. In this example, the 8-bit data is "FF", and the CPIJI 1 determines that the card 17 has been inserted into the card reader 14 in the forward direction, and proceeds to step S11. 1 in this Sll step, from the 4th bit of the 3rd byte of memory M1 to the 3rd bit of the 4th byte.
The 8-bit data up to the 1st bit is treated as 1st byte data, and hereinafter, the process of extracting the data from the 4th bit of the k-th byte to the 3rd bit of the (k+1) byte as 1-byte data is called 72 bytes. Then, as shown in FIG. 8, data is sequentially stored from address 1 to address 72 in memory M2.

これによりメモリM2は、アドレス1には始め符号のF
F”、アドレス2ないしアドレス70までにはカードデ
ータの各キャラクタ、アドレス71には終わり符号の“
FF”、そしてアドレス72にはLRC符号がストアさ
れる。尚、カードデータの各キャラクタは実質7ビット
符号であって、8ビット目は垂直奇偶検査のための検査
ビットとしているが、このキャラクタは“FF”となる
ことがないように、7ビット符号および検査ビットを定
めている。またLRC符号の8ビット目も、LRC符号
自身の垂直奇偶の検査ビットとなっている。
As a result, memory M2 has the starting code F at address 1.
F", each character of the card data from address 2 to address 70, and the ending code "" at address 71.
FF", and the LRC code is stored at address 72. Each character of the card data is essentially a 7-bit code, and the 8th bit is a check bit for vertical odd-even test. A 7-bit code and a check bit are defined so as not to become "FF".The 8th bit of the LRC code is also a vertical odd-even check bit of the LRC code itself.

CPUI 1はつぎのS19ステ7プでは、始め符号と
72バイトのカードデータと終わり符号の水平奇偶を検
出し、これをLRC符号と比較することでL RCチエ
ツクを行う。そしてつぎの820ステツプでは、CPU
I 1はメモリM2に格納しているカードデータを伝送
インタフェース15を通し上位製蓋16に伝送して、カ
ード情報の読み取り動作を終了する。
In the next step S19, the CPU 1 detects horizontal odd-even of the start code, 72-byte card data, and end code, and performs an LRC check by comparing these with the LRC code. Then, in the next step 820, the CPU
I1 transmits the card data stored in the memory M2 to the host cover 16 through the transmission interface 15, and ends the card information reading operation.

つぎにカード17が点線の矢印の方向でカードデータ−
14に投入され、これによりメモリM1の記憶フォーマ
ットが第7図の場合であるときのフローチャートの流れ
を説明する。
Next, card 17 moves the card data in the direction of the dotted arrow.
14 and the storage format of the memory M1 is as shown in FIG. 7.

この場合メモリM、は、1バイト目から3バイト目の6
ビット目までには後ろの余白部23から読み取った“0
”のデータを格納しており、3バイト目の7ビット目か
ら4バイト目の6ビット目までにはLRC符号の逆向き
のデータを格納している。
In this case, memory M is 6 from the 1st byte to the 3rd byte.
By the bit, “0” read from the back margin 23
", and data in the opposite direction of the LRC code is stored from the 7th bit of the 3rd byte to the 6th bit of the 4th byte.

ここでLRC符号について考えると、LRC符号の8ビ
ット目はLRC符号自身の垂直奇偶の検査ビットである
ことを先に述べたが、奇偶検査の偶数のときにこの検査
ビットに“l”をセットする方式においては、LRC符
号が“F F’”になることはない。なんとなればLR
C符号の1ビット目から7ビット目までのデータが全て
“l”であったとしても、このときの垂直奇偶の検査ビ
ットは“0”であるために、LRC符号が“FF”とな
ることはあり得ないからである。また奇数のときに検査
ビットに“1”をセットする方式において;よ、LRC
符号の1ビット目から7ビット目までが全て“l”のと
きは、垂直奇偶の検査ビットも“1″でLRC符号が“
FF″となることがある。しかしながらLRC符号の1
ビット目から7ビット目までが全て“1”となる確率は
128分の1であり、LRC符号が“FF”となる可能
性は低い。したがって説明の便宜上、“FF”のLRC
符号は存在しないという面提で説明を続ける。
Considering the LRC code here, I mentioned earlier that the 8th bit of the LRC code is the vertical odd-even check bit of the LRC code itself, and when the odd-even check is an even number, this check bit is set to "l". In this method, the LRC code never becomes "F F'". Whatever it is, LR
Even if the data from the 1st bit to the 7th bit of the C code is all “l”, the vertical odd-even check bit at this time is “0”, so the LRC code will be “FF”. This is because it is impossible. Also, in the method of setting the check bit to "1" when the number is odd;
When all bits from the 1st bit to the 7th bit of the code are “l”, the vertical odd-even check bit is also “1” and the LRC code is “1”.
FF''. However, 1 of the LRC code
The probability that all bits from the 7th bit to the 7th bit will be "1" is 1/128, and the possibility that the LRC code will be "FF" is low. Therefore, for convenience of explanation, the LRC of “FF”
I will continue the explanation on the assumption that codes do not exist.

このようにLRC符号に“FF″が無いものとすると、
LRC符号の0″のデータと余白部23の“0”とが連
続することがあるために、CPU1lがメモリM1にお
いて、余白部23のデータとLRC符号とを分別するこ
とはできない。したがってCPUIIがS6.S7、S
8ステツプの処理から89ステツプの処理に抜は出した
とき、S3ステツプにおいてカウンタAのカウント値に
基すきメモリM1から読み出した1バイトのデータは、
余白部23の“0″のデータとLRC符号とが混在する
場合り、あるいはLRC符号のみである場合、またはL
RC符号とカードデータの最初のキャラクタ符号(順方
向で見れば最後のキャラクタ符号)とが混在する場合の
3通りのケースが考えられる。ところで、この1バイト
のデータが余白部23の“0″のデータとLRC符号と
が混在するものであるとき、あるいはLRC符号のみで
あるときは、LRC符号は“FF″以外であるために、
このデータが“FF”となることはない。しかしてこの
1バイトのデータがLRC符号とカードデータの最初の
キャラクタ符号とが混在しているものである場合には、
まれに“FF”となることがある。しかしながらここで
も説明の便宜上、S4ステツプで“00”以外であると
判定したデータは、“FF”でもないものとして説明を
続ける。したがってカードが逆方向に投入されたとき、
CPUIIがメモリM1で最初に検出した“OO”以外
の1バイトのデータは“FF”でもないために、CPU
IIの処理はS12ステツプに進む。
Assuming that there is no "FF" in the LRC code like this,
Since the 0'' data of the LRC code and the "0" of the margin section 23 may be consecutive, the CPU 1l cannot distinguish between the data of the margin section 23 and the LRC code in the memory M1. S6.S7,S
When the process of 8 steps is changed to the process of 89 steps, 1 byte of data read from the memory M1 based on the count value of counter A in step S3 is as follows.
If the "0" data in the margin part 23 and the LRC code are mixed, or if there is only the LRC code, or if the
There are three possible cases where the RC code and the first character code (the last character code when viewed in the forward direction) of the card data coexist. By the way, when this 1-byte data includes a mixture of "0" data in the margin section 23 and an LRC code, or when it is only an LRC code, the LRC code is other than "FF", so
This data never becomes "FF". However, if this 1-byte data contains a mixture of the LRC code and the first character code of the card data,
In rare cases, it may become "FF". However, for convenience of explanation, the explanation will be continued here assuming that the data determined to be other than "00" in step S4 is also not "FF". Therefore, when a card is inserted in the opposite direction,
Since the 1-byte data other than "OO" that the CPU II first detected in memory M1 is not "FF", the CPU
The process II proceeds to step S12.

このS12ステツプでは、CPUI 1はカウンタCの
カウント値にもとづきメモリM1を逆方向にアドレスし
、そこにストアされている1バイトのデータを読み出す
。つぎの813ステツプでは、CPUIIはこの1バイ
トのデータが“00″かを判別し、“00″の場合すな
わち余白部22からNnみ取ったデータであると、51
.4ステ・ンブにてカウンタCに1を加算した後S12
ステツプに復帰する。このような処理を繰り返して、メ
モリM、から読み出した1バイトのデータが“00”以
外であることを813ステツプで検出すると、CPUI
Iの処理はS15ステツプに進む。第7図に示す例では
、逆から2バイト目のデータを読み取ったときに、S1
3ステツプから315ステツプに進むが、このときカウ
ンタC1!1をカウントしている。
In step S12, the CPU 1 addresses the memory M1 in the reverse direction based on the count value of the counter C, and reads out 1 byte of data stored therein. In the next step 813, the CPU II determines whether this 1-byte data is "00", and if it is "00", that is, the data is Nn taken from the blank space 22, then the
.. After adding 1 to counter C in step 4, S12
Return to step. By repeating this process, if it is detected in step 813 that the 1-byte data read from memory M is other than "00", the CPU
The process of I proceeds to step S15. In the example shown in FIG. 7, when reading the second byte from the reverse, S1
The program advances from step 3 to step 315, and at this time the counter C1!1 is counting.

このS15ステツプでは、CPUIIは“00”以外で
あると判定した1バイトのデータのうちの1ビット目の
データが“0”であるか否かを判別し、“1”のときは
816ステツプに進む。S16ステツプではこの1バイ
トのデータを1ビットシフトし、つぎに817ステツプ
にてカウンタBに1を加算した後S15ステツプに復帰
する。そしてこのような処理の繰り返しによりデータが
シフトされ、これにより1ビット目のデータが“0”と
なると、CPUIIは始め符号と余白部22のデータ″
0″の境を検出したとして、518ステツプに進む。し
たがって第7図に示すメモリMの(n−1)バイト目の
データであると、6回目のシフトにより“0”が検出さ
れたときに518ステツプに進むが、このときカウンタ
Bは6をカウントしている。
In step S15, the CPU II determines whether or not the first bit of the 1-byte data determined to be other than "00" is "0", and if it is "1", the process proceeds to step 816. move on. In step S16, this 1-byte data is shifted by 1 bit, and then in step 817, 1 is added to counter B, and then the process returns to step S15. Then, by repeating such processing, the data is shifted, and when the first bit of data becomes "0", the CPU II shifts the start code and the data in the margin section 22.
Assuming that the border of 0'' has been detected, the process proceeds to step 518. Therefore, if the data is the (n-1)th byte of the memory M shown in FIG. The process advances to step 518, but at this time counter B is counting 6.

S18ステツプでは、CPUIIはカウンタB。At step S18, CPU II is counter B.

Cのカウント値に基づき逆方向からメモリM、の8ビッ
トのデータを読み取る。この場合の例では、カウンタB
、Cはそれぞれ6と1をカウントしており、メモリM、
の逆から2ノSイト目の6ビット目までのデ・−夕と逆
から3バイト目の7及び8ビット目のデータを1バイト
目のデータとし、以下にバイト目の6ビット目までのデ
ータと(k+1)バイト目の7及び8ビット目のデータ
を1バイトのデータとして抽出する処理を72バイト分
行って、メモリM、のアドレス1からアドレス72まで
に順次格納していく。このときCPU11は第9図に示
すように、メモリM、の(k+1)バイト目及びにバイ
ト目から読み取った1バイトのデータをメモリM1のア
ドレスaに格納する場合、kバイト目の7及び8ビット
目のデータ1まメモリM、のアドレスaの8ビット目及
び7.ビット目にストアし、そして(k+1)バイト目
の1ビット目から6ビット目までのデータはそれぞれメ
モリM1のアドレスaの6ビット目から1ビット目まで
にストアすることで、逆方向にカードから読み取ったデ
ータを再配列する。
Based on the count value of C, 8-bit data of memory M is read from the opposite direction. In this example, counter B
, C count 6 and 1, respectively, and the memory M,
The 7th and 8th bits of the 3rd byte from the reverse are the data of the 1st byte, and the data up to the 6th bit of the byte are as follows: A process of extracting the data and the data of the 7th and 8th bits of the (k+1)th byte as 1 byte data is performed for 72 bytes, and the data is sequentially stored from address 1 to address 72 in the memory M. At this time, as shown in FIG. 9, the CPU 11 stores the 1-byte data read from the (k+1)th byte and the second byte of the memory M to the address a of the memory M1. Bit-th data 1, 8th bit of address a of memory M, and 7. By storing the data from the 1st bit to the 6th bit of the (k+1)th byte to the 6th bit to the 1st bit of address a of memory M1, data is transferred from the card in the opposite direction. Reorder the read data.

そして以後は順方向に投入された場合と同様に、CPU
IIは519ステツプおよびS20ステツプの処理を順
次実行した後、カード情報の読み取り動作を終了する。
From then on, the CPU
II finishes the card information reading operation after sequentially executing steps 519 and S20.

以上の説明では“FF”のLRC符号は無いものとして
きたが、LRC符号が“FF”であるときの動作を説明
する。この場合で問題となるのはカードが逆方向に投入
されたときで、例えば第7図において、3バイト目の7
ビット目から4バイト目の6ビットまでにLRC符号と
して“FF″が格納されているとすると、CPUIIが
このカード情報を処理したとき510ステツプでFF”
を検出するため、LRC符号を始め符号と誤認してカー
ドが順方向に投入されたと判断することである。そして
CPU11の処理は、このままS11ステツプおよびS
19ステツプに進むことになるが、519ステツプにて
このような誤りをチエツクすることができる。すなわち
CPUIIはLRC符号を始め符号と判断すると、必然
的に次の符号はカードデータのキャラクタ符号と判断す
る。しかるにこのキャラクタ符号は前述したように“F
F”以外の符号のはずであるが、実際には終わり符号が
きて“FF″となっているために規約に反していること
になる。したがってCPUl1が819ステツプでLR
Cヂエツクとともにかかるフレームチエツクを行うこと
で、LRC符号が“FF”の場合でもカード情報読み取
り装置としては誤動作することがない。
In the above explanation, it has been assumed that there is no "FF" LRC code, but the operation when the LRC code is "FF" will be explained. In this case, the problem arises when the card is inserted in the opposite direction. For example, in Figure 7, the 7th byte of the 3rd byte
Assuming that "FF" is stored as an LRC code from the 6th bit to the 6th bit of the 4th byte, when the CPU II processes this card information, FF" is stored in 510 steps.
In order to detect this, the LRC code is mistakenly recognized as the starting code and it is determined that the card has been inserted in the forward direction. Then, the processing of the CPU 11 continues as it is at step S11 and step S11.
The program will proceed to step 19, and such an error can be checked at step 519. That is, when the CPU II determines that the LRC code is the first code, it inevitably determines that the next code is the character code of the card data. However, as mentioned above, this character code is “F
It is supposed to be a code other than "F", but it actually violates the convention because the end code comes and becomes "FF".Therefore, CPU11 enters LR at step 819.
By performing such a frame check together with the C check, the card information reading device will not malfunction even if the LRC code is "FF".

また逆方向にカードが投入された場合に、CPU11が
メモリM1で最初に検出した“OO″以外の1バイトの
データは“FF”でもないものとして説明してきたが、
これが“FF”であるときの動作を説明する。この場合
この1バイトのデータは、LRC符号とカードデータの
最初のキャラクタ符号とが混在した6のであるが、CP
UIIは、この“FF”を順方向に投入されたカードの
始め符号と判断して、Sllステップに進むことになる
。そしてS19ステツプの処理を行ったとき、CPLI
IIは、LRC符号とカードデータの最初のキャラクタ
符号とが混在しているものを始め符号と判断しているた
めに、必然的にカードに記録されている終わり符号の検
出にも誤りを生じる。したがって319ステツプでのL
RCチエツクやフレームチエツクではエラーとなるため
に、カードが逆方向に投入されてCPUIIがメモリM
1で最初に検出した“00”以外の1バイトのデータが
FF″であったとしても、カード情報読み取り装置とし
ては誤動作することはない。
Also, when the card is inserted in the opposite direction, the 1-byte data other than "OO" that the CPU 11 first detects in the memory M1 has been explained as not being "FF".
The operation when this is "FF" will be explained. In this case, this 1-byte data is 6, which is a mixture of LRC code and first character code of card data, but CP
The UII determines that this "FF" is the starting code of the card inserted in the forward direction, and proceeds to the Sll step. Then, when processing step S19, CPLI
II determines that a mixture of the LRC code and the first character code of the card data is the starting code, which inevitably causes an error in detecting the ending code recorded on the card. Therefore, L at 319 steps
RC check or frame check will result in an error, so if the card is inserted in the opposite direction, the CPU II will
Even if the first byte of data other than "00" detected in step 1 is "FF", the card information reading device will not malfunction.

(ト)発明の効果 本発明によれば、カード投入方向の誤りによるカードの
読み取りエラーがなくなるために、操作性のよいカード
情報読み取り装置が提供される。
(g) Effects of the Invention According to the present invention, a card information reading device with good operability is provided since card reading errors due to incorrect card insertion direction are eliminated.

しかもカードが逆方向に投入されたときは、読み取った
データを順方向の記録フォーマット通りに再配列するた
めに、順、逆側方向に応じて2通りの読み取り部を必要
としておらず、装置を複雑にすることなく両方向での読
み取りが可能なる。
Furthermore, when the card is inserted in the opposite direction, the read data is rearranged according to the recording format of the forward direction, so there is no need for two types of reading units depending on the forward and reverse directions, and the device is It allows reading in both directions without any complications.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の原理構成図、第2図は本発明の一実施
例の構成をブロックにて示す図、第3図はRAMの主な
メモリ構成を示す図、第4図はカードの記録フォーマッ
トを示す図、第5図はCPUの動作を示すフローチャー
ト、第6図及び第7図はメモリM、の記憶フォーマント
を模式的に示す図、第8図はメモリM2の記憶7オーマ
ツトを模式的に示す図、第9図はカードが逆方向に投入
されたときメモリM、からメモリM、にデータを移し替
えるときの動作を説明する図である。 l・・・カードリーダー、2・・・第1メモリ  3・
・・始め符号検出手段、4・・・第1511!−理事段
、5・・・第2処理手段、6・・・第2メモリ。
Fig. 1 is a diagram showing the principle configuration of the present invention, Fig. 2 is a block diagram showing the structure of an embodiment of the invention, Fig. 3 is a diagram showing the main memory structure of RAM, and Fig. 4 is a diagram showing the main memory structure of the card. 5 is a flowchart showing the operation of the CPU, FIGS. 6 and 7 are diagrams schematically showing the storage format of memory M, and FIG. 8 is a diagram showing the storage format of memory M2. FIG. 9, which is a schematic diagram, is a diagram for explaining the operation when data is transferred from memory M to memory M when the card is inserted in the reverse direction. l...Card reader, 2...First memory 3.
...Start code detection means, 4...1511th! - board stage, 5... second processing means, 6... second memory;

Claims (1)

【特許請求の範囲】 1、カード情報記録部の前後にそれぞれ余白部を有し、
該余白部には連続して2進符号“0”が記録されるとと
もに、前記カード情報記録部には始め符号、カードデー
タ、終わり符号、およびこれら情報の水平奇偶検査のた
めの水平冗長符号(LRC)が順次記録されているカー
ドからカード情報を読み取る装置であって、 前記カードリーダーがカードを走査して得た1ビット毎
のデータを順次記憶する第1メモリと、該第1メモリが
記憶しているデータを1バイトづつ読み出してこの1バ
イトのデータが前記余白部のデータ以外であると、これ
が始め符号であるか否かを判別する始め符号判別手段と
、最大限記憶できる情報数がカード情報記録部に記録さ
れている情報数と同数となるように設定されている第2
メモリと、前記始め符号判別手段が判別した1バイトの
データが始め符号であると、前記余白部のデータを除い
て前記第1メモリが順方向に記憶している1ビットごと
のデータを順次前記第2メモリにロードする第1処理手
段と、前記始め符号判別手段が判別した1バイトのデー
タが始め符号でないと、前記余白部のデータを除いて前
記第1メモリが逆方向に記憶している1ビットごとのデ
ータを順次前記第2メモリにロードする第2処理手段と
を具備したカード情報読み取り装置。
[Scope of Claims] 1. Having a margin section before and after the card information recording section,
Binary codes "0" are continuously recorded in the blank space, and the card information recording section contains a start code, card data, end code, and a horizontal redundancy code (for horizontal odd-even check of these pieces of information). A device for reading card information from a card in which a card (LRC) is sequentially recorded, the first memory sequentially storing data bit by bit obtained by scanning the card by the card reader; A start code discriminator is provided which reads out the data one byte at a time, and if this one byte of data is other than the data in the margin area, starts code discriminating means determines whether or not this is the start code, and the maximum number of information that can be stored is The second card is set to have the same number of information as the number of information recorded in the card information recording section.
If the 1-byte data determined by the memory and the start code discriminating means is the start code, the first memory sequentially stores the 1-bit data stored in the forward direction except for the data in the margin. If the 1-byte data determined by the first processing means to be loaded into the second memory and the start code discriminating means is not a start code, the first memory stores the data in the opposite direction except for the data in the blank area. A card information reading device comprising: second processing means for sequentially loading data bit by bit into the second memory.
JP1103144A 1989-04-21 1989-04-21 Card information reader Pending JPH02281468A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1103144A JPH02281468A (en) 1989-04-21 1989-04-21 Card information reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1103144A JPH02281468A (en) 1989-04-21 1989-04-21 Card information reader

Publications (1)

Publication Number Publication Date
JPH02281468A true JPH02281468A (en) 1990-11-19

Family

ID=14346327

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1103144A Pending JPH02281468A (en) 1989-04-21 1989-04-21 Card information reader

Country Status (1)

Country Link
JP (1) JPH02281468A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0554213A (en) * 1991-08-28 1993-03-05 Fujitsu General Ltd Card and card reader
US5679942A (en) * 1993-08-27 1997-10-21 Kabushiki Kaisha Sankyo Seiki Seisakusho Magnetic card reader using two multi channel magnetic heads that can read magnetic track data in two separate and distinct directions

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6486368A (en) * 1987-06-16 1989-03-31 Nippon Signal Co Ltd Encode data reading method for magnetic ticket

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6486368A (en) * 1987-06-16 1989-03-31 Nippon Signal Co Ltd Encode data reading method for magnetic ticket

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0554213A (en) * 1991-08-28 1993-03-05 Fujitsu General Ltd Card and card reader
US5679942A (en) * 1993-08-27 1997-10-21 Kabushiki Kaisha Sankyo Seiki Seisakusho Magnetic card reader using two multi channel magnetic heads that can read magnetic track data in two separate and distinct directions

Similar Documents

Publication Publication Date Title
US4500926A (en) Data-recording apparatus
JP2846847B2 (en) Decoding device for dual frequency data signal
US4239151A (en) Method and apparatus for reducing the number of rejected documents when reading bar codes
US4667089A (en) Bar code discriminating apparatus for bar code reading
US5128527A (en) Apparatus for reading a bar code
US6371373B1 (en) Method for reading a two-dimensional barcode
CA2192062C (en) Recording medium, recording method and apparatus, and reproduction method and apparatus
JPH0828053B2 (en) Data recording method
JPS61115179A (en) Bar code reader
US4104682A (en) Apparatus for reducing the number of undetected errors read along the length of a binary information bearing medium
JPH06101207B2 (en) Error detection and correction method
JP3170123B2 (en) Error correction circuit
US20020194544A1 (en) Recovery of user data from partially incorrect data set in tape data storage system
JPH0648582B2 (en) Optical information recording / reproducing method
JPH02281468A (en) Card information reader
KR100244190B1 (en) Sync. signal detection circuit
US6554190B1 (en) Bar code reader and its misreading detecting method
KR970010372B1 (en) Similar character reading system of barcode decoder
JP2533132B2 (en) Magnetic tape device
JP3658972B2 (en) Bar code reading device, bar code reading method and recording medium
CN1120880A (en) Auxiliary video information code correction in sync-suppression type scrambled video signals
KR100234400B1 (en) Apparatus and method of digital video disk system
JPH06274681A (en) Reader for document or the like
JP3251732B2 (en) Control method and control device for magnetic tape device
JPH113398A (en) Bar code reader, bar code reading method and recording medium