JPH0535473B2 - - Google Patents

Info

Publication number
JPH0535473B2
JPH0535473B2 JP60083919A JP8391985A JPH0535473B2 JP H0535473 B2 JPH0535473 B2 JP H0535473B2 JP 60083919 A JP60083919 A JP 60083919A JP 8391985 A JP8391985 A JP 8391985A JP H0535473 B2 JPH0535473 B2 JP H0535473B2
Authority
JP
Japan
Prior art keywords
processing
pulse
register
data
section
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 - Lifetime
Application number
JP60083919A
Other languages
Japanese (ja)
Other versions
JPS61241883A (en
Inventor
Hiroshi Katsuta
Mineo Akashi
Yukio Maehashi
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.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP60083919A priority Critical patent/JPS61241883A/en
Publication of JPS61241883A publication Critical patent/JPS61241883A/en
Publication of JPH0535473B2 publication Critical patent/JPH0535473B2/ja
Granted legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/12Improving ICE efficiencies

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はバーコードシンボルをバーコードスキ
ヤナで読取りそのシリアルデータを解読するバー
コード読取装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a barcode reading device that reads a barcode symbol with a barcode scanner and decodes its serial data.

〔従来の技術〕 近年、データ入力の単純化、高速化のためにバ
ーコードシンボルの読取装置を持つたデータ処理
装置が登場している。
[Prior Art] In recent years, data processing devices equipped with bar code symbol reading devices have appeared in order to simplify and speed up data input.

従来、この種のバーコード読取装置には、速
度、柔軟性及びコストの面からデータ処理装置の
割り込み機能を利用したデコーダが用いられ、良
好なデコーダを実現するために、特にソフトウエ
アが厳密に設計されたものとなつていた。
Traditionally, this type of barcode reading device uses a decoder that utilizes the interrupt function of a data processing device for speed, flexibility, and cost.In order to achieve a good decoder, the software must be carefully designed. It had become something that was designed.

このバーコードデコードとその処理内容につい
て説明する。
This barcode decoding and its processing contents will be explained.

2値レベルバーコードシンボルでは、バーコー
ドスキヤナがシリアルに出力するパルスの、時間
幅(以下エレメント幅という)によつて論理値を
判別し、その論理値によつてキヤラクタビツトイ
メージを構成する。ここで論理“1”に対応する
エレメント幅を有するパルスをワイドエレメン
ト、論理“0”に対応するエレメント幅を有する
パルスをナローエレメントと呼ぶ。論理値は、ス
レシヨルド設定を行い、その値に対してエレメン
ト幅が大きければ“1”、小さければ“0”とす
る。簡単なスレシヨルド設定法としては、ワイド
エレメント幅Wとナローエレメント幅Nの中間を
スレシヨルドTHとすることである。つまり、
TH=(W+N)÷2の計算を行えばよい。ここ
で、Wに最新のワイドエレメント幅、Nに最新の
ナローエレメント幅を与えて、パルスの入力毎に
スレシヨルドTHを修正すれば、バーコードをス
キヤンする際にオペレータによつて引き起こされ
る加速度に対する補償が行えることになる。
In binary level barcode symbols, the logical value is determined based on the time width (hereinafter referred to as element width) of the pulses serially output by the barcode scanner, and a character bit image is constructed based on the logical value. . Here, a pulse having an element width corresponding to a logic "1" is called a wide element, and a pulse having an element width corresponding to a logic "0" is called a narrow element. A threshold is set for the logical value, and if the element width is larger than that value, it is set to "1", and if it is smaller, it is set to "0". A simple method for setting the threshold is to set the threshold TH to the middle between the wide element width W and the narrow element width N. In other words,
All you have to do is calculate TH=(W+N)÷2. Here, if we give W the latest wide element width and N the latest narrow element width, and modify the threshold TH for each pulse input, we can compensate for the acceleration caused by the operator when scanning the barcode. can be done.

バーコードスキヤナによりバーコードシンボル
のスキヤンを行うと、シリアルにワイド/ナロー
エレメントが繰り返し受付られ論理値に変換して
記憶する。所定エレメント数受付けると1キヤラ
クタ分のビツトイメージデータが完成したことに
なり、以降、ビツトイメージをコード変換した
り、スタートキヤラクタ、ストツプキヤラクタの
検出処理を行う。
When a barcode symbol is scanned by a barcode scanner, wide/narrow elements are repeatedly received serially, converted into logical values, and stored. When a predetermined number of elements are received, the bit image data for one character is completed, and thereafter the bit image is code converted and start character and stop character detection processing is performed.

以上の様な処理は、十分高速で処理される必要
があり、バーコードスキヤンによるデータ入力の
最大値(エレメント幅が最小時の最大速度でのス
キヤン)に対して問題を生じないようにしなけれ
ばならない。さらに、バーコードモジユールの高
密度化あるいはスキヤンの高速化に伴い、エレメ
ントパルスの時間間隔が短くなることに対処する
ためには、前述の処理をより高速に、短時間で実
現する手段が望まれている。
The above-mentioned processing needs to be processed at a sufficiently high speed so as not to cause problems with the maximum value of data input by barcode scanning (scanning at the maximum speed when the element width is the minimum). It won't happen. Furthermore, in order to deal with the fact that the time interval between element pulses is becoming shorter due to the higher density of barcode modules or faster scan speeds, it is desirable to have a means to achieve the above-mentioned processing faster and in a shorter time. It is rare.

第2図は従来のバーコード解読のインターフエ
ースを内蔵したデータ処理装置のブロツク構成図
を示している。このデータ処理装置は実行部1
0、プログラムメモリ20、データメモリ30、
バーコードスキヤナからの信号1のパルスの立上
りと立下りのエツジを検出し、これに同期したエ
ツジ検出信号2を出力するエツジ検出部40、ス
キヤナ信号の時間間隔を計測、判定するタイマ・
イベントカウンタ50及び割り込み制御部60か
ら構成され、内部データバス70を介してそれぞ
れが相互に接続されている。
FIG. 2 shows a block diagram of a data processing device incorporating a conventional bar code decoding interface. This data processing device is an execution unit 1
0, program memory 20, data memory 30,
An edge detection unit 40 that detects the rising and falling edges of the pulse of signal 1 from the barcode scanner and outputs an edge detection signal 2 synchronized with this; a timer that measures and determines the time interval of the scanner signal;
It consists of an event counter 50 and an interrupt control section 60, each of which is interconnected via an internal data bus 70.

実行部10は、プログラムカウンタ11、プロ
グラムステータスワード12、汎用レジスタセツ
ト13を有し、プログラムメモリ20から命令コ
ードを読み出して実行し、その処理データをデー
タメモリ30に格納する。データメモリ30上に
は、最新のワイドカウント数格納エリア31、最
新のナローカウント数格納エリア32、当該バー
コードシンボルのキヤラクタ当りエレメント数を
設定し、バーコードスキヤナ信号1のパルスの立
上りと立下がりのエツジ検出信号2の発生毎にカ
ウントダウンしてその値を保持するエレメントカ
ウント数格納エリア33、1エレメントデータの
受付毎にワイド/ナローエレメントに対応する論
理値をLSBから右詰めで格納しておくビツトイ
メージ格納エリア34、ビツトイメージデータを
1キヤラクタ完成毎に格納しておくキヤラクタデ
ータ格納エリア35、スタツクエリア36が割付
けられている。割り込み制御部60は、エツジ検
出部40から出力されるエツジ検出信号2を受付
けると、実行部10へ割り込みを通知する。タイ
マ・イベントカウンタ50は、タイマのインター
バルを設定するインターバルレジスタ51、エツ
ジ検出信号2の受付毎に初期化されカウンタアツ
プを開始するカウントレジスタ55、このカウン
トレジスタ55の値がインターバルレジスタ51
の値を越えたことを検知してインターバル制御信
号3を発生する比較器52、インターバル制御信
号3によつてセツトされるインターバル信号フラ
グ54及びエツジ検出信号2の受付毎にカウント
レジスタ55の内容を格納するキヤプチヤレジス
タ56から構成されている。
The execution section 10 has a program counter 11, a program status word 12, and a general-purpose register set 13, reads out instruction codes from the program memory 20, executes them, and stores the processed data in the data memory 30. On the data memory 30, the latest wide count number storage area 31, the latest narrow count number storage area 32, and the number of elements per character of the barcode symbol are set, and the rising edge and rising edge of the pulse of the barcode scanner signal 1 are set. An element count storage area 33 that counts down and holds the value every time a falling edge detection signal 2 is generated, and stores logical values corresponding to wide/narrow elements from LSB to the right every time one element data is received. A bit image storage area 34 for storing data, a character data storage area 35 for storing bit image data each time one character is completed, and a stack area 36 are allocated. When the interrupt control unit 60 receives the edge detection signal 2 output from the edge detection unit 40, it notifies the execution unit 10 of the interrupt. The timer/event counter 50 includes an interval register 51 that sets the timer interval, a count register 55 that is initialized every time the edge detection signal 2 is received and starts counting up the counter, and a value of this count register 55 that is stored in the interval register 51.
The comparator 52 generates the interval control signal 3 by detecting that the edge detection signal 2 has been exceeded, the interval signal flag 54 is set by the interval control signal 3, and the contents of the count register 55 are read every time the edge detection signal 2 is received. It consists of a capture register 56 for storing data.

次に、エツジ検出信号2によつて発生する割込
み処理の処理手順を説明する。
Next, a processing procedure for interrupt processing generated by edge detection signal 2 will be explained.

エツジ検出信号2が出力されると、タイマ・イ
ベントカウンタ50のカウントレジスタ55のカ
ウント値がキヤプチヤレジスタ56に格納され、
カウントレジスタ55は初期化されて再びカウン
トを開始する。また、データ処理装置は割り込み
処理を開始し、それまでのプログラム実行内容を
保持しておくために、プログラムカウンタ11、
プログラムステータスワード12、汎用レジスタ
セツト13の内容を一時的にデータメモリ30上
のスタツクエリア36に退避する。インターバル
信号フラグ54は、前回のエツジ検出割り込み時
にスタートしたカウントレジスタ55の値が、イ
ンターバルレジスタ51に設定したスレシヨルド
値を越えた場合にセツトされるのでインターバル
信号フラグ54がセツトされている場合は、今回
のエツジ検出割り込みが発生するまでに起きたパ
ルスが論理“1”であつたことを意味する。同様
に、インターバル信号フラグ54がセツトされて
いない場合は、パルスは論理“0”であつたこと
を意味する。
When the edge detection signal 2 is output, the count value of the count register 55 of the timer/event counter 50 is stored in the capture register 56,
The count register 55 is initialized and starts counting again. In addition, the data processing device starts interrupt processing and uses a program counter 11,
The contents of the program status word 12 and general-purpose register set 13 are temporarily saved to the stack area 36 on the data memory 30. The interval signal flag 54 is set when the value of the count register 55 that started at the time of the previous edge detection interrupt exceeds the threshold value set in the interval register 51. Therefore, if the interval signal flag 54 is set, This means that the pulses that occurred before the current edge detection interrupt occurred were logic "1". Similarly, if interval signal flag 54 is not set, it means that the pulse was a logic "0".

このインターバル信号フラグ54をチエツクし
てこれがセツトされている場合はキヤプチヤレジ
スタ56の内容を最新のワイドエレメント幅とし
て、最新のワイドカウント数格納エリア31の内
容を更新し、さらにプログラムステータスワード
12のキヤリーフラグをセツトする。また、イン
ターバル信号フラグ54がセツトされていない場
合はキヤプチヤレジスタ56の内容を最新のナロ
ーエレメント幅として、最新のナローカウント数
格納エリア32の内容を更新し、さらにプログラ
ムステータスワード12のキヤリーフラグをリセ
ツトする。続いて最新のワイドカウント数格納エ
リア31の内容と最新のナローカウント数格納エ
リア32の内容とを加算して2で除算した結果を
スレシヨルド修正値としてインターバルレジスタ
51に設定する。
If this interval signal flag 54 is checked and it is set, the content of the capture register 56 is set as the latest wide element width, the content of the latest wide count storage area 31 is updated, and the program status word 12 is updated. Set the carry flag. If the interval signal flag 54 is not set, the content of the capture register 56 is set as the latest narrow element width, the content of the latest narrow count storage area 32 is updated, and the carry flag of the program status word 12 is updated. Reset. Subsequently, the contents of the latest wide count storage area 31 and the latest narrow count storage area 32 are added and divided by 2, and the result is set in the interval register 51 as a threshold correction value.

次に、ビツトイメージ格納エリア34の内容を
算術論理演算ユニツト(以下、ALUという)に
読み出してキヤリーフラグと伴に右ローテーシヨ
ンし、再び前記イメージ格納エリア34に戻す。
この処理により1エレメントデータの受付毎にデ
コードビツトのLSBから右詰めでビツトイメー
ジが格納されていくことになる。
Next, the contents of the bit image storage area 34 are read out to an arithmetic and logic unit (hereinafter referred to as ALU), rotated to the right together with a carry flag, and returned to the image storage area 34 again.
Through this process, a bit image is stored right-aligned from the LSB of the decoded bits every time one element data is received.

次に、エレメントカウント数格納エリア33の
内容を読み出し、1減算した後、その結果が0で
あるか否かをチエツクする。その結果が0でない
場合は1キヤラクタ分のビツトイメージが未完成
であることを意味し、1減算、すなわちカウント
ダウンした結果を再びエレメントカウント数格納
エリア33に格納する。その後、スタツクエリア
36に退避しておいた内容をそれぞれプログラム
カウンタ11、プログラムステータスワード1
2、汎用レジスタセツト13に戻して割り込み処
理からメインルーチンに復帰する。
Next, the contents of the element count storage area 33 are read out, 1 is subtracted, and then it is checked whether the result is 0 or not. If the result is not 0, it means that the bit image for one character is incomplete, and the result of subtracting by 1, that is, counting down, is stored in the element count number storage area 33 again. Thereafter, the contents saved in the stack area 36 are stored in the program counter 11 and program status word 1, respectively.
2. Return to general register set 13 and return to main routine from interrupt processing.

また、エレメントカウント数格納エリア33の
内容を1減算した結果が0である場合、1キヤラ
クタ分のビツトイメージが完成したことを意味
し、1キヤラクタデータ受付処理を開始し、ビツ
トイメージ格納エリア34の内容を読出し、完成
したキヤラクタデータとしてキヤラクタデータ格
納エリア35に格納する。そしてエレメントカウ
ント数格納エリア33に、当該バーコードシンボ
ルのキヤラクタ当りエレメント数(例えば、3of9
コードであれば9)を初期値として格納する。
Furthermore, if the result of subtracting 1 from the contents of the element count number storage area 33 is 0, it means that the bit image for one character has been completed, and the one character data reception process is started and the bit image storage area 34 is The contents are read out and stored in the character data storage area 35 as completed character data. Then, the number of elements per character of the barcode symbol (for example, 3of9) is stored in the element count storage area 33.
If it is a code, 9) is stored as the initial value.

