CN205581880U - A general converter of data for magnetic card reader - Google Patents

A general converter of data for magnetic card reader Download PDF

Info

Publication number
CN205581880U
CN205581880U CN201620000755.6U CN201620000755U CN205581880U CN 205581880 U CN205581880 U CN 205581880U CN 201620000755 U CN201620000755 U CN 201620000755U CN 205581880 U CN205581880 U CN 205581880U
Authority
CN
China
Prior art keywords
data
magnetic card
card reader
chip microcomputer
clok
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.)
Expired - Fee Related
Application number
CN201620000755.6U
Other languages
Chinese (zh)
Inventor
戴天泽
徐艺铭
夏宝亮
单晓东
侯宇馨
田雪枫
郭晨阳
王志强
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.)
North China Electric Power University
Original Assignee
North China Electric Power University
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 North China Electric Power University filed Critical North China Electric Power University
Priority to CN201620000755.6U priority Critical patent/CN205581880U/en
Application granted granted Critical
Publication of CN205581880U publication Critical patent/CN205581880U/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The utility model belongs to the technical field of the electron, a a general converter of data for magnetic card reader. Wherein general converter includes: shaping circuit, singlechip, serial circuits. When data input, the CLOK pulse triggers singlechip external interrupt, the data of singlechip through reading P1.0 through shaping circuit to do you after carrying out corresponding data processing, through RS232 output, realize magnetic card reader CLOK DATA data signal arrives ordinary serial data's conversion. Utilize the serial communication data format who the most often uses to carry out data record in the engineering, realize magnetic card reader data identification's universalization, transmission distance's long -rangeization, the intellectuality of discernment mode.

Description

