Design and Implementation of Supermarket royalty Control Cash Register

1 Introduction
The tax control cash register is an electronic cash register with specific tax control functions, which can ensure the correct generation of data, reliable storage, secure transmission, and realize tax management and auditing functions. Compared with the general tax industry tax control machine, the supermarket version needs to store a large number of items, and has a variety of product search, sales, collection methods and business reports. The supermarket royalty is a complex system that is difficult to implement with a simple processor such as an 8-bit or 16-bit microcontroller, and such processors generally have no operating system and are inconvenient to operate. In view of this situation and the needs of small and medium-sized supermarkets, this paper proposes a design scheme of supermarket royalty-controlled cash registers based on W90P710 processor and μCLinux operating system, and proposes a power-down protection device and an embedded operating system. It can effectively improve the performance of the tax control machine in terms of processing power, storage capacity, power failure protection and user operation.


2 system hardware design
2.1 Hardware Architecture
The design processor is W90P710/W90N745, which is a device designed for tax control cash registers. It integrates almost all the controllers required by the tax control machine, also known as the system on chip (SOC). ), it uses ARM's ARM7TDMI microprocessor core and 0.18μm standard production, standard operating frequency up to 80 MHz, and 176-Pin/128-Pin LQPF package, which greatly reduces power consumption and cost, and reduces system The expansion and volume.
Supermarket royalty control cash registers mainly include the main control part (MCU, RAM, program memory, real time clock), tax control memory, invoice memory, communication part, display, printing part, keyboard, IC card reader and other necessary configuration and Some of the extended configuration of the local tax version of the cash register (bar code gun, cash box, permission lock, tax control cash register hardware design generally uses the core board (CPU board), interface board, functional module external subsystem. 1 is composed of its hardware.

This article refers to the address: http://

2.2 Core Board and Interface Board Module
    The CPU peripheral circuit mainly includes a power-on initialization setting circuit, a crystal oscillator circuit, and a CPU reset circuit. Figure 2 shows the CPU reset circuit.

(1) Reset circuit When the voltage is 2.8~3.0 V, the CPU can work normally, but the NOR Flash can't work normally. At this time, the data written to the Flash is not reliable. In this case, when the power is illegally powered off, Therefore, the system design introduces a CPU reset circuit. Considering the power consumption and cost, the ADM-809-T device is selected to be active low and the reset time is 140 ns, which satisfies the W90P710's reset time requirement.
(2) The SDRAM circuit uses two parallel 16-bit W986d16EHs to form a 32-bit SDRAM.
(3) Flash circuit is divided into two parts: NAND Flash and NOR Flash. This design uses the NOR Flash of W19B/L320S as the program memory, and uses the NAND Flash of HYUS08121A as the data memory of the tax control machine.
(4) USB interface circuit W90P710 integrates USB HOST controller conforming to USB1.1 specification. Since the USB-HOST and USB-DEVICE controllers are integrated inside the W90P710, simply pull out their interfaces.
(5) The Ethernet circuit is mainly composed of a MAC controller and a physical layer interface (PHY). The W90N710 embeds an Ethernet MAC controller and additionally uses the DM9161 physical layer device to provide an Ethernet access channel.
(6) LCD circuit Considering the cost, the display function module of the tax control machine adopts MST-G240128DYSY-5W type liquid crystal display, which is a 240x128 dot matrix graphic display, and its controller is UC1608.
(7) RTC power-down protection circuit Because the tax control data is declared and audited, it involves the system time of the tax control machine. Therefore, the tax-controlled cash register requires a high-precision clock, so the RTC power-down protection circuit is extremely important. The specific circuit is shown in Figure 3.

The principle of power-down protection is actually to use two diodes to select whether to use the system power supply or the backup battery. When the tax control machine is powered normally, the voltage at the VBAT terminal is about 2.6 V, and VD2 is not turned on at this time; If the tax control machine is powered down, VD3 will not conduct. At this time, VD2 is turned on, and the backup battery is enabled to realize uninterrupted power supply. Since the RTC supply voltage is approximately 1.8 V; a 3.3 V to 1.8 V Zener diode should be added to power the RTC controller in the W90P710.
2.3 Peripheral function sub-module Supermarket royalty control cash register peripherals include printers that print invoices, keyboards operated by users, and card reader devices that communicate with tax-controlled user cards. The three peripheral devices are each controlled by an 8-bit single-chip microcomputer, and the functions are relatively independent. These device modules are independently designed and connected to the host through a serial port. The processor W90P710 has four independent serial ports. The communication between the devices in the tax control machine only uses the serial port 1 as the serial bus, and the core board expands three identical interfaces, which are respectively connected with the card reader, the printer and the keyboard. ARM7 communicates with the three peripherals in a communication mode of command response, and uses a time slice polling scheme. When the bus competes, it can prevent a device from occupying bus resources and causing a crash. Serial port 0 is used as a debug port and is connected to a PC. The serial port 2 is connected to an external tablet for inputting text information. Serial port 3 is connected to an external MODEM and other devices. In addition to the unique features of the supermarket royalty control cash register compared to the local tax version, this design also adds peripherals such as barcode guns, cash boxes, and permission locks.

3 system software design
3.1 System Software Architecture
Tax control system software is mainly composed of hardware driver, operating system platform related software and application software. Hardware drivers include CPU initialization, Flash driver, LCD driver, USB driver, Ethernet driver, serial port driver, etc. Operating system platform related software includes system bootloader (BootLoader), operating system kernel, operating system components, API, cross compiler, and the like. The hardware driver provides a uniform interface for μCLinux to access the underlying hardware. The system boot program is designed for the BootLoader that comes with the development board and is modified according to the actual requirements of the tax control machine. The bootloader is responsible for power-on boot, hardware detection, and access to the μCLinux operating system. The μCLinux operating system implements file system management, task mobilization, network functions, device drivers, and provides functions such as the operating environment of the user program. The top layer is the application software. The embedded Linux software platform architecture of the tax control system is shown in Figure 4.

3.2 Application Software Design
3.2.1 Software Architecture The
supermarket control cash register application software has three major functions: system management setup function, business function and tax control function. The main control module controls machine information, including system settings, administrator management, basic information query, and additional functions. This module is closely related to the business management module and the tax control management module. The two modules of business management and tax control are relatively independent, mainly related to machine initialization and billing operations. The data of these three modules are stored in the embedded database. At the same time of modular design, each module also adopts layered design, with interface, database and basic process 3 layers, respectively calling different API interfaces, and the structure is clear, which lays a foundation for cross-platform transplantation of subsequent code. The division of system function modules is shown in Figure 5.

Application software is the core of the supermarket royalty control cash register. Since the ARM7 processor does not have an MMU (memory management unit), you must consider the memory usage when designing the application, otherwise it will cause errors and cause the program to crash. The application software of the tax control cash register adopts a structured and modular design. At the same time of module division, each module is designed in layers, from top to bottom, interface layer, database application layer and process layer.
3.2.2 System Management Module System management includes employee management, system settings, and basic information query. Among them, employee management mainly has two kinds of authority management and single management. When the machine is initialized, the database has a default administrator. The operator can only log in as the administrator before registering the employee, and then register the new employee to operate. The system setting is mainly to set the system function and implement the system. Set the operation of the table; the basic information query is the operation of the database, the user can query the information of the machine in this sub-module.
3.2.3 Business Management Module Business management consists of two modules, Sales and Reporting. Among them, the sales module is the most frequently used part of the supermarket version of the cash register, including the cashier shift, cash box management, a variety of single product entry methods and other functions. The report sub-module mainly summarizes the sales and invoice information in a stage, so that the user can understand the sales volume, the sales volume of individual projects and the employee performance. After viewing the report, the user can print various report information.
3.2.4 Tax Management Module The tax management module includes two modules: invoice management and tax management. Among them, the invoice management module mainly manages the invoice for the tax control machine. In general, refunds and scraps are the other two ways of selling. The reason why the invoice management module is placed in the tax management module is mainly because the two modules are used less and there is no need to put them together with sales. Need to choose. Only the tax management module is the most important function of the tax control cash register, so it is required to be safe and reliable, and it can be beneficial to the promotion of the tax control machine in consideration of all abnormal situations. Tax management includes functions such as tax initialization, billing, reporting, tax payment, and auditing.

4 Application examples have been carefully designed and repeatedly debugged. At present, the prototype has been completed and tested and certified to reliably implement various functions. The specific functions are realized: sub-rights management, support 6 administrators, 99 cashiers; 13 business reports can be printed: support 20,000 PLUs, barcode length supports 1~20 digits; up to 50 divisions can be divided into commodities Class management; can quickly register 20 PLUs; can retain up to 20 sales suspension information; have input shortcut keys, product codes, commodity barcodes, merchandise pinyin 4 types of product search methods; support cash, coupons, credit cards, checks And 6 kinds of payment methods such as foreign currency, and can carry out refund and invalid ticket operation; up to 6 items can be used at the same time, each item can correspond to different tax rates; have a single invoice limit, cumulative invoice limit, refund limit function; Supports printing of 76 mm and 57 mm invoices; can store 100 cash drawer reports and record 50 000 invoice details; can maintain 10 years of daily transaction data (national standard requirements are not less than 5 years); can reliably complete tax returns and pay taxes And the audit function of the tax department.

5 Conclusion Based on the relevant standards of the national tax control machine, carefully study the shortcomings and defects of the current tax-controlled cash registers, and design the software and hardware of the supermarket-controlled cash registers according to market demand. However, due to hardware limitations, the number of single item registrations and the search speed are still not ideal. This type of tax control machine is suitable for small and medium-sized supermarkets. On this basis, the online version of the cash register can be developed and used in large supermarkets.

Outdoor Optical Fiber Cable

Outdoor Fiber Cable,Outdoor Fiber,2 Core Outdoor Fiber Optic Cable,2 Core Outdoor Cable

Zhejiang Wanma Tianyi Communication Wire & Cable Co., Ltd. , https://www.zjwmty.com

This entry was posted in on