TWI679975B - Storage Box - Google Patents

Storage Box Download PDF

Info

Publication number
TWI679975B
TWI679975B TW108114711A TW108114711A TWI679975B TW I679975 B TWI679975 B TW I679975B TW 108114711 A TW108114711 A TW 108114711A TW 108114711 A TW108114711 A TW 108114711A TW I679975 B TWI679975 B TW I679975B
Authority
TW
Taiwan
Prior art keywords
output
signals
terminal
state
latches
Prior art date
Application number
TW108114711A
Other languages
Chinese (zh)
Other versions
TW202038885A (en
Inventor
黃朝約
Chao-Yueh Hwang
Original Assignee
神雲科技股份有限公司
Mitac Computing Technology Corporation
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 神雲科技股份有限公司, Mitac Computing Technology Corporation filed Critical 神雲科技股份有限公司
Priority to TW108114711A priority Critical patent/TWI679975B/en
Application granted granted Critical
Publication of TWI679975B publication Critical patent/TWI679975B/en
Publication of TW202038885A publication Critical patent/TW202038885A/en

Links

Abstract

一種收納盒包含一盒體、M*N個紅外線感測器與發光二極體、一邏輯單元及一處理單元。該邏輯單元包括多個三態輸出栓鎖器,其中M*N個是根據M個第一控制信號及N個輸出入信號,產生M*N個驅動信號以控制該等發光二極體發光,另外M*N個三態輸出栓鎖器根據M個第二控制信號,將該等紅外線感測器的M*N個感測信號之其中N個輪流輸出至該N個輸出入信號。該處理單元產生該等第一控制信號及該等第二控制信號,且在不同時間點還藉由該N個輸出入信號獲得該M*N個感測信號,進而根據該M*N個感測信號在不同時間點藉由該N個輸出入信號,產生該M*N個驅動信號。A storage box includes a box body, M * N infrared sensors and light emitting diodes, a logic unit and a processing unit. The logic unit includes a plurality of three-state output latches, of which M * N are based on M first control signals and N input / output signals to generate M * N driving signals to control the light emitting diodes to emit light. In addition, M * N three-state output latches output N of the M * N sensing signals of the infrared sensors in turn to the N input / output signals according to the M second control signals. The processing unit generates the first control signals and the second control signals, and also obtains the M * N sensing signals from the N input / output signals at different points in time, and then according to the M * N sensing signals The measurement signals generate the M * N driving signals from the N input / output signals at different time points.

Description

收納盒Storage Box

本發明是有關於一種收納盒,特別是指一種具備發光二極體以顯示收納狀態的藥品收納盒。The present invention relates to a storage box, and particularly to a medicine storage box provided with a light emitting diode to display a storage state.

習知的藥品收納盒包含多個容置藥物的收納空間、多個分別感測該等收納空間是否容置藥物的紅外線感測器、多個分別對應該等收納空間以顯示是否容置藥物的發光二極體、及一處理單元。該處理單元電連接該等紅外線感測器,以接收多個感測信號,並還電連接該等發光二極體,且根據該等感測信號產生多個驅動信號,以分別控制該等發光二極體分別在該等收納空間發光或不發光,以對應顯示每一該收納空間是否有容置藥物。The conventional medicine storage box includes a plurality of storage spaces for storing medicines, a plurality of infrared sensors that respectively sense whether the storage spaces contain medicines, and a plurality of corresponding corresponding storage spaces to display whether the medicines are contained. Light-emitting diode and a processing unit. The processing unit is electrically connected to the infrared sensors to receive a plurality of sensing signals, and is also electrically connected to the light emitting diodes, and generates a plurality of driving signals according to the sensing signals to control the light emission respectively. The diodes respectively emit or not emit light in the storage spaces, so as to correspondingly display whether each of the storage spaces contains a medicine.

舉例來說,該等收納空間的數量是6*7等於42個,且該等收納空間呈矩陣排列,以對應每週七天,每天最多六次的藥物服用。當該42個收納空間都有容置藥物時,該處理單元根據該42個感測信號,產生該42個驅動信號、以使得該42個發光二極體發光。當第1列第1行的藥物被服用後,同樣地,該處理單元控制對應的該發光二極體在第1列第1行的收納空間不發光,且控制其餘的該41個發光二極體在其他41個收納空間保持發光。For example, the number of such storage spaces is 6 * 7 equals 42 and the storage spaces are arranged in a matrix to correspond to medications taken up to six times a day, seven days a week. When medicines are contained in the 42 storage spaces, the processing unit generates the 42 driving signals according to the 42 sensing signals so that the 42 light-emitting diodes emit light. After the medicine in the first column and the first row is taken, similarly, the processing unit controls the corresponding light emitting diode in the storage space of the first column and the first row to not emit light, and controls the remaining 41 light emitting diodes. The body keeps emitting light in the other 41 storage spaces.

第一種習知的該處理單元採用M*N個(即42個)感測信號及M*N個(即42個)驅動信號,因此,該處理單元總共需要84個腳位,當單一個處理單元的腳位不足84個時,就需要設置多個處理單元,不符合經濟效益。或者,第二種習知的該處理單元採用矩陣的控制方式來產生該等驅動信號,因此該等驅動信號的數量可以減少至M+N個(即13個),使得總共需要的腳位減少至M+N+M*N個(即55個)。但是第二種的該處理單元因為是採用矩陣的控制方式,也導致該等發光二極體的發光受到限制。The first conventional processing unit uses M * N (ie, 42) sensing signals and M * N (ie, 42) driving signals. Therefore, the processing unit requires a total of 84 pins. When the number of pins of the processing unit is less than 84, it is necessary to set multiple processing units, which is not economical. Alternatively, the second conventional processing unit uses a matrix control method to generate the driving signals, so the number of the driving signals can be reduced to M + N (ie, 13), so that the total number of required pins is reduced. To M + N + M * N (ie 55). However, because the processing unit of the second type adopts a matrix control method, the light emission of the light-emitting diodes is also limited.

參閱圖1,圖1以四行與四列的八個控制信號及對應的十六個發光二極體為例來說明第二種習知技術的控制方式的問題。當欲控制位於第R2列第C2行的發光二極體發光時,第R2列及第C2行的兩個控制信號以實線表示受到例如是邏輯1的邏輯值改變而完成。類似地,當欲控制位於第R3列第C3行的發光二極體發光時,第R3列及第C3行的兩個控制信號以實線表示。然而,當欲控制第R2列第C2行及第R3列第C3行的二個發光二極體同時發光時,需要控制第R2列、第C2行、第R3列、及第C3行的四個控制信號的邏輯值例如是邏輯1(以實線表示),卻導致第R2列第C3行及第R3列第C2行的另外二個發光二極體也發光而造成錯誤地顯示。也就是說,這種利用處理單元採用矩陣形式的控制方式,會導致該等發光二極體的發光受到電路的限制,一次只能顯示單顆或單排的發光二極體,而無法同時正確控制多顆耦合(Coupling)的發光二極體。因此,提供一種使用腳位數量更少的處理單元的藥品收納盒,降低成本,便成為一個待解決的問題。Referring to FIG. 1, FIG. 1 uses eight control signals in four rows and four columns and corresponding sixteen light-emitting diodes as examples to illustrate the problem of the control method of the second conventional technique. When the light-emitting diodes located in the R2 column and the C2 row are to be controlled to emit light, the two control signals in the R2 column and the C2 row are indicated by a solid line to be changed by a logic value such as logic 1. Similarly, when the light-emitting diodes located in the R3 column and the C3 row are to be controlled to emit light, the two control signals in the R3 column and the C3 row are indicated by solid lines. However, when two light emitting diodes in column R2, column C2, and column R3, column C3 are to be controlled to emit light at the same time, it is necessary to control four in column R2, row C2, column R3, and row C3. The logic value of the control signal is, for example, logic 1 (represented by a solid line), but the other two light-emitting diodes in column R2, column C3, and column R3 in column C2 also emit light, causing incorrect display. In other words, the use of a matrix-based control method using a processing unit will cause the light emission of these light-emitting diodes to be limited by the circuit, and only a single or a single row of light-emitting diodes can be displayed at a time, but not simultaneously and correctly. Controls multiple coupled light emitting diodes. Therefore, it is a problem to be solved to provide a medicine storage box using a processing unit with a smaller number of feet and reduce the cost.

因此,本發明的目的,即在提供一種採用數量較少的輸出入信號或腳位之處理單元的收納盒。Therefore, an object of the present invention is to provide a storage box using a processing unit with a smaller number of input / output signals or pins.

於是,本發明收納盒包含一盒體、M*N個紅外線感測器、M*N個發光二極體、一邏輯單元、及一處理單元。M及N都是正整數。Therefore, the storage box of the present invention includes a box body, M * N infrared sensors, M * N light emitting diodes, a logic unit, and a processing unit. M and N are both positive integers.

該盒體包括成矩陣排列的M*N個收納空間。該M*N個紅外線感測器設置於該盒體,並分別偵測該等收納空間是否容置一物件,而產生M*N個感測信號。該M*N個發光二極體設置於該盒體,並分別接收M*N個驅動信號,以受控制而決定分別在該等收納空間對應發光或不發光。The box body includes M * N storage spaces arranged in a matrix. The M * N infrared sensors are arranged on the box body, and respectively detect whether or not an object is accommodated in the storage spaces, thereby generating M * N sensing signals. The M * N light-emitting diodes are arranged in the box body, and receive M * N driving signals respectively, so as to be controlled and decided to respectively emit light or not emit light in the storage spaces.

該邏輯單元電連接該等紅外線感測器及該等發光二極體,並包括M*N*2個三態輸出栓鎖器。其中該M*N個三態輸出栓鎖器被定義為第一三態輸出栓鎖器,且其中另外M*N個三態輸出栓鎖器被定義為第二三態輸出栓鎖器。該等第一三態輸出栓鎖器接收並根據M個第一控制信號及N個輸出入信號,輪流依序產生該M*N個驅動信號。該等第二三態輸出栓鎖器接收並根據M個第二控制信號,將該M*N個感測信號之其中N個輪流依序輸出至該N個輸出入信號。The logic unit is electrically connected to the infrared sensors and the light emitting diodes, and includes M * N * 2 three-state output latches. The M * N three-state output latches are defined as a first three-state output latch, and the other M * N three-state output latches are defined as a second three-state output latch. The first three-state output latches receive and sequentially generate the M * N driving signals according to the M first control signals and the N input / output signals. The second three-state output latches receive and sequentially output N of the M * N sensing signals to the N input / output signals in turn according to the M second control signals.

該處理單元電連接該邏輯單元,並產生該M個第一控制信號及該M個第二控制信號,且在不同時間點還藉由該N個輸出入信號輪流依序獲得該M*N個感測信號,進而根據該M*N個感測信號在不同時間點藉由該N個輸出入信號,輪流依序產生該M*N個驅動信號。The processing unit is electrically connected to the logic unit, and generates the M first control signals and the M second control signals, and obtains the M * N numbers in turn through the N input and output signals at different time points in turn. According to the sensing signals, the M * N driving signals are sequentially generated in turn based on the M * N sensing signals at different time points through the N input / output signals.

在一些實施態樣中,其中,該處理單元藉由該M個第一控制信號,使得該M*N個第一三態輸出栓鎖器保持輸出前一個狀態的邏輯值,並藉由該M個第二控制信號之其中一者的邏輯值輪流依序等於一第一邏輯值,以藉由該N個輸出入信號輪流依序獲得該M*N個第二三態輸出栓鎖器所輸出的該M*N個感測信號之其中N個,進而獲得該M*N個感測信號的邏輯值。In some implementation forms, the processing unit uses the M first control signals to make the M * N first tri-state output latches output a logic value of a previous state, and uses the M The logical value of one of the second control signals is sequentially equal to a first logical value in order to obtain the output of the M * N second tri-state output latches in turn by the N input and output signals in turn. N of the M * N sensing signals are obtained, thereby obtaining a logic value of the M * N sensing signals.

在一些實施態樣中,其中,該處理單元根據該M*N個感測信號的邏輯值,決定該M*N個驅動信號的邏輯值,並藉由該M個第二控制信號,使得該M*N個第二三態輸出栓鎖器的輸出為一高阻抗狀態,並藉由該M個第一控制信號之其中一者的邏輯值輪流依序等於一第二邏輯值,以藉由該N個輸出入信號輪流依序將該M*N個驅動信號所決定的邏輯值之其中N個輸出至該M*N個第一三態輸出栓鎖器之其中N個,進而產生該M*N個驅動信號。In some embodiments, the processing unit determines the logic values of the M * N driving signals according to the logic values of the M * N sensing signals, and makes the The output of the M * N second tri-state output latches is in a high impedance state, and the logical value of one of the M first control signals is sequentially equal to a second logical value in turn, so that The N input and output signals take turns sequentially outputting N of the logical values determined by the M * N driving signals to N of the M * N first three-state output latches, and then generate the M * N drive signals.

在一些實施態樣中,其中,每一該三態輸出栓鎖器包括一致能端、一栓鎖端、一資料端、及一輸出端,該M*N個第一三態輸出栓鎖器根據該M*N個收納空間的矩陣排列而被定義分類為屬於同一行或同一列。該M*N個第一三態輸出栓鎖器的該等致能端接收該第一邏輯值,同一列的該N個第一三態輸出栓鎖器的該等栓鎖端接收該M個第一控制信號之其中同一者,同一列的該N個第一三態輸出栓鎖器的該等資料端接收該N個輸出入信號,該M*N個第一三態輸出栓鎖器的該等輸出端輸出該M*N個驅動信號。In some implementation forms, each of the three-state output latches includes a uniform energy terminal, a latch terminal, a data terminal, and an output terminal, and the M * N first three-state output latches According to the matrix arrangement of the M * N storage spaces, it is defined and classified as belonging to the same row or the same column. The enabling terminals of the M * N first three-state output latches receive the first logic value, and the latch terminals of the N first three-state output latches in the same column receive the M The same one of the first control signals, the data terminals of the N first three-state output latches in the same column receive the N input and output signals, and the M * N first three-state output latches The output terminals output the M * N driving signals.

在一些實施態樣中,其中,該M*N個第二三態輸出栓鎖器根據該M*N個收納空間的矩陣排列而分別被定義分類為屬於同一行或同一列。同一列的該N個第二三態輸出栓鎖器的該等致能端接收該M個第二控制信號之其中同一者,該M*N個第二三態輸出栓鎖器的該等栓鎖端接收該第二邏輯值,該M*N個第二三態輸出栓鎖器的該等資料端接收該M*N個感測信號,同一列的該N個第二三態輸出栓鎖器的該等輸出端輸出該N個輸出入信號。In some implementation forms, the M * N second tri-state output latches are respectively defined and classified as belonging to the same row or the same column according to the matrix arrangement of the M * N storage spaces. The enabling ends of the N second tri-state output latches in the same column receive the same one of the M second control signals, and the latches of the M * N second tri-state output latches The lock end receives the second logic value, the data ends of the M * N second tri-state output latches receive the M * N sensing signals, and the N second tri-state output latches of the same column The output terminals of the device output the N input / output signals.

在一些實施態樣中,其中,每一該三態輸出栓鎖器的該致能端、該栓鎖端、該資料端、及該輸出端所接收或輸出的信號之間具有以下的邏輯關係。In some implementation forms, the following logical relationship exists between the enable end, the latch end, the data end, and the signals received or output by each of the three-state output latches. .

當該致能端及該栓鎖端所接收的信號的邏輯值分別等於該第一邏輯值及該第二邏輯值時,該輸出端所輸出的信號的邏輯值等於該資料端所接收的信號的邏輯值。當該致能端及該栓鎖端所接收的信號的邏輯值都等於該第一邏輯值時,該輸出端所輸出的信號的邏輯值等於保持在前一個狀態的邏輯值。當該致能端所接收的信號的邏輯值等於該第二邏輯值時,該輸出端的輸出為該高阻抗狀態。When the logic values of the signals received by the enable terminal and the latch terminal are equal to the first logic value and the second logic value, respectively, the logic values of the signals output by the output terminal are equal to the signals received by the data terminal Logical value. When the logic value of the signal received by the enable terminal and the latch terminal is equal to the first logic value, the logic value of the signal output by the output terminal is equal to the logic value maintained in the previous state. When the logic value of the signal received by the enable terminal is equal to the second logic value, the output of the output terminal is in the high impedance state.

在一些實施態樣中,其中,每一該三態輸出栓鎖器還包括一第一反向器、一第一緩衝器、一D型栓鎖器、及一第二緩衝器。該第一反向器包含一電連接該三態輸出栓鎖器的該致能端的輸入端,及一輸出端。該第一緩衝器包含一電連接該三態輸出栓鎖器的該栓鎖端的輸入端,及一輸出端。該D型栓鎖器包含一電連接該第一緩衝器的該輸出端的栓鎖端、一電連接該三態輸出栓鎖器的該資料端的資料端、及一輸出端。In some implementation forms, each of the three-state output latches further includes a first inverter, a first buffer, a D-shaped latch, and a second buffer. The first inverter includes an input terminal electrically connected to the enable terminal of the tri-state output latch, and an output terminal. The first buffer includes an input end electrically connected to the latching end of the three-state output latch, and an output end. The D-type latch includes a latch terminal electrically connected to the output terminal of the first buffer, a data terminal electrically connected to the data terminal of the tri-state output latch, and an output terminal.

該第二緩衝器包含一電連接該D型栓鎖器的該輸出端的輸入端、一電連接該第一反向器的該輸出端的控制端、及一電連接該三態輸出栓鎖器的該輸出端的輸出端。當該控制端所接收的信號的邏輯值等於該第一邏輯值時,該輸出端的輸出為該高阻抗狀態。當該控制端所接收的信號的邏輯值等於該第二邏輯值時,該輸出端所輸出的信號的邏輯值等於該輸入端所接收的信號的邏輯值。The second buffer includes an input terminal electrically connected to the output terminal of the D-type latch, a control terminal electrically connected to the output terminal of the first inverter, and an electrical terminal electrically connected to the tri-state output latch. The output of this output. When the logic value of the signal received by the control terminal is equal to the first logic value, the output of the output terminal is in the high impedance state. When the logic value of the signal received by the control terminal is equal to the second logic value, the logic value of the signal output by the output terminal is equal to the logic value of the signal received by the input terminal.

在一些實施態樣中,其中,每一該三態輸出栓鎖器的該D型栓鎖器還包含一反閘、一第一及閘、一第二及閘、一第一反或閘、及一第二反或閘。該反閘包括一電連接該D型栓鎖器的該資料端的輸入端,及一輸出端。該第一及閘包括一電連接該反閘的該輸出端的第一輸入端、一電連接該D型栓鎖器的該栓鎖端的第二輸入端、及一輸出端。該第二及閘包括一電連接該D型栓鎖器的該栓鎖端的第一輸入端、一電連接該D型栓鎖器的該資料端的第二輸入端、及一輸出端。In some implementation forms, the D-type latch of each of the three-state output latches further includes a reverse gate, a first and gate, a second and gate, a first reverse or gate, And a second anti OR gate. The reverse brake includes an input end electrically connected to the data end of the D-type latch and an output end. The first sum gate includes a first input end electrically connected to the output end of the reverse gate, a second input end electrically connected to the latched end of the D-type latch, and an output end. The second sum brake includes a first input end electrically connected to the latching end of the D-type latch, a second input end electrically connected to the data end of the D-type latch, and an output end.

該第一反或閘包括一電連接該第一及閘的該輸出端的第一輸入端、一第二輸入端、及一電連接該D型栓鎖器的該輸出端的輸出端。該第二反或閘包括一電連接該第一反或閘的該輸出端的第一輸入端、一電連接該第二及閘的該輸出端的第二輸入端、及一電連接該第一反或閘的該第二輸入端的輸出端。The first OR gate includes a first input terminal electrically connected to the output terminal of the first AND gate, a second input terminal, and an output terminal electrically connected to the output terminal of the D-type latch. The second OR gate includes a first input terminal electrically connected to the output terminal of the first OR gate, a second input terminal electrically connected to the output terminal of the second AND gate, and an electrical connection to the first inverter. An output terminal of the second input terminal of the OR gate.

在另一些實施態樣中,其中,該處理單元藉由該M個第一控制信號,使得該M*N個第一三態輸出栓鎖器保持輸出前一個狀態的邏輯值,並藉由該M個第二控制信號之其中一者的邏輯值等於一第一邏輯值,以藉由該N個輸出入信號獲得該M*N個第二三態輸出栓鎖器所輸出的該M*N個感測信號之其中N個,進而獲得該M*N個感測信號之其中N個的邏輯值。In other embodiments, the processing unit uses the M first control signals to cause the M * N first three-state output latches to output the logic value of the previous state, and uses the The logic value of one of the M second control signals is equal to a first logic value to obtain the M * N output by the M * N second three-state output latches through the N input / output signals. N of the plurality of sensing signals, thereby obtaining a logical value of N of the M * N sensing signals.

該處理單元再藉由該M個第二控制信號,使得該M*N個第二三態輸出栓鎖器的輸出為一高阻抗狀態,並藉由該M個第一控制信號之其中一者的邏輯值等於一第二邏輯值,以藉由該N個輸出入信號將該M*N個驅動信號所決定的邏輯值之其中N個輸出至該M*N個第一三態輸出栓鎖器之其中N個,進而產生該M*N個驅動信號之其中N個的邏輯值。The processing unit further makes the output of the M * N second three-state output latches into a high impedance state by the M second control signals, and uses one of the M first control signals The logic value of is equal to a second logic value to output N of the logic values determined by the M * N driving signals to the M * N first three-state output latches by the N input / output signals. N of them are used to generate logic values of N of the M * N driving signals.

該處理單元輪流依序藉由該M個第二控制信號之其中另一者,獲得該M*N個感測信號之其中另外N個的邏輯值,且再藉由該M個第一控制信號之其中另一者,產生該M*N個驅動信號之其中另外N個的邏輯值,而能夠獲得該M*N個感測信號及產生該M*N個驅動信號。The processing unit sequentially obtains the logic values of the other N of the M * N sensing signals by sequentially using the other of the M second control signals, and then using the M first control signals. The other one generates logic values of the other N of the M * N driving signals, so that the M * N sensing signals can be obtained and the M * N driving signals can be generated.

本發明的功效在於:藉由該M*N個第一三態輸出栓鎖器儲存對應該等驅動信號所要驅動的邏輯值,並藉由該M*N個第二三態輸出栓鎖器儲存對應的該等感測信號的邏輯值,且藉由該N個輸出入信號、該M個第一控制信號、及該M個第二控制信號,即能使得該處理單元輪流依序獲得該M*N個紅外線感測器所偵測的該等感測信號,並正確且輪流依序輸出該M*N個發光二極體所需要的該等驅動信號,相較於習知技術能夠大幅地減少該處理單元所需要的信號數量或腳位數量。The effect of the present invention is that the logic values to be driven corresponding to the driving signals are stored by the M * N first three-state output latches, and are stored by the M * N second three-state output latches. The logic values of the corresponding sensing signals and the N input and output signals, the M first control signals, and the M second control signals enable the processing unit to sequentially obtain the M in turn. The driving signals required by the * N infrared sensors and the sequential and correct output of the driving signals required by the M * N light-emitting diodes can be greatly compared with the conventional technology Reduce the number of signals or pins required by the processing unit.

在本發明被詳細描述之前,應當注意在以下的說明內容中,類似的元件是以相同的編號來表示。Before the present invention is described in detail, it should be noted that in the following description, similar elements are represented by the same numbers.

參閱圖2,本發明收納盒100之實施例,包含一盒體5、M*N個紅外線感測器4、M*N個發光二極體(LED)3、一邏輯單元2、及一處理單元1。該盒體5包括成矩陣排列的M*N個收納空間9,M及N都是正整數,通常大於1。在本實施例中,該收納盒100是一個藥品收納盒,M等於6,N等於7,以表示共6列7行,且對應表示每週七天,每天最多六次的藥物服用,但不以此為限。另外要補充說明的是:每一該收納空間9的配置都相似,因此,為方便說明起見,圖2僅簡單標示出一個收納空間9、一個紅外線感測器4、及一個發光二極體3的標號。Referring to FIG. 2, an embodiment of the storage box 100 of the present invention includes a box body 5, M * N infrared sensors 4, M * N light-emitting diodes (LEDs) 3, a logic unit 2, and a process. Unit 1. The box body 5 includes M * N storage spaces 9 arranged in a matrix, and M and N are both positive integers, and generally greater than 1. In this embodiment, the storage box 100 is a medicine storage box, where M is equal to 6, and N is equal to 7, which indicates a total of 6 columns and 7 rows, and correspondingly indicates that the drug is taken up to six times a day, seven days a week, but not taking This is limited. In addition, it should be added that the configuration of each of the storage spaces 9 is similar. Therefore, for convenience of explanation, FIG. 2 simply indicates a storage space 9, an infrared sensor 4, and a light-emitting diode. Number of 3.

參閱圖2與圖3,該M*N個紅外線感測器4設置於該盒體5,並分別偵測該等收納空間9是否容置一物件(如藥品),而產生M*N個感測信號IR_OUT[X,Y]。在本實施例中,該6*7個紅外線感測器4分別被定義為紅外線感測器4[X,Y],X等於0、1、…、M-1(即0~5),Y等於0、1、…、N-1(即0~6),以表示第X+1列第Y+1行的該紅外線感測器4[X,Y],並對應產生該等感測信號IR_OUT[X,Y]。舉例來說,當在第2列第3行的該紅外線感測器4[1,2]偵測到對應的該收納空間9沒有容置一藥品時,所產生的該感測信號IR_OUT[1,2]的邏輯值等於一第一邏輯值(如邏輯0),或者,有容置一藥品時,該感測信號IR_OUT[1,2]的邏輯值等於一第二邏輯值(如邏輯1)。Referring to FIG. 2 and FIG. 3, the M * N infrared sensors 4 are disposed on the box body 5 and respectively detect whether the storage spaces 9 contain an object (such as a medicine), thereby generating M * N senses. Measure signal IR_OUT [X, Y]. In this embodiment, the 6 * 7 infrared sensors 4 are defined as infrared sensors 4 [X, Y], X is equal to 0, 1, ..., M-1 (that is, 0 ~ 5), Y Equal to 0, 1, ..., N-1 (that is, 0 ~ 6), to represent the infrared sensor 4 [X, Y] in the X + 1 column and the Y + 1 row, and correspondingly generate these sensing signals IR_OUT [X, Y]. For example, when the infrared sensor 4 [1,2] in the second column and the third row detects that the corresponding storage space 9 does not contain a medicine, the sensing signal IR_OUT [1 , 2] The logic value is equal to a first logic value (such as logic 0), or when a medicine is contained, the logic value of the sensing signal IR_OUT [1,2] is equal to a second logic value (such as logic 1) ).