ここで完成されたキヤラクタデータを当該バー
コードのエンコード様式に従つてASCIIコードに
変換したり、マージン又はスタートキヤラクタ及
びストツプキヤラクタの検出等の処理が通常行わ
れるが、その詳細な説明は省略する。その後、ス
タツクエリア36に退避しておいた内容をそれぞ
れプログラムカウンタ11、プログラムステータ
スワード12、汎用レジスタセツト13に戻して
割り込み処理からメインプログラム処理へ復帰す
る。
Processing such as converting the completed character data into ASCII code according to the encoding format of the barcode, and detecting margins, start characters, and stop characters is normally performed, but here is a detailed explanation. is omitted. Thereafter, the contents saved in the stack area 36 are returned to the program counter 11, program status word 12, and general-purpose register set 13, respectively, and the interrupt processing returns to the main program processing.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

ここで高密度なバーコードの高速スキヤンで
は、エレメントパルス時間間隔が数百マイクロ秒
であり、これより十分高速なバーコードデコード
処理を行うことが必要であるが、従来の割り込み
によるソフトウエア処理ではデータ処理装置の処
理能力によつて、スキヤン速度に制限をきたす可
能性がある。また、より高分解能なバーコードデ
コーダの実現のためにはトータルな処理の高速化
が望まれる。しかし、従来のデータ処理装置によ
る割り込みソフトウエア処理においては割り込み
処理開始時の実行部のステータス及びデータのス
タツクエリアへの退避あるいはスタツクエリアか
らの復帰、処理実行時の命令フエツチ及び命令の
デコード、メモリアクセス時のメモリポインタへ
のアドレス設定、メモリ上のデータを一時的に汎
用レジスタにロードしてのデータ転送及び演算、
判断処理等の、ソフトウエア処理実行に常に伴う
オーバヘツドが存在し、スキヤン速度に制限を与
える要因として避けられないものの一つとなつて
いる。
In high-speed scanning of high-density barcodes, the element pulse time interval is several hundred microseconds, and it is necessary to perform barcode decoding processing that is sufficiently faster than this, but conventional software processing using interrupts is not possible. The scanning speed may be limited by the processing power of the data processing device. Furthermore, in order to realize a barcode decoder with higher resolution, it is desired that the total processing speed be increased. However, in interrupt software processing by a conventional data processing device, the execution unit status and data are saved to or returned from the stack area at the start of interrupt processing, instruction fetch and instruction decoding during processing execution, and instruction decoding during memory access. Setting the address to the memory pointer of the memory, temporarily loading the data in the memory into the general-purpose register, data transfer and calculation,
Overhead always accompanies the execution of software processing, such as judgment processing, and is one of the factors that inevitably limits the scanning speed.

