CN102568118A - USB (Universal Serial Bus) data download interface based on embedded POS (Point of Sales) machine - Google Patents

USB (Universal Serial Bus) data download interface based on embedded POS (Point of Sales) machine Download PDF

Info

Publication number
CN102568118A
CN102568118A CN2011104540626A CN201110454062A CN102568118A CN 102568118 A CN102568118 A CN 102568118A CN 2011104540626 A CN2011104540626 A CN 2011104540626A CN 201110454062 A CN201110454062 A CN 201110454062A CN 102568118 A CN102568118 A CN 102568118A
Authority
CN
China
Prior art keywords
pin
usb
interface
data
lpc1766
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
CN2011104540626A
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.)
Changzhou University
Original Assignee
Changzhou 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 Changzhou University filed Critical Changzhou University
Priority to CN2011104540626A priority Critical patent/CN102568118A/en
Publication of CN102568118A publication Critical patent/CN102568118A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The invention discloses a USB (Universal Serial Bus) data download interface based on an embedded POS (Point of Sales) machine. The USB data download interface comprises a master control chip LPC1766, a transceiving chip ISP1302 and a USB interface, wherein a D+ pin and a D- pin of the USB interface D+ are respectively connected with a matched resistor in series and then connected with a USB_D+ pin and a USB_D- pin of the master control chip LPC1766; a USB_SCL (Serial Clock LIne) pin, a USB_SDA (Serial Data Line) pin, an EinIn pin and an RSTOUT pin of the master control chip LPC1766 are respectively connected with an SCL pin, an SDA pin, an INI_N pin and a RESET_IN pin of the transceiving chip ISP1302 and are respectively connected with a pull-up resistor; and a VBUS pin and an ID pin of the USB interface are respectively accessed into the corresponding pins of the transceiving chip ISP1302, and the VBUS pin and the VSS pin of the USB interface are respectively connected with a voltage input port and a ground port. According to the interface, under an offline condition, data can be downloaded to an external storage and the POS machine can be supplied with power.

Description