該M*N個發光二極體3設置於該盒體5,並分別接收M*N個驅動信號LED_EN[X,Y],以受控制而決定分別在該等收納空間9對應發光或不發光。在本實施例中,該6*7個發光二極體3分別被定義為發光二極體3[X,Y] ,以表示第X+1列第Y+1行的該發光二極體3[X,Y],並對應接收該等驅動信號LED_EN[X,Y]。舉例來說,當在第3列第4行的該發光二極體3[2,3]所接收的該驅動信號LED_EN[2,3]的邏輯值等於該第一邏輯值(如邏輯0)時,則該發光二極體3[2,3]不發光,或者,該驅動信號LED_EN[2,3]的邏輯值等於該第二邏輯值(如邏輯1)時,則發光。The M * N light-emitting diodes 3 are arranged in the box body 5 and respectively receive M * N drive signals LED_EN [X, Y], and are controlled to decide whether to emit light or not to emit light in the storage spaces 9 respectively. . In this embodiment, the 6 * 7 light-emitting diodes 3 are respectively defined as light-emitting diodes 3 [X, Y] to represent the light-emitting diodes 3 in the X + 1 column and the Y + 1 row. [X, Y], and correspondingly receive such driving signals LED_EN [X, Y]. For example, when the logic value of the driving signal LED_EN [2,3] received by the light-emitting diode 3 [2,3] in the third column and the fourth row is equal to the first logic value (such as logic 0) When the light-emitting diode 3 [2,3] does not emit light, or when the logic value of the driving signal LED_EN [2,3] is equal to the second logic value (such as logic 1), it emits light.