本発明の目的は、以上の様なバーコードデコー
ダにおける割り込みによるソフトウエア処理に伴
う欠点を除去し、スレシヨルドの自動的更新、シ
リアルデータの生成等を行うランダムロジツク回
路による専用ハードウエアを付加することなく、
データ処理装置のハードウエアを有効に利用し
て、バーコードスキヤナが出力するパルス情報か
らのシリアルデータ読み取り処理を実現したバー
コード読取装置を提供する事にある。
The purpose of the present invention is to eliminate the above-mentioned drawbacks associated with interrupt-based software processing in barcode decoders, and to add dedicated hardware using a random logic circuit that automatically updates thresholds, generates serial data, etc. without any
An object of the present invention is to provide a barcode reading device that realizes serial data reading processing from pulse information output from a barcode scanner by effectively utilizing the hardware of a data processing device.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のバーコード読取装置は、入力されるバ
ーコードパルスを検知しこのバーコードパルスの
デコード処理要求を発生するパルス検出部と、こ
のパルス検出部のパルス検知に同期して計数動作
を開始しそのパルス周期を計測するパルス周期計
測部と、プログラム及び各種データを記憶するメ
モリ部と、前記パルス検出部の処理要求によるデ
コード処理と前記プログラムによる通常命令処理
とを選択的に実行する中央処理部とを備えたバー
コード読取装置において、前記中央処理部のデコ
ード処理は、前記パルス検出部が前記処理要求を
発生した時、前記命令処理の実行に関わる前記中
央処理部の内部のプログラムカウンタ、プログラ
ムステータスワードの状態を保持したまま起動さ
れて、前記メモリ部に設けられソフトウエアによ
り任意に書込み可能な自動転送制御レジスタ群の
データを用いて前記パルス周期計測部からのパル
ス周期情報を文字ビツト情報に変換するように処
理するものであることを特徴とする。
The barcode reading device of the present invention includes a pulse detection section that detects an input barcode pulse and generates a request for decoding the barcode pulse, and a counting operation that starts counting in synchronization with the pulse detection of this pulse detection section. A pulse period measurement section that measures the pulse period, a memory section that stores programs and various data, and a central processing section that selectively executes decoding processing based on processing requests from the pulse detection section and normal instruction processing based on the program. In the barcode reading device, the decoding process of the central processing unit is performed when the pulse detection unit generates the processing request, the program counter and the program inside the central processing unit related to the execution of the command processing are executed. It is activated while holding the state of the status word, and converts the pulse period information from the pulse period measuring section into character bit information using data in a group of automatic transfer control registers provided in the memory section and which can be arbitrarily written by software. It is characterized in that it is processed so as to convert it into .

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明す
る。
Next, the present invention will be explained with reference to the drawings.