A kind of usb data download interface based on embedded POS machine
Technical field
The invention belongs to the data-interface field, relate in particular to a kind of data download interface that is used for the USB of embedded POS, this interface can download data to and preserve in the external memory storage and manage under the situation of network interruption or fault.
Background technology
Along with developing rapidly of electronic information technology, electronic consumption system obtains application more and more widely in various fields in life.Electronic consumption system just so-called " all-purpose card " system, the POS machine is exactly its front-end equipment.Embedded POS machine is connected with host computer system through network.The user " swipes the card " on the POS machine and inputs relevant business information (exchange kind, dealing money, password etc.) having being stuck in of information; By the POS machine information stores that the obtains line data of going forward side by side is handled; Send to main frame to the card internal information through network at last and preserve, accomplish a transaction.Present embedded POS machine mainly contains following several problem.First: because the POS machine generally places the client cash desk; Its applied environment is more abominable; The data of handling well through Network Transmission POS machine; Though convenient but might receive hacker's various attacks, or make loss of data because of factor such as network failure power fail, or can not in time upload reliably.Second: when carrying out data trade or data upload, because of power down suddenly the data of concluding the business or transmitting are made a mistake or lose.
The POS machine technology is used very ripe in a lot of fields; But consumption data is directly downloaded to external memory storage through USB interface to be preserved and manages and do not appear in the newspapers; Online power supply technique is applied to the POS machine, and the assurance data are not lost under powering-off state, and the reliable and stable transmission does not appear in the newspapers.
Summary of the invention
The object of the invention provides a kind of and under the situation of network interruption or fault, downloads data to the POS machine usb data download interface of preserving in the external memory storage and managing, and this USB interface can be realized POS machine function of supplying power.
Technical scheme of the present invention is: a kind of usb data download interface based on embedded POS machine; Comprise main control chip LPC1766, transceiving chip ISP1302 and USB interface, said USB interface D+ links to each other with the USB_D-pin with the USB_D+ pin of said main control chip LPC1766 after connecing and being connected in series build-out resistor respectively on pin and the D-pin; The USB_SCL pin of said main control chip LPC1766, USB_SDA pin, EinIn pin and RSTOUT pin link to each other with SCL pin, SDA pin, INI_N pin and the RESET_IN pin of said transceiving chip ISP1302 respectively, and are connected to respectively and draw resistance; The VBUS pin of said USB interface, ID pin insert the corresponding pin of said transceiving chip ISP1302 respectively, and the VBUS pin of said USB interface and VSS pin connect voltage input end mouth and ground port respectively.
Further, said usb data download interface also comprises the detection control module, and said detection control module is used for when network anomaly, detects usb bus data terminal level, has judged whether that USB inserts or extracts; If detected USB device and carried out keyboard scan, judged whether that button presses, if having data are sent in the External memory equipment.
The invention has the beneficial effects as follows: realized under the situation that network or electric power break down, still can being saved in data in the external memory storage, guaranteed that data do not lose accurately and reliably through USB interface.Do not have at terminal device to utilize this USB interface to supply power under the situation of field power supply, guarantee its operate as normal to it.
Description of drawings
Fig. 1 is a LPC1766 USB OTG port arrangement principle schematic;
Fig. 2 is the system software process flow diagram.
Embodiment
Further the USB interface of embedded POS machine is described below.
As shown in Figure 1, use the main control chip of the LPC1766 of NXP company as the POS machine.The build-out resistor of serial connection 33 Ω is connected with the USB_D-port with the USB_D+ port of LPC1766 respectively on the D+/D-line of USB interface.Between USBMINI interface and LPC1766, be connected in series R-T unit chip I SP1302.ISP1302 can transmit and accept serial data with the speed of high speed 12 Mbit/s and low speed 1.5 Mbit/s.The VBUS pin of Mini-AB interface and VSS pin are connect terminal device voltage input end mouth and ground port respectively, can provide for it+voltage of 5V with this.
Use μ C/OS-II operating system Coordination Treatment USB driver requests and accept the steering order of application program.Wherein firmware design becomes drives interrupts, mainly accomplishes enumeration process and main-machine communication.Enumeration process is that usb protocol software is accomplished automatically, and when USB device connected, master controller used default controlling plumbing fixtures to send standard USB request to it.Its control procedure does; When accessing terminal the machine USB interface to the USB memory device, the USB controller is kept watch on the voltage on its D+, the D-line, and when reaching certain value, thinking has equipment to connect; Master controller can send the GetPortStatus request to understand more information; At least after waiting for 100ms, send SetPortStatus request, reset USB device and through detecting USB device to be connected D-, D+ last that pull-up resistor is confirmed the transmission speed of equipment.The variation of USB driver detection port state finds to use non-usb host software after USB device connects and the USB device driver is discerned and configuration device.At first read the device descriptor of USB device during equipment disposition, ask the configuration information of every kind of configuration then, last USB device driver is therefrom selected one as current configuration.After the equipment disposition, configuration software returns the USB device interface message, makes it have one group of pipeline that can carry out the usb data transmission, and USB disposes these pipelines that reinitialize.Application program uses these pipelines and USB device function to carry out data transmission afterwards.
The inner USB device controller of LPC1766 has a built-in analog transceiver (ATX).The two-way D+ and the D-signal of USB ATX transmission/reception usb bus.SIE (SIE) is realized usb protocol layer at full speed, and end points buffer zone among the EP_RAM and the data transmission between the usb bus are handled.Each end points buffer zone is all realized with the SRAM form based on FIFO; Each end points of having realized all has a retaining space in EP_RAM, the EP_RAM access control logic is handled EP_RAM and the data transmission that can visit between 3 sources (CPU, SIE, DMA engine) of EP_RAM.
Under output state, USB ATX receives the two-way D+ and the D-signal of usb bus.SIE (SIE) receives serial data and converts it into parallel data stream from ATX.Parallel data can be written in the end points buffer zone of correspondence of EP_RAM.
Under input state, SIE reads parallel data from the end points buffer zone of EP_RAM, convert it into serial data, and uses USB ATX that it is transferred on the usb bus.In case Data Receiving or transmission are accomplished, just can carry out the read and write operation by the opposite end dot buffer zone.
The system works flow process is as shown in Figure 2, initialization USB device controller, and the PCUSB position of set PCONP at first, the enabled devices controller disposes and enables PLL and Clock dividers with USBCLK that 48MHz is provided and required CCLK frequency; Secondly come the enabled devices controller clock through DEV_CLK_EN and AHB_CLK_EN position in the set USBClkCtrl register.Corresponding clock bit is set up to them in the inquiry USBClkSt register.Enable the USB pin function through carrying out write operation, and use corresponding PINMODE register the pull-up resistor forbidden energy on the VBUS pin to the PINSEL of correspondence register.
To EP0 and EP1 USBEpIn and USBMaxPSize register are set then, and wait for the EP_RLZED bit in the USBDevIntSt register, expression end points EP0 and EP1 realize.Then enabled endpoints is interrupted, configuration DMA.Interrupt through the USB that corresponding address is write relevant vector table unit and enable among the NVIC, the USB interrupt handler among the NVIC is installed.Use SIE that address command is set the USB address setting of giving tacit consent to is 0x0, DEV_EN is made as 1; Use SIE that the equipment state order is set the CON position is made as 1, so that CONNECT is activated.
The connection of USB mainly enters into the connection status of USB through the EnterUsbConnect function, the tasks that other are all are all suspended; Through the connection that the ExitUsbConnect function breaks off USB, recover to carry out other all tasks.Whether computing machine has USB to insert through detection usb bus data terminal level judging or extracts.Insert if detected USB device, and then get into the keyboard scan program, judged whether that button presses, press, then call the button function, the data in the POS machine storer are sent in the External memory equipment if detect the button of download command.If not detecting button presses, then continue to judge key value.
The flow process of USB interface data short-term transmission is: host computer sends polling order, and each station terminal machine is carried out polling operation, if be polled to this POS machine, the POS chance is sent at once and replied to host computer, and so circulation is gone down.The normal response time that when finding poll, can not receive this POS machine surpasses 3 seconds, explains that then network interrupts or breaks down, and the POS chance gets into off-line state at once, can show the off line sign on the liquid crystal display, and data can't be uploaded to upper computer software.At this moment, through USB interface data are saved to external memory storage.
The Mini-USB interface has 4 interfaces, wherein VBUS port and VSS port be respectively+the 5V power end and ground, with the VBUS port connect POS machine mainboard+the 5V feeder ear, VSS holds ground connection, so just can needed WV be provided for total system.