參閱圖3、圖4、與圖5,該邏輯單元2電連接該等紅外線感測器4[X,Y]及該等發光二極體3[X,Y],並包括M*N*2個(即84個)三態輸出栓鎖器。其中該M*N個三態輸出栓鎖器被定義為第一三態輸出栓鎖器20[X,Y] ,以表示對應第X+1列第Y+1行的該收納空間9的該三態輸出栓鎖器,且其中另外M*N個三態輸出栓鎖器被定義為第二三態輸出栓鎖器21[X,Y] ,以表示對應第X+1列第Y+1行的該收納空間9的該三態輸出栓鎖器。該等第一三態輸出栓鎖器20[X,Y]接收並根據M個第一控制信號LED_LE[X]及N個輸出入信號DATA[Y],輪流依序產生該M*N個驅動信號LED_EN[X,Y]。該等第二三態輸出栓鎖器21[X,Y]接收並根據M個第二控制信號IR_OE[X],將該M*N個感測信號IR_OUT[X,Y]之其中N個輪流依序輸出至該N個輸出入信號DATA[Y]。Referring to FIG. 3, FIG. 4, and FIG. 5, the logic unit 2 is electrically connected to the infrared sensors 4 [X, Y] and the light emitting diodes 3 [X, Y], and includes M * N * 2 (Ie 84) three-state output latches. The M * N three-state output latches are defined as the first three-state output latches 20 [X, Y] to indicate that the storage space 9 corresponding to the X + 1th column and the Y + 1th row of the storage space 9 Three-state output latches, and the other M * N three-state output latches are defined as the second three-state output latches 21 [X, Y] to indicate that they correspond to the X + 1th column Y + 1 The three-state output latches of the storage space 9 of the row. The first three-state output latches 20 [X, Y] receive and according to M first control signals LED_LE [X] and N input / output signals DATA [Y], and sequentially generate the M * N drives Signal LED_EN [X, Y]. The second three-state output latches 21 [X, Y] receive and rotate N of the M * N sensing signals IR_OUT [X, Y] according to the M second control signals IR_OE [X]. The N input / output signals DATA [Y] are sequentially output.

參閱圖6與圖7,為方便說明起見,圖6僅以對應第6列(即X=5)的該等收納空間9的該七個第一三態輸出栓鎖器20[5,Y]及該七個第二三態輸出栓鎖器21[5,Y]為例作說明,而未畫出對應其他列的該等第一三態輸出栓鎖器20[0,Y]、20[1,Y]、20[2,Y]、20[3,Y]、20[4,Y]及該等第二三態輸出栓鎖器21[0,Y]、21[1,Y]、21[2,Y]、21[3,Y]、21[4,Y]。Referring to FIG. 6 and FIG. 7, for the convenience of description, FIG. 6 only uses the seven first three-state output latches 20 [5, Y corresponding to the storage spaces 9 of the sixth column (ie, X = 5). ] And the seven second three-state output latches 21 [5, Y] as examples for illustration, and the first three-state output latches 20 [0, Y], 20 corresponding to other columns are not shown [1, Y], 20 [2, Y], 20 [3, Y], 20 [4, Y] and these second three-state output latches 21 [0, Y], 21 [1, Y] , 21 [2, Y], 21 [3, Y], 21 [4, Y].

每一該三態輸出栓鎖器(即該第一三態輸出栓鎖器20[X,Y]及該第二三態輸出栓鎖器21[X,Y])包括一致能端26、一栓鎖端27、一資料端28、及一輸出端29。該M*N個第一三態輸出栓鎖器20[X,Y]的該等致能端26電連接一接地端,以接收該第一邏輯值(即邏輯0)。同一列的該N個第一三態輸出栓鎖器20[X,Y]的該等栓鎖端27接收該M個第一控制信號LED_LE[X]之其中同一者,如該等第一三態輸出栓鎖器20[5,Y]的該等栓鎖端27分別接收該等第一控制信號LED_LE[5]、該等第一三態輸出栓鎖器20[4,Y]的該等栓鎖端27分別接收該等第一控制信號LED_LE[4]、該等第一三態輸出栓鎖器20[3,Y]的該等栓鎖端27分別接收該等第一控制信號LED_LE[3]、該等第一三態輸出栓鎖器20[2,Y]的該等栓鎖端27分別接收該等第一控制信號LED_LE[2]、該等第一三態輸出栓鎖器20[1,Y]的該等栓鎖端27分別接收該等第一控制信號LED_LE[1]、及該等第一三態輸出栓鎖器20[0,Y]的該等栓鎖端27分別接收該等第一控制信號LED_LE[0]。Each of the three-state output latches (that is, the first three-state output latch 20 [X, Y] and the second three-state output latch 21 [X, Y]) includes a uniform energy terminal 26, a The latching terminal 27, a data terminal 28, and an output terminal 29. The enabling terminals 26 of the M * N first three-state output latches 20 [X, Y] are electrically connected to a ground terminal to receive the first logic value (ie, logic 0). The latch terminals 27 of the N first three-state output latches 20 [X, Y] in the same column receive the same one of the M first control signals LED_LE [X], such as the first three The latch terminals 27 of the state output latch 20 [5, Y] respectively receive the first control signals LED_LE [5], the first three-state output latch 20 [4, Y], and the like. The latching ends 27 respectively receive the first control signals LED_LE [4], and the latching ends 27 of the first three-state output latches 20 [3, Y] respectively receive the first control signals LED_LE [ 3]. The latching ends 27 of the first three-state output latches 20 [2, Y] respectively receive the first control signals LED_LE [2], the first three-state output latches 20 The latching ends 27 of [1, Y] respectively receive the first control signals LED_LE [1] and the latching ends 27 of the first three-state output latches 20 [0, Y], respectively. Receive the first control signals LED_LE [0].