第1図は本発明の一実施例のブロツク図であ
る。実行部は、I/O要求制御部80からのI/
O処理実行要求線6及びI/O処理実行形態指定
線7の信号を受けて実行部の動作を制御するI/
O要求受付部81と、メインプログラム、割り込
み処理プログラム等のプログラムを格納するプロ
グラムメモリ20、処理データを保持するデータ
メモリ30、次に実行するプログラムの番地を示
すプログラムカウンタ11、実行部全体の動作状
態を示すプログラムステータスワード12、各種
データの格納及びメモリのアドレス指定等に用い
られる汎用レジスタセツト13、算術論理演算機
能を備えた算術論理演算ユニツト(ALU)14、
実行すべき命令を保持しておく命令レジスタ1
5、この命令レジスタ15の内容により各種制御
信号を発生する命令デコーダ16、この命令デコ
ーダ16の出力により実行部全体の動作を制御す
る実行制御部17とから構成される。タイマイベ
ントカウンタ50はタイマのインターバルを設定
するインターバルレジスタ51と、エツジ検出信
号2の受付毎に初期化され、カウントアツプを開
始するカウントレジスタ55と、このカウントレ
ジスタ55の値がインターバルレジスタ51の値
を越えたことを検知してインターバル制御信号3
を発生する比較器52と、インターバル制御信号
3によつてセツトされるインターバル信号フラグ
54と、エツジ検出信号2の受付毎にカウントレ
ジスタ55の内容を格納するキヤプチヤレジスタ
56とから構成される。また、データメモリ30
には、最新のワイドカウントレジスタ91、最新
のナローカウントレジスタ92、エツジ検出信号
2の発生毎に1エレメントデータ受付回数として
カウントするエレメントカウンタ93、インター
バルレジスタ51を指定するインターバルレジス
タポインタ94、前記インターバル信号フラグ5
4を指定するフラグポインタ95、前記キヤプチ
ヤレジスタ56を指定するキヤプチヤレジスタポ
インタ96、1エレメントデータの受付毎に、ワ
イド/ナローエレメントに対応する論理値を
LSBから右詰めで格納しておくビツトイメージ
レジスタ97から成りソフトウエアにより任意に
読み書き可能な自動データ転送処理用の自動転送
レジスタ群90が設定され、さらにキヤラクタデ
ータ格納エリア35及びスタツクエリア36が割
り付けられている。
FIG. 1 is a block diagram of one embodiment of the present invention. The execution unit receives I/O from the I/O request control unit 80.
An I/O controller that receives signals from the O processing execution request line 6 and the I/O processing execution mode specification line 7 to control the operation of the execution section.
O request receiving section 81, program memory 20 that stores programs such as the main program and interrupt processing program, data memory 30 that holds processing data, program counter 11 that indicates the address of the next program to be executed, and the overall operation of the execution section. A program status word 12 indicating the status, a general-purpose register set 13 used for storing various data and specifying memory addresses, etc., an arithmetic logic unit (ALU) 14 with arithmetic and logic operation functions,
Instruction register 1 that holds instructions to be executed
5. It is composed of an instruction decoder 16 that generates various control signals according to the contents of the instruction register 15, and an execution control section 17 that controls the operation of the entire execution section based on the output of this instruction decoder 16. The timer event counter 50 includes an interval register 51 that sets the timer interval, a count register 55 that is initialized every time the edge detection signal 2 is received, and starts counting up, and the value of this count register 55 is the value of the interval register 51. It is detected that the interval has exceeded the interval control signal 3.
, an interval signal flag 54 that is set by the interval control signal 3, and a capture register 56 that stores the contents of the count register 55 each time the edge detection signal 2 is received. . In addition, the data memory 30
includes the latest wide count register 91, the latest narrow count register 92, an element counter 93 that counts each generation of edge detection signal 2 as the number of times one element data is received, an interval register pointer 94 that specifies the interval register 51, and the interval register 92. signal flag 5
4, a capture register pointer 96 that specifies the capture register 56, and a logical value corresponding to the wide/narrow element each time one element data is received.
An automatic transfer register group 90 is set for automatic data transfer processing, which consists of a bit image register 97 that is stored from LSB to the right and can be read and written arbitrarily by software, and furthermore, a character data storage area 35 and a stack area 36 are allocated. It is being