Claims (2)

1. usb data download interface based on embedded POS machine; Comprise main control chip LPC1766, transceiving chip ISP1302 and USB interface; It is characterized in that said USB interface D+ links to each other with the USB_D-pin with the USB_D+ pin of said main control chip LPC1766 after connecing and being connected in series build-out resistor respectively on pin and the D-pin; The USB_SCL pin of said main control chip LPC1766, USB_SDA pin, EinIn pin and RSTOUT pin link to each other with SCL pin, SDA pin, INI_N pin and the RESET_IN pin of said transceiving chip ISP1302 respectively, and are connected to respectively and draw resistance; The VBUS pin of said USB interface, ID pin insert the corresponding pin of said transceiving chip ISP1302 respectively, and the VBUS pin of said USB interface and VSS pin connect voltage input end mouth and ground port respectively.
2. a kind of usb data download interface according to claim 1 based on embedded POS machine; It is characterized in that also comprising the detection control module; Said detection control module is used for when network anomaly, detects usb bus data terminal level, has judged whether that USB inserts or extracts; If detected USB device and carried out keyboard scan, judged whether that button presses, if having data are sent in the External memory equipment.
CN2011104540626A 2011-12-30 2011-12-30 USB (Universal Serial Bus) data download interface based on embedded POS (Point of Sales) machine Pending CN102568118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011104540626A CN102568118A (en) 2011-12-30 2011-12-30 USB (Universal Serial Bus) data download interface based on embedded POS (Point of Sales) machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011104540626A CN102568118A (en) 2011-12-30 2011-12-30 USB (Universal Serial Bus) data download interface based on embedded POS (Point of Sales) machine

Publications (1)

Publication Number Publication Date
CN102568118A true CN102568118A (en) 2012-07-11

Family

ID=46413450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011104540626A Pending CN102568118A (en) 2011-12-30 2011-12-30 USB (Universal Serial Bus) data download interface based on embedded POS (Point of Sales) machine

Country Status (1)