A kind of data general-purpose transducer for magnetic card reader
Technical field
The invention belongs to electronic technology field, be mainly used in the identification to magnetic card signal and carry out the conversion of general RS232 data form.
Background technology
The application of magnetic card is very universal, and especially banking system application is the most, although currently promote the application of IC-card, but magnetic card exits still some time;nullAt present many number systems of application are desirable that and must be compatible with magnetic card signal,But mostly current magnetic card signal is CLOK-DATD signal by what reader exported,This data form is not a kind of general international standard,But because most of producers follow such a transmission mode,So achieving the accreditation of industry and observing,Various control equipment also can only adapt therewith,CLOK-DATD data define as shown in Figure 1: bus definition is two-wire system form,Identify with CLOK-DATD respectively,When there is no data,Article 2, line is all low level,When having data to export,CLOK exports data high impulse,DATA exports data,Data are formed by 5,Wherein first place is to post even parity bit,Heel 4 bit data,Total data have 37,Magnetic card 2 rail data define the card images such as bank's serial number.
Owing to CLOK-DATD bus is not a kind of international standard or national standard, the most do not produce the identification module or integrated circuit adapted therewith, and a kind of data transfer mode that only some equipment of Some Enterprises is followed, especially front end recognition equipment, if other business equipment is matched, must adapt therewith, and existing control equipment, it it is all the unconfined technology requirement meeting front end recognition device, for the reader used in product, need to design the controller data port of oneself, to actual user, the selection of reader is brought certain limitation, the installation of product is also restrained.
Summary of the invention
For the problems referred to above, the present invention proposes a kind of data general-purpose transducer for magnetic card reader
A kind of data general-purpose transducer for magnetic card reader, specifically includes that shaping circuit, single-chip microcomputer, serial interface switching circuit;
Wherein, shaping circuit is connected with CLOK and DATA line respectively, promotes its driving force and the P1.0 input/output terminal of level reverse process, outfan and single-chip microcomputer and the external interrupt mouth INT0 of single-chip microcomputer is connected;The TXD serial ports transmitting terminal of single-chip microcomputer is connected with RS232 serial communication circuit respectively with RXD serial ports receiving terminal.
Described shaping circuit uses model to be the circuit of 74LS06.
Described single-chip microcomputer model is 89C2051 single-chip microcomputer.
Described serial port circuit is RS232 serial port circuit.
A kind of using method of the data general-purpose transducer for magnetic card reader, including:
Step 1, interruption and serial ports to single-chip microcomputer initialize, storehouse is set, empty data field, arranging data storage and data length counter, arranging external interrupt INT0 is that trailing edge triggers interruption, arranges serial ports, No. 0 intervalometer and No. 1 intervalometer are set, data length clear 0, arranges external interrupt, allows that intervalometer and external interrupt trigger and interrupts;
Step 2, the CLOK-DATA bus receiving single-chip microcomputer input data are identified, when there being data to input, i.e. INT0 pin has negative pulse, the external interrupt mouth INT0 of single-chip microcomputer is triggered by trailing edge and causes interruption, ensure that each negative pulse is only interrupted once, read the P1.0 pin level of single-chip microcomputer when interrupting, identify CLOK-DATA bus data position, data bit stored simultaneously and count;
Intervalometer in step 3, single-chip microcomputer judges whether the input of CLOK-DATA bus data terminates, and when INT0 pin positive pulse exceedes the setting time, causes No. 0 timer interruption, then carries out data process, finally the data put in order exported in serial port circuit.
In described step 1, the Configuration of baud rate of No. 1 intervalometer is 9600bps/s, and arranging No. 1 intervalometer is the pattern with 8 bit timing devices of heavy duty automatically, and No. 0 intervalometer is set to the pattern of 16 bit timers;The time that sets of No. 0 intervalometer is as 10ms.
The beneficial effects of the present invention is: by the application of this invention product, make CLOK-DATA signal can be highly convenient for identifying, realize being connected easily and effectively of headend equipment and rear end equipment, it is developed and applied simpler by relevant device manufacturer, programming is also more prone to, effectively reduce the obstacle of mutual interface between equipment, make product versatility higher;A kind of CLOK-DATA data signal the most easy to identify is converted to Universal Serial, thus provides convenient for the connection between product;Unified CLOK-DATA evaluator, serial communication data form most-often used in utilizing works carries out data record, carries out reader data transmission by RS232 bus, it is achieved the generalization of reader data identification, the intellectuality of recognition method.
Accompanying drawing explanation
Fig. 1 is that CLOK-DATA bus data defines schematic diagram;
Fig. 2 is the data converter circuits principle schematic of CLOK-DATA bus.
Detailed description of the invention
Elaborate below in conjunction with the accompanying drawings.A kind of using method of the data general-purpose transducer for magnetic card reader, including: shaping circuit, single-chip microcomputer, serial port circuit;
Wherein, the outfan CLOK of shaping circuit and magnetic card reader DATA line be connected, be connected with the P1.0 input/output terminal of single-chip microcomputer after the DATA input shaping of circuit, after CLOK outfan shaping, the external interrupt mouth INT0 with single-chip microcomputer is connected;The TXD serial ports transmitting terminal of single-chip microcomputer is connected with serial port circuit respectively with RXD serial ports receiving terminal.
Described shaping circuit uses model to be the circuit of 74LS06.
Described single-chip microcomputer model is 89C2051 single-chip microcomputer.
Described serial port circuit is RS232 serial port circuit.
A kind of data general-purpose transducer for magnetic card reader, specifically includes that
Step 1, interruption and serial ports to single-chip microcomputer initialize, storehouse is set, empty data field, arranging data storage and data length counter, arranging external interrupt INT0 is that trailing edge triggers interruption, arranges serial ports, No. 0 intervalometer and No. 1 intervalometer are set, data length clear 0, arranges external interrupt, allows that intervalometer and external interrupt are interrupted;
Step 2, the CLOK-DATA bus receiving single-chip microcomputer input data are identified, when there being data to input, i.e. INT0 pin has negative pulse, the external interrupt mouth INT0 of single-chip microcomputer receives trailing edge and triggers interruption, ensure that each negative pulse is only interrupted once, read the level of the P1.0 input/output terminal of single-chip microcomputer when interrupting, identify CLOK-DATA bus data position, data bit arranged simultaneously, store and count;
Intervalometer in step 3, single-chip microcomputer judges whether the input of CLOK-DATA bus data terminates, and when INT0 pin positive pulse exceedes the setting time, causes No. 0 timer interruption, and carries out data compilation, then output data in serial port circuit.
In described step 1, the Configuration of baud rate of single-chip microcomputer intervalometer 1 is 9600bps/s, and arranging single-chip microcomputer intervalometer 1 is the pattern with 8 bit timing devices of heavy duty automatically, and single-chip microcomputer intervalometer 0 is set to the pattern of 16 bit timers;The time that sets of No. 0 intervalometer is as 10ms.
Embodiment one
General purpose converter uses 89C2051 single-chip microcomputer to connect as in figure 2 it is shown, be linked into the P1.0 port of single-chip microcomputer after DATA input signal shaping as core, hardware;CLOK is connected with single-chip microcomputer external interrupt mouth INT0 after shaping;Export by serial port TXD/RXD and carry out corresponding RS232 conversion output, can be connected with the equipment being capable of identify that its port, thus realize the conversion to normal serial data of the magnetic card reader CLOK-DATA data.When there being data to input, after CLOK shaping, there is negative pulse to export, cause single-chip microcomputer external interrupt, after single-chip microcomputer carries out corresponding data identification and processes, exported by RS232.
The above; being only the present invention preferably detailed description of the invention, but protection scope of the present invention is not limited thereto, any those familiar with the art is in the technical scope that the invention discloses; the change that can readily occur in or replacement, all should contain within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with scope of the claims.