エツジ検出部40は、バーコードスキヤナ信号
1の立上りと立下りのエツジを検出し、これに同
期したエツジ検出信号2をI/O要求制御部80
とタイマ・イベントカウンタ50へ出力する。
I/O要求制御部80は、エツジ検出信号2を
I/O要求として受付け、I/O処理実行要求線
6及びI/O処理実行形態指定線7を制御する。
The edge detection section 40 detects the rising and falling edges of the barcode scanner signal 1, and sends an edge detection signal 2 synchronized thereto to the I/O request control section 80.
is output to the timer/event counter 50.
The I/O request control unit 80 receives the edge detection signal 2 as an I/O request, and controls the I/O process execution request line 6 and the I/O process execution mode designation line 7.

エツジ検出部40がエツジ検出信号2をタイ
マ・イベントカウンタ50へ出力すると、カウン
トレジスタ55のカウント値がキヤプチヤレジス
タ56に格納され、カウントレジスタ55は初期
化されて再びカウントを開始する。インターバル
信号フラグ54は、カウントレジスタ55のカウ
ント数が、インターバルレジスタ51に設定した
スレシヨルド値を越えた場合にインターバル制御
信号3によつてセツトされる。また、同時にエツ
ジ検出信号2がI/O要求制御部80に入力され
ると、このI/O要求制御部80は、内部データ
バス70に自動転送レジスタ群90のアドレスを
出力する。また、I/O処理実行要求線6とI/
O処理実行形態指定線7の信号をハイレベルにす
る。
When the edge detection section 40 outputs the edge detection signal 2 to the timer/event counter 50, the count value of the count register 55 is stored in the capture register 56, and the count register 55 is initialized and starts counting again. The interval signal flag 54 is set by the interval control signal 3 when the count of the count register 55 exceeds a threshold value set in the interval register 51. Furthermore, when the edge detection signal 2 is simultaneously input to the I/O request control section 80, the I/O request control section 80 outputs the address of the automatic transfer register group 90 to the internal data bus 70. In addition, the I/O processing execution request line 6 and the I/O
The signal on the O-processing execution mode designation line 7 is set to high level.

図において、実行部は通常プログラムカウンタ
11の内容に対応するプログラムメモリ20に記
憶されている命令を命令レジスタ15へ転送し、
命令デコーダ16及び実行制御部17が各種制御
を行い、データ転送や演算等の命令処理を実現し
ている。一命令実行する毎に次に実行する命令の
番地に前記プログラムカウンタ11の値を更新
し、上記動作を繰り返してプログラムの実行が行
われる。I/O要求受付部81は命令の完了毎に
I/O処理実行要求信号6をサンプリングし、ロ
ウレベルの時はそのプログラム実行を継続する。
In the figure, the execution unit normally transfers the instructions stored in the program memory 20 corresponding to the contents of the program counter 11 to the instruction register 15,
An instruction decoder 16 and an execution control unit 17 perform various controls and realize instruction processing such as data transfer and calculation. Each time one instruction is executed, the value of the program counter 11 is updated to the address of the next instruction to be executed, and the above operation is repeated to execute the program. The I/O request reception unit 81 samples the I/O processing execution request signal 6 every time an instruction is completed, and when the signal is at a low level, continues execution of the program.

次に、I/O要求が発生した時の動作を説明す
る。I/O要求受付部81はI/O処理実行要求
信号6がハイレベルである事を研修すると同時に
I/O処理実行形態指定信号7をサンプリング
し、ハイレベルであると、I/O要求受付部81
が1エレメントデータ受付処理要求であると判断
し、命令レジスタ15に強制的に1エレメントデ
ータ受付処理コードを設定する。実行制御部17
はプログラムカウンタ11のアドレス更新を禁止
し、続いてプログラムカウンタ11、プログラム
ステータスワード12、汎用レジスタセツト13
の値を保持したまま以下の処理を開始する。
Next, the operation when an I/O request occurs will be explained. The I/O request receiving unit 81 samples the I/O processing execution mode designation signal 7 at the same time as training that the I/O processing execution request signal 6 is at a high level, and if it is at a high level, it accepts the I/O request. Part 81
is determined to be a 1-element data reception processing request, and a 1-element data reception processing code is forcibly set in the instruction register 15. Execution control unit 17
prohibits address updating of program counter 11, and then updates program counter 11, program status word 12, and general register set 13.
Start the following process while retaining the value of .