Country Link
CN (1) CN102568118A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104270232A (en) * 2014-09-30 2015-01-07 安徽鑫龙电器股份有限公司 Comprehensive protection device
CN104639203A (en) * 2015-03-11 2015-05-20 常州信息职业技术学院 Mobile communication terminal equipment
CN104933349A (en) * 2015-05-20 2015-09-23 广东欧珀移动通信有限公司 USB (universal serial bus) switching device with download verification function and download verification method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1411250A (en) * 2002-11-05 2003-04-16 浙江大学 USB communication interface system of real time signal analyzer
CN1545004A (en) * 2003-11-25 2004-11-10 浙江大学 High speed USB data communication interface arrangement
CN1991690A (en) * 2005-12-31 2007-07-04 北京菁华资源科技有限公司 USB external master-salve interface module
CN201060517Y (en) * 2007-06-29 2008-05-14 上海寺冈电子有限公司 12VUSB interface arrangement for mainframe of POS machine
US20100106869A1 (en) * 2008-10-24 2010-04-29 Semiconductor Manufacturing International (Shanghai) Corporation USB Storage Device and Interface Circuit Thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1411250A (en) * 2002-11-05 2003-04-16 浙江大学 USB communication interface system of real time signal analyzer
CN1545004A (en) * 2003-11-25 2004-11-10 浙江大学 High speed USB data communication interface arrangement
CN1991690A (en) * 2005-12-31 2007-07-04 北京菁华资源科技有限公司 USB external master-salve interface module
CN201060517Y (en) * 2007-06-29 2008-05-14 上海寺冈电子有限公司 12VUSB interface arrangement for mainframe of POS machine
US20100106869A1 (en) * 2008-10-24 2010-04-29 Semiconductor Manufacturing International (Shanghai) Corporation USB Storage Device and Interface Circuit Thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHU ZHENG WEI ET AL: "Design of the USB download interface based on embedded POS", 《THE 6TH INTERNATIONAL CONFERENCE ON COMPUTER SCIENCE & EDUCATION(ICCSE 2011)》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104270232A (en) * 2014-09-30 2015-01-07 安徽鑫龙电器股份有限公司 Comprehensive protection device
CN104639203A (en) * 2015-03-11 2015-05-20 常州信息职业技术学院 Mobile communication terminal equipment
CN104639203B (en) * 2015-03-11 2018-05-01 常州信息职业技术学院 A kind of mobile communication terminal device
CN104933349A (en) * 2015-05-20 2015-09-23 广东欧珀移动通信有限公司 USB (universal serial bus) switching device with download verification function and download verification method
CN104933349B (en) * 2015-05-20 2017-10-13 广东欧珀移动通信有限公司 With the USB switching devices and download verification method for downloading authentication function

Similar Documents

Publication Publication Date Title
US7761645B2 (en) Physical device (PHY) support of the USB2.0 link power management addendum using a ULPI PHY interface standard
US9059906B1 (en) Data communication interface
US9575552B2 (en) Device, method and system for operation of a low power PHY with a PCIe protocol stack
US6131131A (en) Computer system including an enhanced communication interface for an ACPI-compliant controller
US20050160196A1 (en) Power managed USB for computing applications using a controller
US8799539B2 (en) Chipset agnostic apparatus and method for serial communication bus port disablement
US6991173B2 (en) Method and apparatus for autoreset of a USB smart card device in a mute mode
CN108139789A (en) Usb circuit and the method for low electric power operation
US11436182B2 (en) System and method for handling in-band interrupts on inactive I3C channels
US6725310B2 (en) Scalable docking architecture to support various bandwidth
US8990461B2 (en) On-The-Go (OTG) USB devices configuration method for identifying configuration of other connected devices by reacting to change in resistance value on a resistive line
CN102568118A (en) USB (Universal Serial Bus) data download interface based on embedded POS (Point of Sales) machine
CN102890667A (en) Device and method for processing wiegand data
US7850082B1 (en) Extended universal serial bus (USB) card reader
US20230418703A1 (en) Autonomic troubleshooting of a system of devices
CN201820218U (en) Host system and data transmission circuit
US7457904B2 (en) Methods and systems for a reference clock
TWI768355B (en) Interface connection device, system and method thereof
CN102866755A (en) Power-on reset device for integrated test system
CN110442539B (en) Mobile phone OTG switching method and device
CN112579507A (en) Host machine and BMC communication method, BIOS, operating system, BMC and server
CN112968332A (en) Compatible device and method for switching TYPE-C interface of tablet personal computer mainboard to UART serial port communication
US11513810B1 (en) Information handling system with display device interface supporting dynamic configuration of link data rate
CN118132243B (en) Interrupt signal processing method, device, equipment, medium, circuit and system
US10809789B1 (en) Peripheral component protection in information handling systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120711