Claims (4)

1. the data general-purpose transducer for magnetic card reader, it is characterised in that realize the conversion to RS232 Universal Serial of the magnetic card reader CLOK-DATA data;Hardware specifically includes that shaping circuit, single-chip microcomputer, serial port circuit;Wherein, the input of shaping circuit, CLOK data wire with magnetic card reader output is connected with DATA line respectively, and the output after DATA shaping is connected with the P1.0 input/output terminal of single-chip microcomputer, and the output after CLOK shaping is connected with the external interrupt mouth INT0 of single-chip microcomputer;The TXD serial ports transmitting terminal of single-chip microcomputer is connected with serial port circuit respectively with RXD serial ports receiving terminal.
Data general-purpose transducer for magnetic card reader the most according to claim 1, it is characterised in that described shaping circuit uses model to be the circuit of 74LS06.
Data general-purpose transducer for magnetic card reader the most according to claim 1, it is characterised in that described single-chip microcomputer model is 89C2051 single-chip microcomputer.
Data general-purpose transducer for magnetic card reader the most according to claim 1, it is characterised in that described serial port circuit is RS232 serial port circuit.
CN201620000755.6U 2016-01-04 2016-01-04 A general converter of data for magnetic card reader Expired - Fee Related CN205581880U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201620000755.6U CN205581880U (en) 2016-01-04 2016-01-04 A general converter of data for magnetic card reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201620000755.6U CN205581880U (en) 2016-01-04 2016-01-04 A general converter of data for magnetic card reader

Publications (1)

Publication Number Publication Date
CN205581880U true CN205581880U (en) 2016-09-14

Family

ID=56882979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201620000755.6U Expired - Fee Related CN205581880U (en) 2016-01-04 2016-01-04 A general converter of data for magnetic card reader

Country Status (1)

Country Link
CN (1) CN205581880U (en)

Similar Documents

Publication Publication Date Title
CN101399654B (en) Serial communication method and apparatus
CN106372012A (en) Serial port awakening system not using handshake control line and serial port communication method
CN205959200U (en) A latch circuit for I2C bus data transmission
CN101841542A (en) Method for realizing PROFIBUS master station communication protocol based on FPGA (Field Programmable Gate Array) technology
CN102355507A (en) Novel serial communication interface with functions of self-detection and conflict detection
CN107766200A (en) A kind of I2C monitoring bus system and monitoring method
CN104484306A (en) Master-slave synchronous serial communication bus based on differential signal and realization method of master-slave synchronous serial communication bus
CN104239255A (en) Universal data converter and method for Wiegand bus
CN107771331A (en) Free-standing UARK BRK detections
CN109656850A (en) The DSP serial communication circuit extended using single CPLD
CN203399150U (en) Electric energy meter networking system capable of automatically sending address information
CN205581880U (en) A general converter of data for magnetic card reader
CN101345680B (en) Operation method of communication system
CN104144137B (en) A kind of high speed LVDS serial synchronous communication controllers
CN207319225U (en) A kind of iic bus circuit with isolation features
CN105471479A (en) CAN-bluetooth data transmission device used for industrial field
CN107608927A (en) A kind of design method for supporting Full Featured lpc bus host port
CN101345681A (en) Operation method for main unit of intelligent electric appliance serial bus
CN201349219Y (en) Asynchronous communication controller
CN202935897U (en) Sudden-stop lock switch position recognition device of belt conveyor
CN103218325B (en) Based on SJA1000 Interface IP Core and the control method thereof of PLB bus
CN102184153A (en) RS-485 transmitting-receiving automatic conversion circuit
CN201111065Y (en) IC card read-write controller based on 51 SCM
CN206627943U (en) A kind of control circuit
CN201063703Y (en) Intelligent card communication circuit of set up box

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160914

Termination date: 20180104

CF01 Termination of patent right due to non-payment of annual fee