(1) I/O要求制御部80が内部データバス70
上に出力した自動転送レジスタ群90のアドレ
スを、実行制御部17が読み込む。
(1) The I/O request control unit 80 is connected to the internal data bus 70
The execution control unit 17 reads the address of the automatic transfer register group 90 output above.

(2) 実行制御部17がフラグポインタ95で指定
するインターバル信号フラグ54を読み取り、
論理値をチエツクする。
(2) The execution control unit 17 reads the interval signal flag 54 specified by the flag pointer 95,
Check logical value.

(3) インターバル信号フラグ54がセツトしてい
れば、論理“1”として、キヤプチヤレジスト
ポインタ96が指定するキヤプチヤレジスタ5
6の内容を最新のワイドカウンタレジスタ91
に転送し、さらにビツトイメージレジスタ97
の内容をALU14に読み出してMSBに“1”
を入力し右シフトした結果を再び前記ビツトイ
メージレジスタ97に戻す。一方、インターバ
ル信号フラグ54がリセツトしていれば、論理
“0”として、キヤプチヤレジスタポインタ9
6が指定するキヤプチヤレジスタ56の内容を
最新のナローカウントレジスタ92に転送し、
さらにビツトイメージレジスタ97の内容を読
み出し、MSBに“0”を入力し右シフトした
結果を再び前記ビツトイメージレジスタ97に
戻す。
(3) If the interval signal flag 54 is set, it is set to logic "1" and the capture register 5 specified by the capture register pointer 96 is set.
6 contents to the latest wide counter register 91
and further bit image register 97
Read the contents to ALU14 and set “1” to MSB
is input and the right-shifted result is returned to the bit image register 97 again. On the other hand, if the interval signal flag 54 has been reset, it is set to logic "0" and the capture register pointer 9
Transfers the contents of the capture register 56 specified by 6 to the latest narrow count register 92,
Furthermore, the contents of the bit image register 97 are read out, "0" is input to the MSB, and the right-shifted result is returned to the bit image register 97 again.

(4) 最新のワイドカウントレジスタ91の内容と
最新のナローカウントレジスタ92の内容を
ALU14に読み出して加算し、2で除算した
結果をスレシヨルド修正値としてインターバル
レジスタポインタ94が指定するインターバル
レジスタ51に転送する。
(4) Check the contents of the latest wide count register 91 and the latest narrow count register 92.
The result of reading and adding to the ALU 14 and dividing by 2 is transferred to the interval register 51 specified by the interval register pointer 94 as a threshold correction value.

(5) エレメントカウンタ93の内容をALU14
に読み出して1減算し、0でなければ再び結果
をエレメントカウンタ93に戻して1エレメン
トデータ受付処理を終了し、中断されていたプ
ログラムカウンタ11に基づく命令語の読み出
し及び実行のプログラム処理を再開する。
(5) Transfer the contents of element counter 93 to ALU 14
If it is not 0, the result is returned to the element counter 93, the one element data reception process is completed, and the interrupted program process of reading and executing the instruction word based on the program counter 11 is restarted. .

(6) エレメントカウンタ93の内容を1減算した
結果が0になるとALU14は自動的に1キヤ
ラクタデータ受付割り込み制御信号5をI/O
要求制御部80に出力する。このI/O要求制
御部80は、内部データバス70にキヤラクタ
データ受付割り込み処理アドレスを出力し、
I/O処理実行要求線6の信号をハイレベル
に、I/O処理実行形態指定線7の信号をロウ
レベルにする。I/O要求受付部81はこれを
1キヤラクタデータ受付割り込み処理要求と判
断して命令レジスタ15に強制的に1キヤラク
タデータ受付割り込み処理コードを設定する。
また、実行制御部17はプログラムカウンタ1
1のアドレス更新を禁止し、続いてプログラム
カウンタ11、プログラムステータスワード1
2及び汎用レジスタセツト13をデータメモリ
30上のスタツクエリア36に退避させる。実
行部は、I/O要求制御部80が内部データバ
ス上に出力している1キヤラクタデータ受付割
り込み処理アドレスをプログラムカウンタ11
へ転送することにより、1キヤラクタデータ受
付処理プログラムを開始する。
(6) When the content of the element counter 93 is subtracted by 1 and the result becomes 0, the ALU 14 automatically sends the 1-character data reception interrupt control signal 5 to the I/O
It is output to the request control section 80. This I/O request control unit 80 outputs a character data reception interrupt processing address to the internal data bus 70,
The signal on the I/O process execution request line 6 is set to high level, and the signal on the I/O process execution mode designation line 7 is set to low level. The I/O request reception unit 81 determines this as a 1-character data reception interrupt processing request, and forcibly sets a 1-character data reception interrupt processing code in the instruction register 15.
The execution control unit 17 also controls the program counter 1.
1, and then program counter 11 and program status word 1.
2 and the general-purpose register set 13 are saved in the stack area 36 on the data memory 30. The execution unit outputs the 1-character data reception interrupt processing address that the I/O request control unit 80 outputs onto the internal data bus to the program counter 11.
By transferring the data to , the one character data reception processing program is started.