同一列的該N個第一三態輸出栓鎖器20[X,Y]的該等資料端28接收該N個輸出入信號DATA[Y],如該等第一三態輸出栓鎖器20[5,Y]的該等資料端28分別接收該N個輸出入信號DATA[Y]、該等第一三態輸出栓鎖器20[4,Y]的該等資料端28分別接收該N個輸出入信號DATA[Y]、該等第一三態輸出栓鎖器20[3,Y]的該等資料端28分別接收該N個輸出入信號DATA[Y]、該等第一三態輸出栓鎖器20[2,Y]的該等資料端28分別接收該N個輸出入信號DATA[Y]、該等第一三態輸出栓鎖器20[1,Y]的該等資料端28分別接收該N個輸出入信號DATA[Y]、及該等第一三態輸出栓鎖器20[0,Y]的該等資料端28分別接收該N個輸出入信號DATA[Y]。該M*N個第一三態輸出栓鎖器20[X,Y]的該等輸出端29分別輸出該M*N個驅動信號LED_EN[X,Y]。The data terminals 28 of the N first three-state output latches 20 [X, Y] in the same column receive the N input / output signals DATA [Y], such as the first three-state output latches 20 The data terminals 28 of [5, Y] respectively receive the N input / output signals DATA [Y], and the data terminals 28 of the first three-state output latches 20 [4, Y] respectively receive the N I / O signals DATA [Y], the data terminals 28 of the first three-state output latches 20 [3, Y] receive the N I / O signals DATA [Y], the first three-states The data terminals 28 of the output latch 20 [2, Y] receive the N input / output signals DATA [Y], the data terminals of the first three-state output latch 20 [1, Y], respectively. 28 respectively receive the N input / output signals DATA [Y] and the data terminals 28 of the first three-state output latches 20 [0, Y] respectively receive the N input / output signals DATA [Y]. The output terminals 29 of the M * N first three-state output latches 20 [X, Y] respectively output the M * N driving signals LED_EN [X, Y].

同一列的該N個第二三態輸出栓鎖器21[X,Y]的該等致能端26接收該M個第二控制信號IR_OE[X]之其中同一者,如該等第二三態輸出栓鎖器21[5,Y]的該等致能端26分別接收該等第二控制信號IR_OE[5]、該等第二三態輸出栓鎖器21[4,Y]的該等致能端26分別接收該等第二控制信號IR_OE[4]、該等第二三態輸出栓鎖器21[3,Y]的該等致能端26分別接收該等第二控制信號IR_OE[3]、該等第二三態輸出栓鎖器21[2,Y]的該等致能端26分別接收該等第二控制信號IR_OE[2]、該等第二三態輸出栓鎖器21[1,Y]的該等致能端26分別接收該等第二控制信號IR_OE[1]、及該等第二三態輸出栓鎖器21[0,Y]的該等致能端26分別接收該等第二控制信號IR_OE[0]。The enabling terminals 26 of the N second three-state output latches 21 [X, Y] in the same column receive the same one of the M second control signals IR_OE [X], such as the second three The enabling terminals 26 of the state output latch 21 [5, Y] receive the second control signal IR_OE [5], the second three-state output latch 21 [4, Y], The enabling terminals 26 receive the second control signals IR_OE [4], and the enabling terminals 26 of the second three-state output latches 21 [3, Y] respectively receive the second control signals IR_OE [ 3]. The enabling terminals 26 of the second three-state output latches 21 [2, Y] receive the second control signals IR_OE [2], the second three-state output latches 21, respectively. The enabling terminals 26 of [1, Y] respectively receive the second control signals IR_OE [1] and the enabling terminals 26 of the second three-state output latches 21 [0, Y], respectively. Receive the second control signals IR_OE [0].

該M*N個第二三態輸出栓鎖器21[X,Y]的該等栓鎖端27電連接一電源端,以接收該第二邏輯值(即邏輯1)。該M*N個第二三態輸出栓鎖器21[X,Y]的該等資料端28分別接收該M*N個感測信號IR_OUT[X,Y]。同一列的該N個第二三態輸出栓鎖器21[X,Y]的該等輸出端29分別輸出該N個輸出入信號DATA[Y],如該等第二三態輸出栓鎖器21[5,Y]的該等輸出端29分別輸出該N個輸出入信號DATA[Y]、該等第二三態輸出栓鎖器21[4,Y]的該等輸出端29分別輸出該N個輸出入信號DATA[Y]、該等第二三態輸出栓鎖器21[3,Y]的該等輸出端29分別輸出該N個輸出入信號DATA[Y]、該等第二三態輸出栓鎖器21[2,Y]的該等輸出端29分別輸出該N個輸出入信號DATA[Y]、該等第二三態輸出栓鎖器21[1,Y]的該等輸出端29分別輸出該N個輸出入信號DATA[Y]、及該等第二三態輸出栓鎖器21[0,Y]的該等輸出端29分別輸出該N個輸出入信號DATA[Y]。The latching terminals 27 of the M * N second tri-state output latches 21 [X, Y] are electrically connected to a power terminal to receive the second logic value (ie, logic 1). The data terminals 28 of the M * N second tri-state output latches 21 [X, Y] receive the M * N sensing signals IR_OUT [X, Y], respectively. The output terminals 29 of the N second three-state output latches 21 [X, Y] in the same column respectively output the N input / output signals DATA [Y], such as the second three-state output latches. The output terminals 29 of 21 [5, Y] respectively output the N input / output signals DATA [Y], and the output terminals 29 of the second three-state output latches 21 [4, Y] respectively output the The N input / output signals DATA [Y] and the output terminals 29 of the second three-state output latches 21 [3, Y] output the N input / output signals DATA [Y], the second and third signals, respectively. The output terminals 29 of the state output latch 21 [2, Y] respectively output the N input / output signals DATA [Y] and the outputs of the second three-state output latch 21 [1, Y]. The terminals 29 respectively output the N input / output signals DATA [Y] and the output terminals 29 of the second three-state output latches 21 [0, Y] respectively output the N input / output signals DATA [Y] .

參考下列表格一,每一該三態輸出栓鎖器(即該第一三態輸出栓鎖器20[X,Y]及該第二三態輸出栓鎖器21[X,Y])的該致能端26、該栓鎖端27、該資料端28、及該輸出端29所接收或輸出的信號之間具有以下的邏輯關係。
輸入信號 輸出信號 致能端26 栓鎖端27 資料端28 輸出端29 0 1 1 1 0 1 0 0 0 0 X 前次狀態 1 X X Z 表格一
Referring to the following Table 1, each of the three-state output latches (that is, the first three-state output latch 20 [X, Y] and the second three-state output latch 21 [X, Y]) The signals received or output by the enable terminal 26, the latch terminal 27, the data terminal 28, and the output terminal 29 have the following logical relationships.
input signal output signal Enabling end 26 Latching end 27 Data terminal 28 Output 29 0 1 1 1 0 1 0 0 0 0 X Previous state 1 X X Z Form one

也就是說,當該致能端26及該栓鎖端27所接收的信號的邏輯值分別等於該第一邏輯值(即邏輯0)及該第二邏輯值(即邏輯1)時,該輸出端29所輸出的信號的邏輯值等於該資料端28所接收的信號的邏輯值。That is, when the logic values of the signals received by the enable terminal 26 and the latch terminal 27 are equal to the first logic value (ie, logic 0) and the second logic value (ie, logic 1), the output The logic value of the signal output by the terminal 29 is equal to the logic value of the signal received by the data terminal 28.

當該致能端26及該栓鎖端27所接收的信號的邏輯值都等於該第一邏輯值(即邏輯0)時,該輸出端29所輸出的信號的邏輯值等於保持在前一個狀態的邏輯值。當該致能端26所接收的信號的邏輯值等於該第二邏輯值(即邏輯1)時,該輸出端29的輸出為一高阻抗狀態。由圖6及表格一可知,該M*N個第二三態輸出栓鎖器21[X,Y]的該等栓鎖端27保持在邏輯1(即電連接該電源端)是保證當該等致能端26的該等第二控制信號IR_OE[X]之其中一者的邏輯值等於邏輯0時,在該等輸出端29的該等輸出入信號DATA[Y]與在該等資料端28的該等感測信號IR_OUT[X,Y]之其中對應者的邏輯值保持一致,且該等第二控制信號IR_OE[X]之其餘者的邏輯值保持在等於邏輯1,而不會干擾該等輸出入信號DATA[Y]。When the logic values of the signals received by the enable terminal 26 and the latch terminal 27 are equal to the first logic value (ie, logic 0), the logic value of the signal output by the output terminal 29 is equal to maintaining the previous state Logical value. When the logic value of the signal received by the enable terminal 26 is equal to the second logic value (ie, logic 1), the output of the output terminal 29 is in a high impedance state. It can be known from FIG. 6 and Table 1 that the latch terminals 27 of the M * N second tri-state output latches 21 [X, Y] are maintained at logic 1 (that is, electrically connected to the power terminal). When the logical value of one of the second control signals IR_OE [X] of the enable terminal 26 is equal to logic 0, the input / output signals DATA [Y] of the output terminals 29 and the data terminals The logical values of the corresponding ones of the sensing signals IR_OUT [X, Y] of 28 remain the same, and the logical values of the remaining ones of the second control signals IR_OE [X] remain equal to logical 1 without disturbing These I / O signals DATA [Y].

再參閱圖7,更詳細地說,每一該三態輸出栓鎖器(即該第一三態輸出栓鎖器20[X,Y]及該第二三態輸出栓鎖器21[X,Y])還包括一第一反向器23、一第一緩衝器24、一D型栓鎖器22、及一第二緩衝器25,也就是說每一該三態輸出栓鎖器是一種Transparent D-Type Latch with 3-State Outputs。該第一反向器23包含一電連接該三態輸出栓鎖器的該致能端26的輸入端,及一輸出端。該第一緩衝器24包含一電連接該三態輸出栓鎖器的該栓鎖端27的輸入端,及一輸出端。該D型栓鎖器22包含一電連接該第一緩衝器24的該輸出端的栓鎖端E、一電連接該三態輸出栓鎖器的該資料端28的資料端D、及一輸出端Q。Referring to FIG. 7 again, in more detail, each of the three-state output latches (ie, the first three-state output latch 20 [X, Y] and the second three-state output latch 21 [X, Y]) also includes a first inverter 23, a first buffer 24, a D-shaped latch 22, and a second buffer 25, that is, each of the three-state output latches is a Transparent D-Type Latch with 3-State Outputs. The first inverter 23 includes an input terminal electrically connected to the enable terminal 26 of the tri-state output latch, and an output terminal. The first buffer 24 includes an input terminal electrically connected to the latching terminal 27 of the tri-state output latch, and an output terminal. The D-type latch 22 includes a latch terminal E electrically connected to the output terminal of the first buffer 24, a data terminal D electrically connected to the data terminal 28 of the tri-state output latch, and an output terminal. Q.

該第二緩衝器25包含一電連接該D型栓鎖器22的該輸出端Q的輸入端、一電連接該第一反向器23的該輸出端的控制端、及一電連接該三態輸出栓鎖器的該輸出端29的輸出端。當該第二緩衝器25的該控制端所接收的信號的邏輯值等於該第一邏輯值(即邏輯0)時,該第二緩衝器25的該輸出端的輸出為該高阻抗狀態。當該第二緩衝器25的該控制端所接收的信號的邏輯值等於該第二邏輯值(即邏輯1)時,該第二緩衝器25的該輸出端所輸出的信號的邏輯值等於該輸入端所接收的信號的邏輯值。The second buffer 25 includes an input terminal electrically connected to the output terminal Q of the D-type latch 22, a control terminal electrically connected to the output terminal of the first inverter 23, and an electrical connection to the tri-state. An output of the output terminal 29 of the output latch. When the logic value of the signal received by the control terminal of the second buffer 25 is equal to the first logic value (ie, logic 0), the output of the output terminal of the second buffer 25 is in the high impedance state. When the logic value of the signal received by the control terminal of the second buffer 25 is equal to the second logic value (ie, logic 1), the logic value of the signal output by the output terminal of the second buffer 25 is equal to the The logical value of the signal received at the input.

