CN104933456A - Singlechip based bar code networking scanning system and method - Google Patents
Singlechip based bar code networking scanning system and method Download PDFInfo
- Publication number
- CN104933456A CN104933456A CN201510341483.6A CN201510341483A CN104933456A CN 104933456 A CN104933456 A CN 104933456A CN 201510341483 A CN201510341483 A CN 201510341483A CN 104933456 A CN104933456 A CN 104933456A
- Authority
- CN
- China
- Prior art keywords
- module
- barcode
- chip microcomputer
- scanning
- networking
- 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
Links
- 230000006855 networking Effects 0.000 title claims abstract description 30
- 238000000034 method Methods 0.000 title claims abstract description 7
- 238000003860 storage Methods 0.000 claims abstract description 29
- 238000004891 communication Methods 0.000 claims abstract description 8
- 239000004973 liquid crystal related substance Substances 0.000 claims description 21
- 230000000087 stabilizing effect Effects 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 abstract description 14
- 238000004377 microelectronic Methods 0.000 abstract description 2
- 230000005540 biological transmission Effects 0.000 description 8
- 238000013461 design Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000007726 management method Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 239000000463 material Substances 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 238000007639 printing Methods 0.000 description 2
- 230000001105 regulatory effect Effects 0.000 description 2
- 238000013068 supply chain management Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 230000006698 induction Effects 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 238000012384 transportation and delivery Methods 0.000 description 1
Landscapes
- Cash Registers Or Receiving Machines (AREA)
Abstract
本发明涉及微电子技术及条形码识别技术领域,特指一种基于单片机的条形码联网扫描系统及方法。系统上电后,条码扫描查询单片机和联网单片机分别对液晶显示模块和WIFI串口模块进行初始化,初始化完成以后即可通过无线路由器检测到WIFI信号,指定的联网单片机将条形码信息下载并保存至存储模块;当进行条形码扫描时,条码扫描模块将扫描到的信息通过串口通信发送给其中指定条形码扫描的单片机,该单片机及时的将编码显示在液晶屏上,同时根据条码编号在存储模块中进行查询,将相应的信息显示在液晶屏上;此外,在具有网络信号的环境中,条形码联网扫描系统能够及时更新存储条形码信息。
The invention relates to the field of microelectronic technology and barcode identification technology, in particular to a single-chip microcomputer-based barcode networking scanning system and method. After the system is powered on, the barcode scanning query MCU and the networked MCU initialize the LCD module and the WIFI serial port module respectively. After the initialization is completed, the WIFI signal can be detected through the wireless router, and the designated networked MCU downloads and saves the barcode information to the storage module. ; When barcode scanning is performed, the barcode scanning module sends the scanned information to the single-chip microcomputer where the specified barcode is scanned through serial port communication, and the single-chip microcomputer timely displays the code on the LCD screen, and simultaneously searches the storage module according to the barcode number. Display the corresponding information on the LCD screen; in addition, in an environment with network signals, the barcode networking scanning system can update and store barcode information in time.
Description
技术领域 technical field
本发明涉及微电子技术及条形码识别技术领域,特指一种基于单片机的条形码联网扫描系统及方法。 The invention relates to the field of microelectronic technology and barcode identification technology, in particular to a single-chip microcomputer-based barcode networking scanning system and method.
背景技术 Background technique
从上个世纪开始,由于计算机、互联网和移动通信技术的出现,掀起了社会变革的巨大浪潮,条形码技术也随着计算机的发展开始出现,条形码技术的应用起源于70年代初期,这项技术在很长的时间里没有受到人们的普遍重视;直到进入80年代后,因条形码作为信息的一种载体具有准确性高、速度快、标识制作成本低等优点,而被迅速广泛地应用到各个领域,成为自动识别领域中的一个重要分支;条形码问世三十多年来,已经形成了一定的规模,该技术已经深入到商业、邮电业、运输业、物流管理、餐饮服务、安检、医疗等人民生活的各个方面,与人民生活息息相关,密不可分。 Since the beginning of the last century, due to the emergence of computers, the Internet and mobile communication technologies, a huge wave of social change has been set off. Barcode technology has also begun to appear with the development of computers. The application of barcode technology originated in the early 1970s. For a long time, it has not been generally paid attention to by people; until the 1980s, as a carrier of information, barcodes have the advantages of high accuracy, fast speed, and low cost of marking, and are quickly and widely used in various fields. , has become an important branch in the field of automatic identification; barcodes have been around for more than 30 years, and have formed a certain scale. All aspects of life are closely related to people's lives and are inseparable.
通过使用条码自动识别技术可以对物品的相关信息进行高效可靠的管理,减少人为的错误,在各行各业得到广泛应用,如以下几个方面:一、超级市场在出口处设置条形码阅读器,市场上的每个商品都有自己的条形码标签,收款员在给顾客结算时,用光笔扫描器或激光扫描器扫描其所购的每个商品的条形码标签,就可完成结算,员工也可通过计算机随时对商品的信息进行查询与修改,分析哪些是畅销货,哪些是滞销货;二、工业生产中采用条形码识别系统可以提高自动化程度,减少废品率, 提高生产效率;库存管理:包括材料和备品的库存情况,已订货及待订货情况,以便满足生产需要。生产管理:包括在线产品跟踪,也可以提供车间现场各种工作的准确状况;固定加工路线、运转状态工作站生产率、劳力需求,材料状况、加工时间和日期、发货详细情况等等也可由条形码识别系统踉踪;如在汽车装配线上,采用条形码识别系统可以使成千上万种零件得以自动化管理,自动地通过传送带,送到它们应去的地方进行装配。在物流供应链管理方面,从产品的生产到成品下线、销售、运输、仓储、零售等各个环节,都可以应用条码技术,进行方便、快捷的管理;条码就一条纽带,把产品生命期中各阶段发生的信息联接在一起,使企业在激烈的市场竞争中处于有利地位;条码化可以保证数据的准确性,条码设备使用既方便又快捷;此外,在银行及人事档案的管理以及物资流通等方面,都可方便地使用条形码数据处理系统。 Through the use of barcode automatic identification technology, the relevant information of items can be managed efficiently and reliably, and human errors can be reduced. Each product on the website has its own barcode label. When the cashier is paying the customer, he can use the light pen scanner or laser scanner to scan the barcode label of each product he purchased to complete the settlement. Employees can also pass The computer can query and modify the product information at any time, and analyze which products are best-selling products and which products are unsalable products; 2. The use of barcode recognition systems in industrial production can improve automation, reduce scrap rates, and improve production efficiency; inventory management: including materials and Inventory of spare parts, ordered and pending orders, in order to meet production needs. Production management: including online product tracking, and can also provide accurate status of various work on the workshop site; fixed processing routes, operating status workstation productivity, labor demand, material status, processing time and date, delivery details, etc. can also be identified by barcodes System tracking; For example, on the automobile assembly line, the use of barcode recognition systems can enable thousands of parts to be automatically managed, and automatically sent to the place where they should go for assembly through the conveyor belt. In terms of logistics supply chain management, from product production to finished product off-line, sales, transportation, warehousing, retail and other links, barcode technology can be applied for convenient and fast management; The information generated in each stage is connected together, so that the enterprise is in a favorable position in the fierce market competition; barcode can ensure the accuracy of data, and the use of barcode equipment is convenient and fast; in addition, in the management of banks and personnel files and the circulation of materials, etc. In all aspects, the bar code data processing system can be easily used.
今后,条形码技术发展的主要趋向是提高印刷质量,提高密度和发展更先进的硬件;不久的将来,条形码识别系统必将成为应用最广泛,最受人们欢迎的识别系统;条形码扫描系统正是为此设计的,传统条形码扫描器通常采用的是有线方式,扫描器经过标准键盘口、串口或是USB 等接口,与计算机或主机联接;这种结构使得扫描器具有成本高、体积大、使用不方便等特点;目前,国内的条形码扫描器大多采用有线方式,这使现场操作很不方便,针对以上问题,本发明将条码识别技术与无线通信技术相结合,设计一款基于单片机为核心的扫描、显示、存储、联网查询于一体的条形码扫描器,该扫描器可以实现对物品的信息进行快速、准确、实时的读取,并且具有体积小、功耗低、成本低等优点。 In the future, the main trend of bar code technology development is to improve printing quality, increase density and develop more advanced hardware; in the near future, bar code recognition system will become the most widely used and most popular recognition system; In this design, the traditional barcode scanner usually adopts a wired method, and the scanner is connected to a computer or a host through a standard keyboard port, serial port or USB interface; this structure makes the scanner costly, bulky, and unusable. Convenience and other features; at present, most domestic barcode scanners use wired methods, which makes on-site operation very inconvenient. In view of the above problems, the present invention combines barcode recognition technology with wireless communication technology to design a scanning system based on a single-chip microcomputer. , display, storage, and network query in one barcode scanner, the scanner can realize fast, accurate, real-time reading of item information, and has the advantages of small size, low power consumption, and low cost.
发明内容 Contents of the invention
本发明的目的在于提供一种基于单片机的条形码联网扫描系统。本发明采用单片机为控制核心,利用条码扫描模块,将扫描到的数据显示在LCD显示器上,同时通过ESP8266 WIFI 模块建立网络联接,从而实现物品的实时联网查询;本发明具有成本低廉、便携等优点;同时体积小、功耗低,具有潜在的应用前景。 The object of the present invention is to provide a barcode networking scanning system based on a single-chip microcomputer. The invention uses a single-chip microcomputer as the control core, uses a barcode scanning module to display the scanned data on the LCD display, and establishes a network connection through the ESP8266 WIFI module at the same time, thereby realizing real-time online query of items; the invention has the advantages of low cost and portability ; At the same time small size, low power consumption, has potential application prospects.
本发明解决其关键问题所采用的技术方案为:如图1所示,一种基于单片机的条形码联网扫描系统,具体包括单片机系统、液晶显示模块、存储模块、条形码扫描模块和稳压电源模块,其特征在于:所述单片机系统由条码扫描查询单片机和联网单片机组成,还设有WIFI串口模块;条码扫描查询单片机分别与液晶显示模块、条形码扫描模块和存储模块连接;联网单片机分别与WIFI串口模块、存储模块连接;稳压电源模块为除稳压电源模块之外的系统组成部分供电。 The technical scheme adopted by the present invention to solve its key problem is: as shown in Figure 1, a kind of bar code network scanning system based on single-chip microcomputer, specifically comprises single-chip microcomputer system, liquid crystal display module, storage module, bar code scanning module and voltage stabilized power supply module, It is characterized in that: the single-chip computer system is composed of a barcode scanning and querying single-chip microcomputer and a networked single-chip microcomputer, and is also provided with a WIFI serial port module; the barcode scanning and querying single-chip computer is respectively connected with a liquid crystal display module, a barcode scanning module and a storage module; the networking single-chip computer is respectively connected with a WIFI serial port module , storage module connection; the regulated power supply module supplies power to the system components except the regulated power supply module.
所述稳压电源模块由5V电源模块和3.3V稳压模块组成,5V电源模块分别与液晶显示模块、条形码扫描模块、条码扫描查询单片机、联网单片机和3.3V稳压模块连接,3.3V稳压模块与WIFI串口模块连接。 The voltage stabilizing power supply module is composed of a 5V power supply module and a 3.3V voltage stabilizing module. The 5V power supply module is connected with a liquid crystal display module, a barcode scanning module, a barcode scanning and querying single-chip microcomputer, a networked single-chip microcomputer and a 3.3V voltage stabilizing module respectively, and the 3.3V voltage stabilizing module The module is connected with the WIFI serial port module.
所述的液晶显示模块为LCD1206液晶屏模块。 The liquid crystal display module is an LCD1206 liquid crystal display module.
所述的条码扫描查询单片机和联网单片机均采用STC89C52单片机。 Both the barcode scanning and querying single-chip microcomputer and the networking single-chip microcomputer adopt STC89C52 single-chip microcomputer.
所述的WIFI串口模块采用ESP8266。 The WIFI serial port module adopts ESP8266.
所述的存储模块采用AT24C02存储芯片。 The storage module adopts AT24C02 storage chip.
所述的条形码扫描模块采用M1206一维条码扫描模组。 The barcode scanning module adopts M1206 one-dimensional barcode scanning module.
所述的条码扫描查询单片机的P1引脚连接液晶显示屏的8位数据口DAT,条码扫描查询单片机的P2.0、P2.1、P2.5引脚分别连接液晶显示屏的RS、RW、EN引脚;条码扫描查询单片机的P2.6、P2.7引脚分别连接存储模块的SDA、SCL引脚;条码扫描查询单片机的P3.0、P3.1分别连接条形码扫描模块。 The P1 pin of the described barcode scanning query single-chip computer is connected to the 8-bit data port DAT of the liquid crystal display, and the P2.0, P2.1, and P2.5 pins of the barcode scanning query single-chip computer are respectively connected to the RS, RW, EN pin; P2.6 and P2.7 pins of the barcode scanning query MCU are respectively connected to the SDA and SCL pins of the storage module; barcode scanning query P3.0 and P3.1 of the MCU are respectively connected to the barcode scanning module.
所述的联网单片机的P2.6、P2.7引脚分别连接存储模块的SDA、SCL引脚,联网单片机的P3.0、P3.1分别连接WIFI串口模块,联网单片机的P1.5、P1.6引脚分别连接指示灯1、指示灯2。 The P2.6 and P2.7 pins of the networked single-chip microcomputer are respectively connected to the SDA and SCL pins of the storage module, the P3.0 and P3.1 of the networked single-chip microcomputer are respectively connected to the WIFI serial port module, and the P1.5 and P1 pins of the networked single-chip microcomputer are connected respectively. .6 pins are connected to indicator light 1 and indicator light 2 respectively.
本发明是一种基于单片机的条形码联网扫描系统,如图1所示,其工作原理为:系统上电后,条码扫描查询单片机和联网单片机分别对液晶显示模块和WIFI串口模块进行初始化,初始化完成以后即可通过无线路由器检测到WIFI信号,指定的联网单片机将条形码信息下载并保存至存储模块;当进行条形码扫描时,条码扫描模块将扫描到的信息通过串口通信发送给其中指定条形码扫描的单片机,该单片机及时的将编码显示在液晶屏上,同时根据条码编号在存储模块中进行查询,将相应的信息显示在液晶屏上;此外,在具有网络信号的环境中,本发明条形码联网扫描系统可以及时更新存储条形码信息。 The present invention is a barcode networking scanning system based on a single-chip microcomputer. As shown in Figure 1, its working principle is: after the system is powered on, the barcode scanning query single-chip microcomputer and the networking single-chip microcomputer respectively initialize the liquid crystal display module and the WIFI serial port module, and the initialization is completed In the future, the WIFI signal can be detected through the wireless router, and the designated networked single-chip computer will download and save the barcode information to the storage module; when scanning the barcode, the barcode scanning module will send the scanned information to the designated single-chip computer for scanning the barcode through serial communication , the single-chip microcomputer displays the code on the LCD screen in time, and at the same time inquires in the storage module according to the bar code number, and displays the corresponding information on the LCD screen; in addition, in an environment with network signals, the bar code networking scanning system of the present invention The stored barcode information can be updated in time.
所述的单片机是指单片微型计算机,至少需用2片;其中1片控制联网,1片控制条形码扫描查询和显示,进一步地,还可采用第3片充当备用服务器。 The single-chip microcomputer refers to a single-chip microcomputer, and at least two chips are needed; one of them controls networking, and the other controls barcode scanning, query and display, and further, the third chip can also be used as a backup server.
与传统条形码扫描系统相比,本发明一种基于单片机的条形码联网扫描系统具有如下优势: Compared with the traditional barcode scanning system, a barcode networking scanning system based on a single-chip microcomputer of the present invention has the following advantages:
本发明将条码识别技术与无线通信技术相结合,是基于单片机为核心的扫描、显示、存储、联网查询于一体的条形码扫描系统;该扫描器系统可实现对物品的信息进行快速、准确、实时读取,且具有体积小、功耗低、成本低等优点。 The present invention combines barcode identification technology with wireless communication technology, and is a barcode scanning system that integrates scanning, display, storage, and network query based on a single-chip computer; the scanner system can realize fast, accurate and real-time information on items. Read, and has the advantages of small size, low power consumption, and low cost.
附图说明 Description of drawings
图1为本发明一种基于单片机的条形码联网扫描系统原理图。 Fig. 1 is a schematic diagram of a barcode networking scanning system based on a single-chip microcomputer of the present invention.
图2系统原理图。 Figure 2 System schematic diagram.
图3存储模块连线图。 Figure 3 is the connection diagram of the storage module.
具体实施方式:Detailed ways:
下面结合附图实施例对本发明做进一步详细描述,但不应以此限制本发明的保护范围。 The present invention will be described in further detail below with reference to the embodiments of the accompanying drawings, but the protection scope of the present invention should not be limited by this.
本发明一种基于单片机的条形码联网扫描系统设计包括如下步骤: A kind of barcode networking scanning system design based on single-chip microcomputer of the present invention comprises the following steps:
1. 单片机系统设计; 1. SCM system design;
2. 液晶显示屏选择; 2. LCD screen selection;
3. 存储模块设计; 3. Storage module design;
4. 电源、条形码扫描仪及联网模块选择。 4. Selection of power supply, barcode scanner and networking module.
实施例1: Embodiment 1 :
1.本发明实例选用两片单片机分别负责管理不同的模块,如下图2所示;联网单片机主要是实现本系统的联网功能;该单片机的P3.0、P3.1分别与WIFI串口连接,P1.5、P1.6分别连接两个LED指示灯1和指示灯2,P2.6、P2.7与IIC存储模块的SDA、SCL端相连;查询单片机主要是用来实现条形码扫描显示和查询功能。该单片机P1端口的8个引脚连接LCD的Data I/O口,P2.0、P2.1、P2.5分别连接LCD的数据/命令选择端(RS)、读写选择端(R/W)、使能信号(EN),P2.6、P2.7与IIC存储模块的SDA、SCL端相连,P3.0、P3.1与条码扫描器的RXD、TXD相连。 1. The example of the present invention selects two single-chip microcomputers to be responsible for managing different modules respectively, as shown in Figure 2 below; the networked single-chip microcomputer mainly realizes the networking function of the system; P3.0 and P3.1 of the single-chip microcomputer are respectively connected with the WIFI serial port, and P1.5 , P1.6 are respectively connected to two LED indicators 1 and 2, and P2.6, P2.7 are connected to the SDA and SCL terminals of the IIC storage module; the query single-chip microcomputer is mainly used to realize barcode scanning display and query functions. The 8 pins of the P1 port of the microcontroller are connected to the Data I/O port of the LCD, and P2.0, P2.1, and P2.5 are respectively connected to the data/command selection port (RS) and the read/write selection port (R/W ), the enable signal (EN), P2.6, P2.7 are connected to the SDA and SCL terminals of the IIC storage module, and P3.0 and P3.1 are connected to the RXD and TXD of the barcode scanner.
本发明实例上电时联网单片机首先运行WIFI串口模块的初始化程序,当指示灯1常亮时表示已经完成对WIFI模块的初始化配置;此时的WIFI模块则可以与设备连接,当设备连接到WIFI模块后方可进行数据传输,指示灯2用于指示数据传输,当有数据传输时,指示灯2将会不停的闪烁,数据传输完成后,指示灯2熄灭;单片机通过WIFI模块把设备传输过来的数据存入系统的IIC存储模块中,以便接下来的查询比对;查询单片机只负责条形码的扫描查询和显示,当条码扫描器进行扫描时,单片机将扫描的条码编号实时的显示在液晶屏上,扫描完成后,单片机自动执行比对程序,通过将扫描的编号与IIC存储模块中的数据进行比对,然后将编号所蕴含的信息显示在液晶屏上。 When the example of the present invention is powered on, the networked single-chip microcomputer first runs the initialization program of the WIFI serial port module. When the indicator light 1 is always on, it means that the initialization configuration of the WIFI module has been completed; at this time, the WIFI module can be connected to the device. When the device is connected to WIFI Data transmission can only be carried out at the rear of the module. The indicator light 2 is used to indicate data transmission. When there is data transmission, the indicator light 2 will flash continuously. After the data transmission is completed, the indicator light 2 will go out; the MCU transmits the device through the WIFI module The data is stored in the IIC storage module of the system for the next query comparison; the query single-chip computer is only responsible for the scanning query and display of the barcode. When the barcode scanner scans, the single-chip computer will display the scanned barcode number on the LCD screen in real time In the above, after the scanning is completed, the single-chip microcomputer automatically executes the comparison program, and compares the scanned number with the data in the IIC storage module, and then displays the information contained in the number on the LCD screen.
2.在本发明实例中,液晶屏主要用于条形码的显示,所需的字符容量小,且整个系统的工作电压在5伏左右,而LCD1206液晶屏的工作电压也是5V,与单片机的工作电压匹配,因此选用LCD1206液晶屏模块可以直接与单片机相连;本发明实例采用编写软件模拟LCD液晶器件的驱动程序为:首先进行液晶显示初始化即,向液晶写入控制命令,使液晶清屏、光标复等一系列初始化操作,然后再写入要显示的数据;由于液晶显示屏进行内部操作时需要一定的时间,如果内部操作没有完成时,对外部输入的指令不予操作,因此每次对液晶操作都需要进行判别忙碌状态;通过读取DAT第7数据口的状态判断液晶是否处于忙状态,若忙,则继续进行判定;当不忙时才可以执行数据/命令的写操作,在实际编程时将各个部分写成模块化的函数里,在软件编写时互相调用即可。 2. In the example of the present invention, liquid crystal screen is mainly used in the display of bar code, and required character capacity is little, and the working voltage of whole system is about 5 volts, and the working voltage of LCD1206 liquid crystal screen is also 5V, matches with the working voltage of single-chip microcomputer, Therefore select LCD1206 liquid crystal screen module to be directly linked to each other with single-chip microcomputer; Example of the present invention adopts the driver program of writing software simulation LCD liquid crystal device to be: at first carry out liquid crystal display initialization namely, write control order to liquid crystal, make liquid crystal clear screen, cursor complex etc. A series of initialization operations, and then write the data to be displayed; because the internal operation of the LCD screen requires a certain amount of time, if the internal operation is not completed, the external input command will not be operated, so each LCD operation requires Determine the busy state; judge whether the LCD is busy by reading the state of the 7th data port of the DAT, and if it is busy, continue to judge; when it is not busy, the write operation of data/command can be performed, and each Some of them are written as modular functions, and they can be called each other when writing software.
3.本发明实例中需要存储由WIFI串口传输过来的数据,因此本发明实例选用Atmel公司的AT24C02芯片进行存储拓展;该芯片是一个2k的串行CMOS E2PROM,该器件通过I2C总线接口进行操作;由于是串行通信,因此可以节约单片机的I/O口;本发明实例选用的单片机是STC89C52单片机,其内部不含有l2C硬件驱动模块,因此可以用普通I/0口引脚通过软件模拟来产生相应的时序与AT24C02芯片的SDA、SCL端进行数据交换,实现正确地数据发送和接收;首先根据系统的硬件接线图定义STC89C52单片机的SCL和SDA信号引脚如图3所示,然后编写驱动程序;驱动程序由一些功能函数组成,它们分别由l2C总线的初始化、起始信号、停止信号、应答信号、数据发送以及数据接收各部分组成;因此只需将各部分独立的写成模块化函数,在应用适当调用这些功能函数,即可方便地实现与AT24C02器件的读取。 3. In the example of the present invention, it is necessary to store the data transmitted by the WIFI serial port, so the example of the present invention selects the AT24C02 chip of Atmel Corporation for storage expansion; the chip is a 2k serial CMOS E2PROM, and the device operates through the I2C bus interface; Serial communication, therefore can save the I/O mouth of single-chip microcomputer; The single-chip microcomputer that the example of the present invention selects is STC89C52 single-chip microcomputer, and its interior does not contain l2C hardware drive module, therefore can produce corresponding by software simulation with common I/0 mouth pin Timing exchanges data with the SDA and SCL ends of the AT24C02 chip to achieve correct data transmission and reception; first define the SCL and SDA signal pins of the STC89C52 microcontroller according to the system hardware wiring diagram as shown in Figure 3, and then write the driver; The program is composed of some functional functions, which are composed of l2C bus initialization, start signal, stop signal, response signal, data transmission and data reception; By calling these functions, the reading with AT24C02 device can be realized conveniently.
4.人们根据不同的用途和需要设计了各种类型的条码扫描器;目前市面上销售的条码扫描器主要有以下几类:光笔阅读器、CCD扫描器、激光扫描器,光笔是最先出现的一种手持接触式条码扫描器,由于光笔条码扫描器具有小巧灵活、价格低廉的特点,因此它也是最为经济的一种条码扫描器,但是,使用光笔也会受到限制:比如在某些不适合接触阅读条码的场合;另外光笔阅读器只能在表面较为平坦的和指定密度及打印质量较好的条码上才能发挥它的作用;而且操作人员需要经过一定的训练才能使用,因为使用过程中的阅读速度、阅读角度、以及使用的压力都会影响它的阅读性能;CCD为电子耦合器件,比较适合近距离和接触阅读,它的价格没有激光扫描器贵,而且内部没有移动部件;与其它扫描器相比,CCD扫描器的价格较便宜,而且不像光笔一样只能接触阅读,较为容易使用;激光扫描器是各种扫描器中价格相对较高的扫描器,激光阅读条码密度范围广,并可以阅读不规则的条码表面。通常在阅读距离超过30cm的情况下,激光阅读器是唯一的选择。 4. People have designed various types of barcode scanners according to different purposes and needs; the barcode scanners currently on the market mainly include the following categories: light pen readers, CCD scanners, laser scanners, light pens are the first to appear A hand-held contact barcode scanner, because the light pen barcode scanner has the characteristics of small size, flexibility and low price, it is also the most economical barcode scanner, but the use of the light pen will also be limited: for example, in some areas that are not suitable for contact In addition, the light pen reader can only play its role on the barcode with a relatively flat surface, specified density and good printing quality; and the operator needs to undergo certain training to use it, because the reading during use Speed, reading angle, and the pressure used will affect its reading performance; CCD is an electronic coupling device, which is more suitable for close-range and contact reading. Its price is not as expensive as laser scanners, and there are no moving parts inside; compared with other scanners Compared with CCD scanners, the price of CCD scanners is cheaper, and unlike light pens, which can only be read by contact, it is easier to use; laser scanners are relatively expensive scanners among various scanners. Laser reading barcodes have a wide range of densities and can Read irregular barcode surfaces. Laser readers are usually the only option when the reading distance exceeds 30cm.
综合国内条形码扫描器市场的价格和扫描性能等因素,在本发明实例中选用的是万酷电子科技有限公司生产的M1206一维条码扫描模组;该条码扫描模组具有积小、重量轻、亮度明亮、扫描速度快、精度高、自动识别自动感应等特点,拥有极佳的质量、可靠性和耐用性,为性价比最高的OEM模块产品之一,在医疗器材、彩票终端、自动售货机以及其他POS设备中都被广泛采用。 Integrating factors such as the price and scanning performance of the domestic barcode scanner market, what was selected in the example of the present invention is the M1206 one-dimensional barcode scanning module produced by Wanku Electronic Technology Co., Ltd.; this barcode scanning module has small size, light weight, Bright brightness, fast scanning speed, high precision, automatic identification and automatic induction, etc., have excellent quality, reliability and durability. It is one of the most cost-effective OEM module products. It is used in medical equipment, lottery terminals, vending machines and It is widely used in other POS devices.
M1206条码扫描模块的工作电压为5V,该扫描模块有一个TTL异步串行通信接口,可以直接与系统选用的STC89C52单片机通信;在实际使用本模块时,扫描的结果不仅仅是条码的数值,还包含了条形码的起始标志符和终止标志符,因此在实际编程时要注意将这两个标志符去除;将有用的条码信息读取的出来,同时并将之显示出来。 The working voltage of the M1206 barcode scanning module is 5V. The scanning module has a TTL asynchronous serial communication interface, which can directly communicate with the STC89C52 microcontroller selected by the system; It contains the start identifier and end identifier of the barcode, so it is necessary to remove these two identifiers during actual programming; read out the useful barcode information and display it at the same time.
5.电脑上使用的WIFI模块是WIFI网卡,是需要运行在操作系统的基础上,对主机的硬件资源要求很高;像一般的工业设备和家庭电器设备是不能直接驱动这样的WIFI网卡的,因此可以选择WIFI串口模块,WIFI串口模块又称为嵌入式WIFI模块,是内嵌TCP/IP协议的WIFI模块,其硬件构成主要是由内嵌的一个单片机和WIFI模块构成,单片机用以实现裸机驱动程序和TCP/IP协议,WIFI模块则完成数据的无线收发;嵌入式WIFI模块对外提供UART串口或者SPI接口,因而可以通过串口或者SPI接口直接和单片机连接,接入INTERNET网络。 5. The WIFI module used on the computer is a WIFI network card, which needs to run on the basis of the operating system, and has high requirements on the hardware resources of the host; general industrial equipment and household electrical equipment cannot directly drive such a WIFI network card, so it can Select the WIFI serial port module. The WIFI serial port module is also called the embedded WIFI module. It is a WIFI module with embedded TCP/IP protocol. Its hardware composition is mainly composed of an embedded single-chip microcomputer and a WIFI module. With the TCP/IP protocol, the WIFI module completes the wireless transmission and reception of data; the embedded WIFI module provides a UART serial port or SPI interface, so it can be directly connected to the single-chip computer through the serial port or SPI interface to access the INTERNET network.
本发明实例选用乐鑫信息科技有限公司生产的ESP8266 WIFI串口无线模块,ESP8266是一款超低功耗的UART-WiFi 透传模块ESP8266硬件接口丰富,可支持UART,IIC,PWM,GPIO,ADC等,适用于各种物联网应用场合,可将用户的物理设备连接到无线网络上,进行互联网或局域网通信,实现联网功能,被广泛应用于智能电网、智能交通、智能家具、手持设备、工业控制等领域。 The example of this invention uses the ESP8266 WIFI serial port wireless module produced by Espressif Information Technology Co., Ltd. ESP8266 is an ultra-low power consumption UART-WiFi transparent transmission module ESP8266 has rich hardware interfaces and can support UART, IIC, PWM, GPIO, ADC, etc. , suitable for various Internet of Things applications, can connect the user's physical equipment to the wireless network, perform Internet or LAN communication, and realize networking functions, and are widely used in smart grids, smart transportation, smart furniture, handheld devices, and industrial control and other fields.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510341483.6A CN104933456A (en) | 2015-06-19 | 2015-06-19 | Singlechip based bar code networking scanning system and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510341483.6A CN104933456A (en) | 2015-06-19 | 2015-06-19 | Singlechip based bar code networking scanning system and method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN104933456A true CN104933456A (en) | 2015-09-23 |
Family
ID=54120616
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510341483.6A Pending CN104933456A (en) | 2015-06-19 | 2015-06-19 | Singlechip based bar code networking scanning system and method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104933456A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107577974A (en) * | 2017-09-04 | 2018-01-12 | 苏州长城开发科技有限公司 | A kind of AOI bar code scanning systems |
| US11694046B2 (en) | 2019-07-24 | 2023-07-04 | Datalogic Usa Inc. | Microcontroller-based code reader and related method and device |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000048114A (en) * | 1998-07-31 | 2000-02-18 | Pentel Kk | Wireless bar code reader device |
| CN102324015A (en) * | 2011-08-05 | 2012-01-18 | 泰州市锋硕电子科技有限公司 | Bar code scan reader wireless data sending system and method thereof |
| CN103870860A (en) * | 2014-03-13 | 2014-06-18 | 北京农业信息技术研究中心 | Fruit tree query management system |
-
2015
- 2015-06-19 CN CN201510341483.6A patent/CN104933456A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000048114A (en) * | 1998-07-31 | 2000-02-18 | Pentel Kk | Wireless bar code reader device |
| CN102324015A (en) * | 2011-08-05 | 2012-01-18 | 泰州市锋硕电子科技有限公司 | Bar code scan reader wireless data sending system and method thereof |
| CN103870860A (en) * | 2014-03-13 | 2014-06-18 | 北京农业信息技术研究中心 | Fruit tree query management system |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107577974A (en) * | 2017-09-04 | 2018-01-12 | 苏州长城开发科技有限公司 | A kind of AOI bar code scanning systems |
| CN107577974B (en) * | 2017-09-04 | 2024-02-13 | 苏州长城开发科技有限公司 | AOI bar code scanning system |
| US11694046B2 (en) | 2019-07-24 | 2023-07-04 | Datalogic Usa Inc. | Microcontroller-based code reader and related method and device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9679233B2 (en) | System for data card emulation | |
| CN101789097A (en) | Intelligent household management system based on RFID technology and application method thereof | |
| CN106529885A (en) | Warehouse material full life cycle management method and system based on RFID (Radio Frequency Identification) scanning vehicle | |
| CN101354740A (en) | Mobile RFID read-write terminal | |
| CN204576663U (en) | A kind of automatic vending machine with two dimensional code display device | |
| CN102799978A (en) | Warehouse management system and management method | |
| CN202694367U (en) | Mobile barcode reader | |
| CN103164759A (en) | Intelligent medicine box management system based on radio frequency identification device (RFID) | |
| CN113034067A (en) | Warehouse management method, computer device and readable storage medium | |
| CN201042058Y (en) | Portable intelligent terminal | |
| CN202257670U (en) | Internet of things goods management system based on bar code labels | |
| CN104933456A (en) | Singlechip based bar code networking scanning system and method | |
| CN102609746B (en) | Intelligent archive and book management system | |
| CN102117341A (en) | Data collector in logistics industry | |
| CN101383016A (en) | Logistic article electronic label reading and writing method through mobile RFID read-write device | |
| CN102508518A (en) | Tablet personal computer with multiple radio frequency modules | |
| CN205540828U (en) | Portable storage management terminal based on thing networking | |
| CN201255884Y (en) | Mobile type RFID read-write terminal | |
| CN204731793U (en) | The automatic binding system of a kind of bar code RFID | |
| CN205263785U (en) | Wireless print system of bluetooth intelligence | |
| CN202976108U (en) | Handheld scanner | |
| CN203178858U (en) | Intelligent hand-held terminal | |
| CN102542311A (en) | Article labeling device, use method and logistics system thereof | |
| CN202854870U (en) | RFID based feeder management system | |
| CN206505504U (en) | A kind of quick flat board cashier's machine of integrated-type |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150923 |
|
| RJ01 | Rejection of invention patent application after publication |