この1キヤラクタデータ受付処理の内容は、従
来例における1キヤラクタデータ受付処理と同様
で、ビツトイメージレジスタ97の内容を読み出
して、データメモリ30上のキヤラクタデータ格
納エリア35に格納し、エレメントカウンタ93
に当該バーコードシンボルのキヤラクタ当りエレ
メント数を初期値として設定する。この後、完成
されたキヤラクタデータを当該バーコードのエン
コード様式に従つてASCIIコードに変換したり、
マージン又はスタートキヤラクタ及びストツプキ
ヤラクタの検出等の処理が通常行われるが、この
詳細な説明は省略する。
The contents of this one-character data reception process are the same as the one-character data reception process in the conventional example, in which the contents of the bit image register 97 are read out, stored in the character data storage area 35 on the data memory 30, and the counter 93
The number of elements per character of the barcode symbol is set as an initial value. After this, the completed character data is converted into ASCII code according to the encoding format of the barcode,
Processing such as margin or start character and stop character detection is normally performed, but detailed explanation thereof will be omitted.

この一連の処理を終了すると、データメモリ3
0上のスタツクエリア36に退避しておいたデー
タをそれぞれプログラムカウンタ11、プログラ
ムステータスワード12及び汎用レジスタセツト
13に戻す事により、中断されていたメインプロ
グラム処理へ復帰する。
After completing this series of processing, the data memory 3
By returning the data saved in the stack area 36 above 0 to the program counter 11, program status word 12, and general-purpose register set 13, the interrupted main program processing is returned to.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明はバーコードスキ
ヤナの出力パルス受付時に発生する処理、即ち受
付パルスの論理値の判定を、スレシヨルド修正を
行いながら所定回数受付け、1キヤラクタ分デー
タの受付を完了するバーコードパルス受付処理を
ソフトウエア割り込みによるオーバヘツドなし
で、バーコードスキヤナの出力パルスの受付時に
発生する要求によりプログラムの実行を中断し、
CPUの通常のプログラム実行動作を停止し、
CPUのステータス及びデータを保持したまま、
CPU自身がバーコード受付処理を行うことで実
現することにより、特別な外付けのハードウエア
を必要とせず、従来の割り込み処理に内在してい
た割り込みベクタへの分岐及び復帰処理、プログ
ラムカウンタ、プログラムステータスワードや汎
用レジスタの退避と復帰、個々の命令のフエツチ
及びデコード、メモリアクセス時のメモリポイン
タへのアドレス設定、汎用レジスタによるデータ
処理等に費していた時間を大幅に削減することが
でき、さらに1エレメントデータ受付処理による
1キヤラクタ分のビツトイメージデータ完成時し
か1キヤラクタデータ受付割り込み処理要求が発
生しないので、割り込み処理起動の回数が大幅に
減少し、CPUの実行効率の低下を最小限に抑え
ることができる効果がある。
As explained above, the present invention processes the processing that occurs when receiving an output pulse of a barcode scanner, that is, the judgment of the logical value of the received pulse, while correcting the threshold, accepts the reception a predetermined number of times, and completes the reception of data for one character. Barcode pulse reception processing is performed without overhead due to software interrupts, and program execution is interrupted by a request that occurs when receiving an output pulse from the barcode scanner.
Stops the CPU's normal program execution operation,
While retaining CPU status and data,
This is realized by the CPU itself performing barcode reception processing, eliminating the need for special external hardware and eliminating the need for branching and return processing to interrupt vectors, program counters, and program processing, which were inherent in conventional interrupt processing. It is possible to significantly reduce the time spent saving and restoring status words and general-purpose registers, fetching and decoding individual instructions, setting addresses to memory pointers when accessing memory, and processing data using general-purpose registers. Furthermore, since a 1-character data reception interrupt processing request is generated only when 1 character of bit image data is completed by 1-element data reception processing, the number of interrupt processing activations is greatly reduced, and the drop in CPU execution efficiency is minimized. It has the effect of reducing

このようなデータ処理時間の短縮によつてバー
コードのスキヤン速度に対する制限を最小限に抑
えることができるため、スキヤン速度の高速化に
伴つて、例えばレーザスキヤン方式の場合に1つ
のバーコードシンボルに対するスキヤン回数を増
大させることにより読み取り率の向上がはかれる
ようになり、一方、情報の大容量化に伴うバーコ
ードシンボルの高密度化にも対応できるようにな
り、システムの高分解能化が可能となる。
This reduction in data processing time minimizes the limitations on the barcode scanning speed, so as the scanning speed increases, for example, in the case of a laser scanning method, the By increasing the number of scans, it is possible to improve the reading rate, and at the same time, it is now possible to handle the higher density of barcode symbols that accompany larger amounts of information, making it possible to increase the resolution of the system. .