該D型栓鎖器22的該栓鎖端E、該資料端D、及該輸出端Q所接收或輸出的信號之間具有以下的邏輯關係。當該栓鎖端E及該資料端D所接收的信號的邏輯值都等於該第一邏輯值(即邏輯0)時,該輸出端Q所輸出的信號的邏輯值等於保持在前一個狀態的邏輯值。當該栓鎖端E及該資料端D所接收的信號的邏輯值分別等於該第一邏輯值(即邏輯0)及該第二邏輯值(即邏輯1)時,該輸出端Q所輸出的信號的邏輯值等於保持在前一個狀態的邏輯值。The latch terminal E, the data terminal D, and the signals received or output by the output terminal Q of the D-type latch 22 have the following logical relationships. When the logic values of the signals received by the latch terminal E and the data terminal D are equal to the first logic value (ie, logic 0), the logic value of the signal output by the output terminal Q is equal to that maintained in the previous state. Logical value. When the logic values of the signals received by the latch terminal E and the data terminal D are equal to the first logic value (ie, logic 0) and the second logic value (ie, logic 1), the output from the output terminal Q The logic value of the signal is equal to the logic value held in the previous state.

當該栓鎖端E及該資料端D所接收的信號的邏輯值都分別等於該第二邏輯值(即邏輯1)及該第一邏輯值(即邏輯0)時,該輸出端Q所輸出的信號的邏輯值等於該第一邏輯值(即邏輯0)。當該栓鎖端E及該資料端D所接收的信號的邏輯值都等於該第二邏輯值(即邏輯1)時,該輸出端Q所輸出的信號的邏輯值等於該第二邏輯值(即邏輯1)。When the logic values of the signals received by the latch terminal E and the data terminal D are respectively equal to the second logic value (ie, logic 1) and the first logic value (ie, logic 0), the output from the output terminal Q is output. The logic value of the signal is equal to the first logic value (ie, logic 0). When the logic values of the signals received by the latch terminal E and the data terminal D are equal to the second logic value (ie, logic 1), the logic value of the signal output by the output terminal Q is equal to the second logic value ( Ie logic 1).

參閱圖8,舉例說明一個D型栓鎖器22的內部電路,還包含一反閘(INV gate)221、一第一及閘(AND gate)222、一第二及閘(AND gate)223、一第一反或閘(NOR gate)224、及一第二反或閘(NOR gate)225。Referring to FIG. 8, the internal circuit of a D-type latch 22 is illustrated, which further includes an INV gate 221, a first AND gate 222, a second AND gate 223, A first NOR gate 224 and a second NOR gate 225.

該反閘221包括一電連接該D型栓鎖器22的該資料端D的輸入端,及一輸出端。該第一及閘222包括一電連接該反閘221的該輸出端的第一輸入端、一電連接該D型栓鎖器22的該栓鎖端E的第二輸入端、及一輸出端。該第二及閘223包括一電連接該D型栓鎖器22的該栓鎖端E的第一輸入端、一電連接該D型栓鎖器22的該資料端D的第二輸入端、及一輸出端。The anti-gate 221 includes an input terminal electrically connected to the data terminal D of the D-type latch 22 and an output terminal. The first sum gate 222 includes a first input end electrically connected to the output end of the reverse gate 221, a second input end electrically connected to the latching end E of the D-type latch 22, and an output end. The second sum gate 223 includes a first input terminal electrically connected to the latching end E of the D-type latch 22, a second input terminal electrically connected to the data end D of the D-type latch 22, And an output.

該第一反或閘224包括一電連接該第一及閘222的該輸出端的第一輸入端、一第二輸入端、及一電連接該D型栓鎖器22的該輸出端Q的輸出端。該第二反或閘225包括一電連接該第一反或閘224的該輸出端的第一輸入端、一電連接該第二及閘223的該輸出端的第二輸入端、及一電連接該第一反或閘224的該第二輸入端的輸出端。The first OR gate 224 includes a first input terminal electrically connected to the output terminal of the first and gate 222, a second input terminal, and an output electrically connected to the output terminal Q of the D-type latch 22. end. The second OR gate 225 includes a first input terminal electrically connected to the output terminal of the first OR gate 224, a second input terminal electrically connected to the output terminal of the second AND gate 223, and an electrical connection to the The output terminal of the second input terminal of the first OR gate 224.

參閱圖2與圖9,圖9是一流程圖,示例性地說明該處理單元1的控制步驟,包含步驟S1~S3。Referring to FIG. 2 and FIG. 9, FIG. 9 is a flowchart illustrating the control steps of the processing unit 1 by way of example, including steps S1 to S3.

於步驟S1,開始執行,接著執行步驟S2。In step S1, execution is started, and then step S2 is performed.

於步驟S2,執行子流程1(即S2),包括步驟S21~S25,接著執行步驟S3。In step S2, sub-process 1 (ie, S2) is performed, including steps S21 to S25, and then step S3 is performed.

於步驟S21,設定變數i=0,接著執行步驟S22。In step S21, the variable i = 0 is set, and then step S22 is performed.

於步驟S22, 該處理單元1控制所產生的該第二控制信號IR_OE[i]=0(即IR_OE[0]為邏輯0,且其他的IR_OE[1:5]保持在邏輯1),接著執行步驟S23。In step S22, the processing unit 1 controls the generated second control signal IR_OE [i] = 0 (that is, IR_OE [0] is logic 0, and other IR_OE [1: 5] remain at logic 1), and then executes Step S23.

於步驟S23, 該處理單元1儲存該等輸出入信號DATA[6:0]的邏輯值,接著執行步驟S24。In step S23, the processing unit 1 stores the logical values of the input / output signals DATA [6: 0], and then executes step S24.

於步驟S24,該處理單元1控制所產生的該第二控制信號IR_OE[i]=1,並計算i=i+1(即更新後的i等於1),接著執行步驟S25。In step S24, the processing unit 1 controls the generated second control signal IR_OE [i] = 1, calculates i = i + 1 (that is, the updated i is equal to 1), and then executes step S25.

於步驟S25,該處理單元1判斷i是否小於6,當判斷i是小於6時,執行步驟S22。而當判斷i不是小於6時,執行步驟S3。In step S25, the processing unit 1 determines whether i is less than 6, and when it is determined that i is less than 6, executes step S22. When it is determined that i is not less than 6, step S3 is performed.

於步驟S3,執行子流程2(即S3),包括步驟S31~S35,接著執行步驟S2。In step S3, sub-process 2 (ie, S3) is performed, including steps S31 to S35, and then step S2 is performed.

於步驟S31,設定變數j=0,接著執行步驟S32。In step S31, the variable j = 0 is set, and then step S32 is performed.

於步驟S32, 該處理單元1控制所產生的該第一控制信號LED_LE[j]=1(即LED_LE[0]為邏輯1,且其他的LED_LE [1:5]保持在邏輯0) ,也就是說,該邏輯單元2的該等第一三態輸出栓鎖器20[j,Y]的該等輸出端29的該等驅動信號LED_EN[j,Y]的邏輯值會同步等於該等資料端28的該輸出入信號DATA[Y] 的邏輯值,即在每次輪流的過程中,該處理單元1一次同時控制七個發光二極體的亮滅狀態的更新。接著執行步驟S33。In step S32, the processing unit 1 controls the generated first control signal LED_LE [j] = 1 (that is, LED_LE [0] is logic 1 and the other LED_LE [1: 5] remains at logic 0), that is, Say, the logic values of the driving signals LED_EN [j, Y] of the first three-state output latches 20 [j, Y] of the logic unit 2 will be equal to the data terminals The logical value of the input / output signal DATA [Y] of 28, that is, the processing unit 1 simultaneously controls the update of the on / off states of the seven light emitting diodes at a time during each rotation. Then, step S33 is executed.

於步驟S33,該處理單元1將步驟S23所儲存的邏輯值對應寫入該等輸出入信號DATA[6:0],接著執行步驟S34。In step S33, the processing unit 1 writes the logic values stored in step S23 into the input / output signals DATA [6: 0] correspondingly, and then executes step S34.

於步驟S34,該處理單元1控制所產生的該第一控制信號LED_LE[j]=0,並計算j=j+1(即更新後的j等於1),接著執行步驟S35。In step S34, the processing unit 1 controls the generated first control signal LED_LE [j] = 0, calculates j = j + 1 (that is, updated j is equal to 1), and then executes step S35.

於步驟S35,該處理單元1判斷j是否小於6,當判斷j是小於6時,執行步驟S32。而當判斷j不是小於6時,執行步驟S2。In step S35, the processing unit 1 determines whether j is less than 6, and when it is determined that j is less than 6, executes step S32. When it is determined that j is not less than 6, step S2 is performed.

總結地說,該處理單元1電連接該邏輯單元2,並產生該M個第一控制信號LED_LE[X]及該M個第二控制信號IR_OE[X],且在不同時間點還藉由該N個輸出入信號DATA[Y] 輪流依序獲得該M*N個感測信號IR_OUT[X,Y],進而根據該M*N個感測信號IR_OUT[X,Y]在不同時間點藉由該N個輸出入信號DATA[Y],輪流依序產生該M*N個驅動信號LED_EN[X,Y]。In summary, the processing unit 1 is electrically connected to the logic unit 2 and generates the M first control signals LED_LE [X] and the M second control signals IR_OE [X], and at different points in time, The N input and output signals DATA [Y] sequentially obtain the M * N sensing signals IR_OUT [X, Y] in turn, and then according to the M * N sensing signals IR_OUT [X, Y] at different time points, The N input / output signals DATA [Y] sequentially generate the M * N driving signals LED_EN [X, Y] in turn.

更詳細地說,該處理單元1控制所產生的該M個第一控制信號LED_LE[X]的邏輯值等於該第一邏輯值(即邏輯0),使得該M*N個第一三態輸出栓鎖器20[X,Y]的該等致能端26及該等栓鎖端27所接收的信號的邏輯值都等於該第一邏輯值(即邏輯0),進而使得該M*N個第一三態輸出栓鎖器20[X,Y]的該等輸出端29所輸出的信號(即輸出至該M*N個驅動信號LED_EN[X,Y])的邏輯值保持在前一個狀態的邏輯值。In more detail, the processing unit 1 controls the logic values of the M first control signals LED_LE [X] generated to be equal to the first logic value (ie, logic 0), so that the M * N first tri-state outputs The logic values of the signals received by the enable terminals 26 and the latch terminals 27 of the latch 20 [X, Y] are equal to the first logic value (ie, logic 0), so that the M * N The logic value of the signals output from the output terminals 29 of the first three-state output latch 20 [X, Y] (that is, output to the M * N driving signals LED_EN [X, Y]) remains in the previous state Logical value.

