摘要
基于对PS/2接口协议和条码扫描器输出数据格式的认识,从触发方式和接收方式两个方面详细分析了单片机读取条码数据的原理与实现方法,同时给出了扫描码与ASCII码的转换程序设计。在应用中,给出了条码扫描器与MCU的接口电路及通行方案,并介绍了单片机对条码数据识别系统一种典型应用方法。
This article analyzes the principle of reading data for a single chip and provides a design program of scanning as well as ASCII transfer program for readers, based on PS/2 interface negotiation and data format of bar-code scanner, from triggering mode and receiving mode. In the process of application, the article as well provides answers for solution of bar-code scanner and MCU interface, and introduces a typical method of date recognition of simple chip.