以上のように本発明のバーコード読取装置は、
バーコードスキヤナの出力パルスの受付処理に対
して最も適した受付データ処理手段を提供するこ
とが可能で、実用効果は極めて高い。
As described above, the barcode reading device of the present invention has
It is possible to provide reception data processing means most suitable for reception processing of output pulses of a barcode scanner, and the practical effect is extremely high.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例のブロツク図、第2
図は従来のバーコード読取制御装置のブロツク図
である。 図において、1……バーコードスキヤナ信号、
2……エツジ検出信号、3……インターバル制御
信号、5……割込制御信号、6……I/O処理要
求信号、7……I/O処理指定信号、10……実
行部、11……プログラムカウンタ、12……プ
ログラムステータスワード、13……汎用レジス
タセツト、14……算術論理演算ユニツト
(ALU)、15……命令レジスタ、16……命令
レジスタ、17……実行制御部、20……プログ
ラムメモリ、30……データメモリ、31……最
新のワイドカウント数格納エリア、32……最新
のナローカウント数格納エリア、33……エレメ
ントカウント数格納エリア、34……ビツトイメ
ージ格納エリア、35……キヤラクタデータ格納
エリア、36……スタツクエリア、40……エツ
ジ検出部、50……タイマ・イベントカウンタ、
51……インターバルレジスタ、52……比較
器、54……インターバル信号フラグ、55……
カウントレジスタ、56……キヤプチヤレジス
タ、60……割込み制御部、70……内部データ
バス、80……I/O要求制御部、81……I/
O要求受付部、90……自動転送レジスタ群、9
1……最新のワイドカウントレジスタ、92……
最新のナローカウントレジスタ、93……エレメ
ントカウンタ、94……インターバルレジスタポ
インタ、95……フラグポインタ、96……キヤ
プチヤレジスタポインタ、97……ビツトイメー
ジレジスタ、である。
FIG. 1 is a block diagram of one embodiment of the present invention, and FIG.
The figure is a block diagram of a conventional barcode reading control device. In the figure, 1...barcode scanner signal,
2... Edge detection signal, 3... Interval control signal, 5... Interrupt control signal, 6... I/O processing request signal, 7... I/O processing designation signal, 10... Execution unit, 11... ...Program counter, 12...Program status word, 13...General purpose register set, 14...Arithmetic logic unit (ALU), 15...Instruction register, 16...Instruction register, 17...Execution control unit, 20... ...Program memory, 30...Data memory, 31...Latest wide count number storage area, 32...Latest narrow count number storage area, 33...Element count number storage area, 34...Bit image storage area, 35 ... Character data storage area, 36 ... Stack area, 40 ... Edge detection section, 50 ... Timer/event counter,
51...Interval register, 52...Comparator, 54...Interval signal flag, 55...
Count register, 56...Capture register, 60...Interrupt control unit, 70...Internal data bus, 80...I/O request control unit, 81...I/
O request receiving unit, 90... automatic transfer register group, 9
1...Latest wide count register, 92...
These are the latest narrow count register, 93...element counter, 94...interval register pointer, 95...flag pointer, 96...capture register pointer, 97...bit image register.

Claims (1)

【特許請求の範囲】[Claims] 1 入力されるバーコードパルスを検知しこのバ
ーコードパルスのデコード処理要求を発生するパ
ルス検出部と、このパルス検出部のパルス検知に
同期して計数動作を開始しそのパルス周期を計測
するパルス周期計測部と、プログラム及び各種デ
ータを記憶するメモリ部と、前記パルス検出部の
処理要求によるデコード処理と前記プログラムに
よる通常命令処理とを選択的に実行する中央処理
部とを備えたバーコード読取装置において、前記
中央処理部のデコード処理は、前記パルス検出部
が前記処理要求を発生した時、前記命令処理の実
行に関わる前記中央処理部の内部のプログラムカ
ウンタ、プログラムステータスワードの状態を保
持したまま起動されて、前記メモリ部に設けられ
ソフトウエアにより任意に書込み可能な自動転送
制御レジスタ群のデータを用いて前記パルス周期
計測部からのパルス周期情報を文字ビツト情報に
変換するように処理するものであることを特徴と
するバーコード読取装置。
1. A pulse detection section that detects an input barcode pulse and generates a decoding processing request for this barcode pulse, and a pulse period that starts counting operation in synchronization with the pulse detection of this pulse detection section and measures the pulse period. A barcode reading device comprising a measurement section, a memory section that stores programs and various data, and a central processing section that selectively executes decoding processing according to a processing request from the pulse detection section and normal command processing according to the program. In the decoding process of the central processing unit, when the pulse detection unit generates the processing request, the state of a program counter and a program status word inside the central processing unit related to execution of the instruction processing is maintained. A device that is activated and processes the pulse period information from the pulse period measuring section to convert it into character bit information using data in a group of automatic transfer control registers provided in the memory section and writable arbitrarily by software. A barcode reading device characterized by:
JP60083919A 1985-04-19 1985-04-19 Bar code reader Granted JPS61241883A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60083919A JPS61241883A (en) 1985-04-19 1985-04-19 Bar code reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60083919A JPS61241883A (en) 1985-04-19 1985-04-19 Bar code reader

Publications (2)

Publication Number Publication Date
JPS61241883A JPS61241883A (en) 1986-10-28
JPH0535473B2 true JPH0535473B2 (en) 1993-05-26

Family

ID=13816006

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60083919A Granted JPS61241883A (en) 1985-04-19 1985-04-19 Bar code reader

Country Status (1)

Country Link
JP (1) JPS61241883A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0814835B2 (en) * 1988-08-25 1996-02-14 アルプス電気株式会社 Code reader

Also Published As

Publication number Publication date
JPS61241883A (en) 1986-10-28

Similar Documents

Publication Publication Date Title
US4090238A (en) Priority vectored interrupt using direct memory access
EP0212393B1 (en) System for managing a plurality of shared interrupt handlers in a linked-list data structures
US5708814A (en) Method and apparatus for reducing the rate of interrupts by generating a single interrupt for a group of events
US4805098A (en) Write buffer
CA1081857A (en) Apparatus for processing interrupts in microprocessing systems
US4315314A (en) Priority vectored interrupt having means to supply branch address directly
EP0206654A1 (en) Interrupt generation in a processor
CA1102004A (en) Data processing interrupt apparatus
US5815733A (en) System for handling interrupts in a computer system using asic reset input line coupled to set of status circuits for presetting values in the status circuits
US3415981A (en) Electronic computer with program debugging facility
EP0240606A2 (en) Pipe-line processing system and microprocessor using the system
US6493781B1 (en) Servicing of interrupts with stored and restored flags
JPH0535473B2 (en)
EP0469543A2 (en) Multiple interrupt handling circuit
EP0012242A1 (en) Digital data processor for word and character oriented processing
US3316538A (en) Circuit arrangement for processing parts of words in electronic computers
US3723972A (en) Data communication system
JPS5826043B2 (en) Processor reset method
JPH0568754B2 (en)
JPH083801B2 (en) System allocator for a reduced processor that evaluates programs stored as binary directed graphs using frequency-free functional language code
JPS60178570A (en) Data receiver
JPH08272775A (en) Vector processor
KR0184786B1 (en) Interrupt processor
JPH0531775B2 (en)
JPH04219829A (en) Interruption controller