該處理單元還控制所產生的該M個第二控制信號IR_OE[X]之其中一者(如IR_OE[5])的邏輯值輪流依序等於該第一邏輯值(即邏輯0),且其餘該M-1個第二控制信號(如IR_OE[4]~[0])的邏輯值等於該第二邏輯值(即邏輯1),使得該M*N個第二三態輸出栓鎖器21[X,Y]之對應其中該者(如21[5,Y])的該N個的該等致能端26及該等栓鎖端27所接收的信號的邏輯值分別等於該第一邏輯值(即邏輯0)及該第二邏輯值(即邏輯1),進而使得該M*N個第二三態輸出栓鎖器21[X,Y]之對應其中該者(如21[5,Y])的該等輸出端29所輸出的信號(即DATA[Y])的邏輯值等於該等資料端28所接收的信號的邏輯值(即IR_OUT[5,Y])。也就是說,此時,其餘該(M-1)*N個第二三態輸出栓鎖器(如21[4,Y]、21[3,Y]、21[2,Y]、21[1,Y]、21[0,Y])的該等致能端26所接收的信號的邏輯值都等於該第二邏輯值(即邏輯1),進而使得該(M-1)*N個第二三態輸出栓鎖器的該等輸出端29的輸出為該高阻抗狀態,而不影響該M*N個第二三態輸出栓鎖器21[X,Y]之對應其中該者(如21[5,Y])的該等輸出端29所分別輸出的該等輸出入信號DATA[Y]的邏輯值。The processing unit also controls the logic value of one of the M second control signals IR_OE [X] (such as IR_OE [5]) to be sequentially equal to the first logic value (ie, logic 0) in turn, and the rest The logic value of the M-1 second control signals (such as IR_OE [4] ~ [0]) is equal to the second logic value (ie, logic 1), so that the M * N second tri-state output latches 21 [X, Y] The logical values of the signals received by the enable terminals 26 and the latch terminals 27 corresponding to the N (such as 21 [5, Y]) are respectively equal to the first logic Value (that is, logic 0) and the second logic value (that is, logic 1), so that the M * N second three-state output latches 21 [X, Y] correspond to one of them (such as 21 [5, The logic value of the signal (ie DATA [Y]) output by the output terminals 29 of Y]) is equal to the logic value of the signal (ie IR_OUT [5, Y]) received by the data terminals 28. That is, at this time, the remaining (M-1) * N second tri-state output latches (such as 21 [4, Y], 21 [3, Y], 21 [2, Y], 21 [ 1, Y], 21 [0, Y]) The logic values of the signals received by the enabling terminals 26 are equal to the second logic value (ie, logic 1), so that (M-1) * N The outputs of the output terminals 29 of the second three-state output latches are in the high-impedance state without affecting the corresponding ones of the M * N second three-state output latches 21 [X, Y] ( Logic values of the input and output signals DATA [Y] respectively output by the output terminals 29 such as 21 [5, Y]).

因此,該處理單元1能藉由該N個輸出入信號DATA[Y]輪流依序獲得該M*N個第二三態輸出栓鎖器21[X,Y]所輸出的該M*N個感測信號IR_OUT[X,Y]之其中N個(即對應同一列者),進而獲得該M*N個感測信號IR_OUT[X,Y]的邏輯值。舉例來說,該處理單元1藉由X依序等於0、1、…、M-1(即0~5) 的該M個第二控制信號IR_OE[X],獲得該M*N個感測信號IR_OUT[X,Y]的邏輯值,而能獲得該盒體的該M*N個收納空間9是否容置有藥品。Therefore, the processing unit 1 can sequentially obtain the M * N outputs of the M * N second three-state output latches 21 [X, Y] by the N input / output signals DATA [Y] in turn. N of the sensing signals IR_OUT [X, Y] (that is, those corresponding to the same column), and then the logical values of the M * N sensing signals IR_OUT [X, Y] are obtained. For example, the processing unit 1 obtains the M * N senses by the M second control signals IR_OE [X] in which X is sequentially equal to 0, 1, ..., M-1 (that is, 0 to 5). The logic value of the signal IR_OUT [X, Y] can obtain whether the M * N storage spaces 9 of the box body contain medicines.

再者,該處理單元1根據該M*N個感測信號IR_OUT[X,Y]的邏輯值,決定該M*N個驅動信號LED_EN[X,Y]的邏輯值,舉例來說,該M*N個收納空間9都有容置藥品,該M*N個感測信號IR_OUT[X,Y]的邏輯值等於該第二邏輯值(即邏輯1),則該處理單元1決定該M*N個驅動信號LED_EN[X,Y]的邏輯值也等於該第二邏輯值(即邏輯1),以驅動該M*N個發光二極體3[X,Y]都發光,來表示該等收納空間9都有容置藥品。Furthermore, the processing unit 1 determines the logical values of the M * N driving signals LED_EN [X, Y] according to the logical values of the M * N sensing signals IR_OUT [X, Y]. For example, the M * N storage spaces 9 each contain medicines. The logical value of the M * N sensing signals IR_OUT [X, Y] is equal to the second logical value (ie, logic 1), then the processing unit 1 determines the M * The logic values of the N driving signals LED_EN [X, Y] are also equal to the second logic value (ie, logic 1) to drive the M * N light-emitting diodes 3 [X, Y] to emit light to indicate such The storage space 9 contains medicines.

更詳細地說,該處理單元1控制所產生的該M個第二控制信號IR_OE[X]的邏輯值等於該第二邏輯值(即邏輯1),使得該M*N個第二三態輸出栓鎖器21[X,Y]的該等輸出端29的輸出為該高阻抗狀態,而不影響該等輸出入信號DATA[Y]的邏輯值。In more detail, the processing unit 1 controls the logic values of the M second control signals IR_OE [X] generated to be equal to the second logic value (ie, logic 1), so that the M * N second tri-state outputs The outputs of the output terminals 29 of the latch 21 [X, Y] are in the high-impedance state without affecting the logic values of the input / output signals DATA [Y].

該處理單元1並控制所產生的該M個第一控制信號LED_LE[X]之其中一者(如LED_LE[5])的邏輯值輪流依序等於該第二邏輯值(邏輯1),且其餘該M-1個第一控制信號(如LED_LE[4]~[0])的邏輯值等於該第一邏輯值(即邏輯0),使得該M*N個第一三態輸出栓鎖器20[X,Y]之對應其中該者(如20[5,Y])的該N個的該等致能端26及該等栓鎖端27所接收的信號的邏輯值分別等於該第一邏輯值(即邏輯0)及該第二邏輯值(即邏輯1),進而使得該M*N個第一三態輸出栓鎖器20[X,Y]之對應其中該者(如20[5,Y])的該等輸出端29所輸出的信號(即LED_EN[5,Y])的邏輯值等於該等資料端28所接收的信號的邏輯值(即DATA[Y])。也就是說,此時,其餘該(M-1)*N個第一三態輸出栓鎖器(20[4,Y]、20[3,Y]、20[2,Y]、20[1,Y]、20[0,Y])的該等致能端26及該等栓鎖端27所接收的信號的邏輯值都等於該第一邏輯值(即邏輯0),進而使得該(M-1)*N個第一三態輸出栓鎖器的該等輸出端29的輸出保持在前一個狀態的邏輯值,而不受該等輸出入信號DATA[Y]的影響。The processing unit 1 also controls the logic value of one of the M first control signals LED_LE [X] (such as LED_LE [5]) to be sequentially equal to the second logic value (logic 1) in turn, and the rest The logic values of the M-1 first control signals (such as LED_LE [4] ~ [0]) are equal to the first logic value (ie, logic 0), so that the M * N first three-state output latches 20 [X, Y] corresponds to the logic value of the signals received by the N enabled terminals 26 and the latched terminals 27 of the N (eg, 20 [5, Y]) respectively. Value (that is, logic 0) and the second logic value (that is, logic 1), so that the corresponding M * N first three-state output latches 20 [X, Y] correspond to that one (such as 20 [5, The logic value of the signal (ie LED_EN [5, Y]) output by the output terminals 29 of Y]) is equal to the logic value of the signal (ie DATA [Y]) received by the data terminals 28. That is, at this time, the remaining (M-1) * N first three-state output latches (20 [4, Y], 20 [3, Y], 20 [2, Y], 20 [1 , Y], 20 [0, Y]) The logic values of the signals received by the enabling terminals 26 and the latching terminals 27 are equal to the first logic value (ie, logic 0), so that (M -1) The outputs of the output terminals 29 of the * N first three-state output latches are maintained at the logic values of the previous state without being affected by the input and output signals DATA [Y].

因此,該處理單元1能藉由該N個輸出入信號DATA[Y]輪流依序將該M*N個驅動信號LED_EN[X,Y]所決定的邏輯值之其中N個輸出至該M*N個第一三態輸出栓鎖器20[X,Y]之其中N個,進而產生該M*N個驅動信號LED_EN[X,Y]。舉例來說,該處理單元1依序將對應第1列至第6列驅動信號LED_EN[X,Y],藉由所產生的該N個輸出入信號DATA[Y]的邏輯值而輸入,進而驅動該M*N個發光二極體3[X,Y]發光或不發光。Therefore, the processing unit 1 can sequentially output N of the logical values determined by the M * N driving signals LED_EN [X, Y] to the M * by the N input / output signals DATA [Y] in turn. N of the N first three-state output latches 20 [X, Y] generate the M * N driving signals LED_EN [X, Y]. For example, the processing unit 1 sequentially inputs the driving signals LED_EN [X, Y] corresponding to the first to sixth columns through the generated logical values of the N input / output signals DATA [Y], and then The M * N light-emitting diodes 3 [X, Y] are driven to emit light or not to emit light.

另外要補充說明的是:在本實施例中,該處理單元1例如是一個微控制器,且是依照不同列的順序,先讀取完全部的該等感測信號IR_OUT[X,Y]再依序產生該等驅動信號LED_EN[X,Y]。而在其他的實施例中,由於該處理單元1運算所產生的該等第一控制信號LED_LE[X]及該等第二控制信號IR_OE[X]的時間很短,因此,該處理單元1也可以依照不同列的順序,先讀取同一列的該感測信號IR_OUT[X,Y]再產生同一列的驅動信號LED_EN[X,Y],都不在此限。In addition, it should be added that, in this embodiment, the processing unit 1 is, for example, a microcontroller, and according to the order of different columns, all the sensing signals IR_OUT [X, Y] are read first. The driving signals LED_EN [X, Y] are sequentially generated. In other embodiments, because the processing time of the first control signal LED_LE [X] and the second control signal IR_OE [X] generated by the processing unit 1 is very short, the processing unit 1 also has According to the order of different columns, the sensing signal IR_OUT [X, Y] in the same column is first read, and then the driving signal LED_EN [X, Y] in the same column is generated, which is not limited to this.

此外,在本實施例中,在每一該收納空間9只有對應一個發光二極體3,而在其他實施例中,在每一該收納空間9也可以對應二個發光二極體,其中一個發光表示該收納空間9容置有藥物,且其中另一個發光表示該收納空間9沒有容置藥物。或者,在每一該收納空間9也可以對應三個以上的發光二極體,並利用對應的多個三態輸出栓鎖器來接收對應的多個感測信號及產生對應的多個驅動信號。In addition, in this embodiment, there is only one light-emitting diode 3 corresponding to each of the storage spaces 9, and in other embodiments, each of the storage spaces 9 may also correspond to two light-emitting diodes, one of which Light emission indicates that the storage space 9 contains medicine, and another light emission indicates that the storage space 9 does not contain medicine. Alternatively, each of the storage spaces 9 may correspond to three or more light-emitting diodes, and use corresponding three-state output latches to receive corresponding multiple sensing signals and generate corresponding multiple driving signals. .

綜上所述,藉由該等第一三態輸出栓鎖器儲存對應該等驅動信號所要驅動的邏輯值,並藉由該等第二三態輸出栓鎖器儲存對應的該等感測信號的邏輯值,且藉由該N個輸出入信號、該M個第一控制信號、及該M個第二控制信號,即能使得該處理單元輪流依序獲得該M*N個紅外線感測器所偵測的該等感測信號,並正確且輪流依序輸出該M*N個發光二極體所需要的該等驅動信號,確實使得該處理單元與該等紅外線感測器及該等發光二極體之間,僅需要使用2*M*N個三態輸出栓鎖器及N+2*M個信號(如19個),相較於習知技術採用M*N*2個(如84個)或M+N+M*N個(如55個)皆大幅減少該處理單元所需要的信號書量或腳位數量,故確實能達成本發明的目的。In summary, the logic values to be driven corresponding to the driving signals are stored by the first three-state output latches, and the corresponding sensing signals are stored by the second three-state output latches. And the N input and output signals, the M first control signals, and the M second control signals can enable the processing unit to sequentially obtain the M * N infrared sensors in turn. The detected sensing signals and the driving signals required for the M * N light-emitting diodes are output correctly and sequentially in turn, which indeed makes the processing unit, the infrared sensors, and the light-emitting diodes Between the diodes, only 2 * M * N three-state output latches and N + 2 * M signals (such as 19) are required, compared with the conventional technology using M * N * 2 (such as 84) or M + N + M * N (for example, 55) can greatly reduce the number of signal books or pin numbers required by the processing unit, so it can indeed achieve the purpose of cost invention.

惟以上所述者,僅為本發明的實施例而已,當不能以此限定本發明實施的範圍,凡是依本發明申請專利範圍及專利說明書內容所作的簡單的等效變化與修飾,皆仍屬本發明專利涵蓋的範圍內。However, the above are only examples of the present invention. When the scope of implementation of the present invention cannot be limited by this, any simple equivalent changes and modifications made according to the scope of the patent application and the contents of the patent specification of the present invention are still Within the scope of the invention patent.

100‧‧‧收納盒100‧‧‧Storage Box

1‧‧‧處理單元 1‧‧‧ processing unit

2‧‧‧邏輯單元 2‧‧‧Logic Unit

20[X,Y]‧‧‧第一三態輸出栓鎖器 20 [X, Y] ‧‧‧The first three-state output latch

21[X,Y]‧‧‧第二三態輸出栓鎖器 21 [X, Y] ‧‧‧Second tri-state output latch

22‧‧‧D型栓鎖器 22‧‧‧D type latch

221‧‧‧反閘 221‧‧‧Reverse

222‧‧‧及閘 222‧‧‧ and gate

223‧‧‧及閘 223‧‧‧ and gate

224‧‧‧反或閘 224‧‧‧Anti-OR gate

225‧‧‧反或閘 225‧‧‧Anti-OR gate

23‧‧‧第一反向器 23‧‧‧first inverter

24‧‧‧第一緩衝器 24‧‧‧First buffer

25‧‧‧第二緩衝器 25‧‧‧Second buffer

26‧‧‧致能端 26‧‧‧Enable

27‧‧‧栓鎖端 27‧‧‧ bolt end

28‧‧‧資料端 28‧‧‧data terminal

29‧‧‧輸出端 29‧‧‧output

3‧‧‧發光二極體 3‧‧‧light-emitting diode

3[X,Y]‧‧‧發光二極體 3 [X, Y] ‧‧‧light-emitting diode

4‧‧‧紅外線感測器 4‧‧‧ Infrared sensor

4[X,Y]‧‧‧紅外線感測器 4 [X, Y] ‧‧‧Infrared sensor

5‧‧‧盒體 5‧‧‧Box

9‧‧‧收納空間 9‧‧‧Storage space

DATA[Y]‧‧‧輸出入信號 DATA [Y] ‧‧‧I / O signal

LED_LE[X]‧‧‧第一控制信號 LED_LE [X] ‧‧‧First control signal

IR_OE[X]‧‧‧第二控制信號 IR_OE [X] ‧‧‧Second control signal

LED_EN[X,Y]‧‧‧驅動信號 LED_EN [X, Y] ‧‧‧Drive signal

IR_OUT[X,Y]‧‧‧感測信號 IR_OUT [X, Y] ‧‧‧Sensed signal

C1~C4‧‧‧行 Lines C1 ~ C4‧‧‧‧

R1~R4‧‧‧列 R1 ~ R4‧‧‧Column

E‧‧‧栓鎖端 E‧‧‧ bolt end

D‧‧‧資料端 D‧‧‧data terminal

Q‧‧‧輸出端 Q‧‧‧ output

S1~S‧‧‧步驟 S1 ~ S‧‧‧ steps

S21~S25‧‧‧步驟 Steps S21 ~ S25‧‧‧‧

S31~S35‧‧‧步驟 S31 ~ S35‧‧‧‧step

本發明的其他的特徵及功效,將於參照圖式的實施方式中清楚地呈現,其中:
圖1是一示意圖,說明第二種習知技術的控制方式;
圖2是一示意圖,說明本發明收納盒的一實施例;
圖3是一方塊圖,輔助圖1說明該實施例;
圖4是一示意圖,輔助圖1說明該實施例的電連接關係;
圖5是一示意圖,輔助圖1說明該實施例的電連接關係;
圖6是一電路圖,說明該實施例的一邏輯單元之部分電路;
圖7是一電路圖,說明該實施例的一三態輸出栓鎖器;
圖8是一電路圖,舉例說明該實施例的一D型栓鎖器;及
圖9是一流程圖,舉例說明該實施例的運作流程。
Other features and effects of the present invention will be clearly presented in the embodiments with reference to the drawings, wherein:
FIG. 1 is a schematic diagram illustrating a control method of a second conventional technique; FIG.
2 is a schematic diagram illustrating an embodiment of the storage box of the present invention;
FIG. 3 is a block diagram illustrating the embodiment with reference to FIG. 1; FIG.
FIG. 4 is a schematic diagram assisting FIG. 1 to explain the electrical connection relationship of the embodiment; FIG.
FIG. 5 is a schematic diagram assisting FIG. 1 to explain the electrical connection relationship of the embodiment; FIG.
6 is a circuit diagram illustrating a part of a circuit of a logic unit of the embodiment;
7 is a circuit diagram illustrating a three-state output latch according to the embodiment;
FIG. 8 is a circuit diagram illustrating an example of a D-shaped latch of the embodiment; and FIG. 9 is a flowchart illustrating an operation flow of the embodiment.

Claims (9)

一種收納盒,包含:
一盒體,包括成矩陣排列的M*N個收納空間,M及N都是正整數;
M*N個紅外線感測器,設置於該盒體,並分別偵測該等收納空間是否容置一物件,而產生M*N個感測信號;
M*N個發光二極體,設置於該盒體,並分別接收M*N個驅動信號,以受控制而決定分別在該等收納空間對應發光或不發光;及
一邏輯單元,電連接該等紅外線感測器及該等發光二極體,並包括M*N*2個三態輸出栓鎖器,其中該M*N個三態輸出栓鎖器被定義為第一三態輸出栓鎖器,且其中另外M*N個三態輸出栓鎖器被定義為第二三態輸出栓鎖器,該等第一三態輸出栓鎖器接收並根據M個第一控制信號及N個輸出入信號,輪流依序產生該M*N個驅動信號,該等第二三態輸出栓鎖器接收並根據M個第二控制信號,將該M*N個感測信號之其中N個輪流依序輸出至該N個輸出入信號;及
一處理單元,電連接該邏輯單元,並產生該M個第一控制信號及該M個第二控制信號,且在不同時間點還藉由該N個輸出入信號輪流依序獲得該M*N個感測信號,進而根據該M*N個感測信號在不同時間點藉由該N個輸出入信號,輪流依序產生該M*N個驅動信號。
A storage box containing:
A box body includes M * N storage spaces arranged in a matrix, and M and N are positive integers;
M * N infrared sensors are arranged on the box body, and respectively detect whether or not an object is accommodated in the storage spaces, thereby generating M * N sensing signals;
M * N light-emitting diodes are arranged in the box body and receive M * N driving signals respectively, so as to be controlled to decide whether to emit light or not to emit light in the storage spaces respectively; and a logic unit, which is electrically connected to And other infrared sensors and the light-emitting diodes, and includes M * N * 2 three-state output latches, wherein the M * N three-state output latches are defined as the first three-state output latches And the other M * N three-state output latches are defined as the second three-state output latches. The first three-state output latches receive and are based on M first control signals and N outputs. Input signals, and sequentially generate the M * N driving signals in turn, the second three-state output latches receive and according to the M second control signals, N of the M * N sensing signals in turn Sequence output to the N input and output signals; and a processing unit, electrically connected to the logic unit, and generating the M first control signals and the M second control signals, and using the N The input and output signals take turns sequentially to obtain the M * N sensing signals, and then according to the M * N sensing signals at different time points, the The N input and output signals generate the M * N driving signals in turn.
如請求項1所述的收納盒,其中,該處理單元藉由該M個第一控制信號,使得該M*N個第一三態輸出栓鎖器保持輸出前一個狀態的邏輯值,並藉由該M個第二控制信號之其中一者的邏輯值輪流依序等於一第一邏輯值,以藉由該N個輸出入信號輪流依序獲得該M*N個第二三態輸出栓鎖器所輸出的該M*N個感測信號之其中N個,進而獲得該M*N個感測信號的邏輯值。The storage box according to claim 1, wherein the processing unit keeps the M * N first three-state output latches to output the logic value of the previous state by using the M first control signals, and borrows The logical value of one of the M second control signals is sequentially equal to a first logical value in order to sequentially obtain the M * N second tri-state output latches by the N input and output signals in turn. N of the M * N sensing signals outputted by the controller, and further obtaining a logic value of the M * N sensing signals. 如請求項2所述的收納盒,其中,該處理單元根據該M*N個感測信號的邏輯值,決定該M*N個驅動信號的邏輯值,並藉由該M個第二控制信號,使得該M*N個第二三態輸出栓鎖器的輸出為一高阻抗狀態,並藉由該M個第一控制信號之其中一者的邏輯值輪流依序等於一第二邏輯值,以藉由該N個輸出入信號輪流依序將該M*N個驅動信號所決定的邏輯值之其中N個輸出至該M*N個第一三態輸出栓鎖器之其中N個,進而產生該M*N個驅動信號。The storage box according to claim 2, wherein the processing unit determines the logical values of the M * N driving signals according to the logical values of the M * N sensing signals and uses the M second control signals , So that the outputs of the M * N second three-state output latches are in a high-impedance state, and the logical value of one of the M first control signals is sequentially equal to a second logical value in turn, In turn, N of the logical values determined by the M * N driving signals are sequentially output to N of the M * N first three-state output latches by the N I / O signals in turn. The M * N driving signals are generated. 如請求項3所述的收納盒,其中,每一該三態輸出栓鎖器包括一致能端、一栓鎖端、一資料端、及一輸出端,該M*N個第一三態輸出栓鎖器根據該M*N個收納空間的矩陣排列而被定義分類為屬於同一行或同一列,
該M*N個第一三態輸出栓鎖器的該等致能端接收該第一邏輯值,同一列的該N個第一三態輸出栓鎖器的該等栓鎖端接收該M個第一控制信號之其中同一者,同一列的該N個第一三態輸出栓鎖器的該等資料端接收該N個輸出入信號,該M*N個第一三態輸出栓鎖器的該等輸出端輸出該M*N個驅動信號。
The storage box according to claim 3, wherein each of the three-state output latches includes a uniform energy terminal, a latching terminal, a data terminal, and an output terminal, and the M * N first three-state outputs The latches are defined and classified as belonging to the same row or column according to the matrix arrangement of the M * N storage spaces,
The enabling terminals of the M * N first three-state output latches receive the first logic value, and the latch terminals of the N first three-state output latches in the same column receive the M The same one of the first control signals, the data terminals of the N first three-state output latches in the same column receive the N input and output signals, and the M * N first three-state output latches The output terminals output the M * N driving signals.
如請求項4所述的收納盒,其中,該M*N個第二三態輸出栓鎖器根據該M*N個收納空間的矩陣排列而分別被定義分類為屬於同一行或同一列,
同一列的該N個第二三態輸出栓鎖器的該等致能端接收該M個第二控制信號之其中同一者,該M*N個第二三態輸出栓鎖器的該等栓鎖端接收該第二邏輯值,該M*N個第二三態輸出栓鎖器的該等資料端接收該M*N個感測信號,同一列的該N個第二三態輸出栓鎖器的該等輸出端輸出該N個輸出入信號。
The storage box according to claim 4, wherein the M * N second tri-state output latches are respectively defined and classified as belonging to the same row or the same column according to the matrix arrangement of the M * N storage spaces,
The enabling ends of the N second tri-state output latches in the same column receive the same one of the M second control signals, and the latches of the M * N second tri-state output latches The lock end receives the second logic value, the data ends of the M * N second tri-state output latches receive the M * N sensing signals, and the N second tri-state output latches of the same column The output terminals of the device output the N input / output signals.
如請求項5所述的收納盒,其中,每一該三態輸出栓鎖器的該致能端、該栓鎖端、該資料端、及該輸出端所接收或輸出的信號之間具有以下的邏輯關係,
當該致能端及該栓鎖端所接收的信號的邏輯值分別等於該第一邏輯值及該第二邏輯值時,該輸出端所輸出的信號的邏輯值等於該資料端所接收的信號的邏輯值,
當該致能端及該栓鎖端所接收的信號的邏輯值都等於該第一邏輯值時,該輸出端所輸出的信號的邏輯值等於保持在前一個狀態的邏輯值,
當該致能端所接收的信號的邏輯值等於該第二邏輯值時,該輸出端的輸出為該高阻抗狀態。
The storage box according to claim 5, wherein between the enable end, the latch end, the data end, and the signal received or output by each of the three-state output latches, there is the following: Logical relationship,
When the logic values of the signals received by the enable terminal and the latch terminal are equal to the first logic value and the second logic value, respectively, the logic values of the signals output by the output terminal are equal to the signals received by the data terminal Logical value of
When the logic value of the signal received by the enable terminal and the latch terminal is equal to the first logic value, the logic value of the signal output by the output terminal is equal to the logic value maintained in the previous state,
When the logic value of the signal received by the enable terminal is equal to the second logic value, the output of the output terminal is in the high impedance state.
如請求項6所述的收納盒,其中,每一該三態輸出栓鎖器還包括:
一第一反向器,包含一電連接該三態輸出栓鎖器的該致能端的輸入端,及一輸出端;
一第一緩衝器,包含一電連接該三態輸出栓鎖器的該栓鎖端的輸入端,及一輸出端;
一D型栓鎖器,包含一電連接該第一緩衝器的該輸出端的栓鎖端、一電連接該三態輸出栓鎖器的該資料端的資料端、及一輸出端;及
一第二緩衝器,包含一電連接該D型栓鎖器的該輸出端的輸入端、一電連接該第一反向器的該輸出端的控制端、及一電連接該三態輸出栓鎖器的該輸出端的輸出端,當該控制端所接收的信號的邏輯值等於該第一邏輯值時,該輸出端的輸出為該高阻抗狀態,當該控制端所接收的信號的邏輯值等於該第二邏輯值時,該輸出端所輸出的信號的邏輯值等於該輸入端所接收的信號的邏輯值。
The storage box according to claim 6, wherein each of the three-state output latches further comprises:
A first inverter including an input end electrically connected to the enable end of the tri-state output latch and an output end;
A first buffer including an input end electrically connected to the latching end of the tri-state output latch and an output end;
A D-shaped latch including a latch terminal electrically connected to the output terminal of the first buffer, a data terminal electrically connected to the data terminal of the tri-state output latch, and an output terminal; and a second The buffer includes an input terminal electrically connected to the output terminal of the D-type latch, a control terminal electrically connected to the output terminal of the first inverter, and an output electrically connected to the tri-state output latch. When the logic value of the signal received by the control terminal is equal to the first logic value, the output of the output terminal is in the high impedance state. When the logic value of the signal received by the control terminal is equal to the second logic value At this time, the logic value of the signal output by the output terminal is equal to the logic value of the signal received by the input terminal.
如請求項7所述的收納盒,其中,每一該三態輸出栓鎖器的該D型栓鎖器還包含:
一反閘,包括一電連接該D型栓鎖器的該資料端的輸入端,及一輸出端;
一第一及閘,包括一電連接該反閘的該輸出端的第一輸入端、一電連接該D型栓鎖器的該栓鎖端的第二輸入端、及一輸出端;
一第二及閘,包括一電連接該D型栓鎖器的該栓鎖端的第一輸入端、一電連接該D型栓鎖器的該資料端的第二輸入端、及一輸出端;
一第一反或閘,包括一電連接該第一及閘的該輸出端的第一輸入端、一第二輸入端、及一電連接該D型栓鎖器的該輸出端的輸出端;及
一第二反或閘,包括一電連接該第一反或閘的該輸出端的第一輸入端、一電連接該第二及閘的該輸出端的第二輸入端、及一電連接該第一反或閘的該第二輸入端的輸出端。
The storage box according to claim 7, wherein the D-type latch of each of the three-state output latches further comprises:
A reverse brake including an input end electrically connected to the data end of the D-type latch and an output end;
A first sum brake including a first input end electrically connected to the output end of the reverse brake, a second input end electrically connected to the latch end of the D-type latch, and an output end;
A second sum brake including a first input end electrically connected to the latching end of the D-type latch, a second input end electrically connected to the data end of the D-type latch, and an output end;
A first OR gate including a first input terminal electrically connected to the output terminal of the first and gate, a second input terminal, and an output terminal electrically connected to the output terminal of the D-type latch; and The second OR gate includes a first input terminal electrically connected to the output terminal of the first OR gate, a second input terminal electrically connected to the output terminal of the second AND gate, and an electrical connection to the first inverter. An output terminal of the second input terminal of the OR gate.
如請求項1所述的收納盒,其中,該處理單元藉由該M個第一控制信號,使得該M*N個第一三態輸出栓鎖器保持輸出前一個狀態的邏輯值,並藉由該M個第二控制信號之其中一者的邏輯值等於一第一邏輯值,以藉由該N個輸出入信號獲得該M*N個第二三態輸出栓鎖器所輸出的該M*N個感測信號之其中N個,進而獲得該M*N個感測信號之其中N個的邏輯值,
該處理單元再藉由該M個第二控制信號,使得該M*N個第二三態輸出栓鎖器的輸出為一高阻抗狀態,並藉由該M個第一控制信號之其中一者的邏輯值等於一第二邏輯值,以藉由該N個輸出入信號將該M*N個驅動信號所決定的邏輯值之其中N個輸出至該M*N個第一三態輸出栓鎖器之其中N個,進而產生該M*N個驅動信號之其中N個的邏輯值,
該處理單元輪流依序藉由該M個第二控制信號之其中另一者,獲得該M*N個感測信號之其中另外N個的邏輯值,且再藉由該M個第一控制信號之其中另一者,產生該M*N個驅動信號之其中另外N個的邏輯值,而能夠獲得該M*N個感測信號及產生該M*N個驅動信號。
The storage box according to claim 1, wherein the processing unit keeps the M * N first three-state output latches to output the logic value of the previous state by using the M first control signals, and borrows The logic value of one of the M second control signals is equal to a first logic value to obtain the M output by the M * N second tri-state output latches through the N input / output signals. * N of the N sensing signals to obtain the logical value of N of the M * N sensing signals,
The processing unit further makes the output of the M * N second three-state output latches into a high impedance state by the M second control signals, and uses one of the M first control signals The logic value of is equal to a second logic value to output N of the logic values determined by the M * N driving signals to the M * N first three-state output latches by the N input / output signals. N of them, and then generate logic values of N of the M * N driving signals,
The processing unit sequentially obtains the logic values of the other N of the M * N sensing signals by sequentially using the other of the M second control signals, and then using the M first control signals. The other one generates logic values of the other N of the M * N driving signals, so that the M * N sensing signals can be obtained and the M * N driving signals can be generated.
TW108114711A 2019-04-26 2019-04-26 Storage Box TWI679975B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108114711A TWI679975B (en) 2019-04-26 2019-04-26 Storage Box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108114711A TWI679975B (en) 2019-04-26 2019-04-26 Storage Box

Publications (2)

Publication Number Publication Date
TWI679975B true TWI679975B (en) 2019-12-21
TW202038885A TW202038885A (en) 2020-11-01

Family

ID=69582402

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108114711A TWI679975B (en) 2019-04-26 2019-04-26 Storage Box

Country Status (1)

Country Link
TW (1) TWI679975B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWM436455U (en) * 2011-12-23 2012-09-01 feng-qi Zheng Medicament box with medicine taking prompt
US20160000657A1 (en) * 2013-08-13 2016-01-07 Next Paradigm Inc. Electronic pill box prefill system
TW201605429A (en) * 2014-08-13 2016-02-16 研華股份有限公司 Electronic medicine containing device, system for dispensing medicines and method thereof
US20160367435A1 (en) * 2015-06-22 2016-12-22 Dea Health Solutions, Llc Medication Guidance System and Method
TWI577236B (en) * 2015-09-02 2017-04-01 神雲科技股份有限公司 Led control circuit and system
TWM560098U (en) * 2018-02-08 2018-05-11 王君逸 Storage management system
US10026057B1 (en) * 2017-05-09 2018-07-17 Hussein Elsherif Retail cigarette inventory-monitoring system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWM436455U (en) * 2011-12-23 2012-09-01 feng-qi Zheng Medicament box with medicine taking prompt
US20160000657A1 (en) * 2013-08-13 2016-01-07 Next Paradigm Inc. Electronic pill box prefill system
TW201605429A (en) * 2014-08-13 2016-02-16 研華股份有限公司 Electronic medicine containing device, system for dispensing medicines and method thereof
US20160367435A1 (en) * 2015-06-22 2016-12-22 Dea Health Solutions, Llc Medication Guidance System and Method
TWI577236B (en) * 2015-09-02 2017-04-01 神雲科技股份有限公司 Led control circuit and system
US10026057B1 (en) * 2017-05-09 2018-07-17 Hussein Elsherif Retail cigarette inventory-monitoring system
TWM560098U (en) * 2018-02-08 2018-05-11 王君逸 Storage management system

Also Published As

Publication number Publication date
TW202038885A (en) 2020-11-01

Similar Documents

Publication Publication Date Title
JP5290370B2 (en) Error detection on programmable logic resources
US7111224B1 (en) FPGA configuration memory with built-in error correction mechanism
TWI693521B (en) Apparatuses and methods for flexible fuse transmission
CN104204822B (en) Edge triggered calibration
CN102903334B (en) LED (Light-Emitting Diode) display processing method and display driving method
CN107403601A (en) A kind of display driver chip and terminal device
CN107609644A (en) Method and system for the data analysis in state machine
CN110299920A (en) Gray's code generator
US6489937B1 (en) LED matrix control system with Field Programmable Gate Arrays
JP2010518464A (en) Semiconductor memory device
JPS6230665B2 (en)
TWI622976B (en) Gray scale generator and driving circuit using the same
US20200409887A1 (en) Auto-switching communication interface
US6587384B2 (en) Multi-function serial I/O circuit
TWI679975B (en) Storage Box
TW201503151A (en) Memory page buffer
CN112075746B (en) Storage box
JPH0729395A (en) Eeprom device
US7565597B1 (en) Fast parity scan of memory arrays
KR20140042484A (en) Display device
TW201506779A (en) Arithmetic logic unit
Hall Short-Read DNA Sequence Alignment with Custom Designed FPGA-based Hardware
JPS62523B2 (en)
CN109099959B (en) Connection and data reading method of digital sensor array
TW200923874A (en) Light emitting device

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees