TW202038885A - Storage box - Google Patents

Storage box Download PDF

Info

Publication number
TW202038885A
TW202038885A TW108114711A TW108114711A TW202038885A TW 202038885 A TW202038885 A TW 202038885A TW 108114711 A TW108114711 A TW 108114711A TW 108114711 A TW108114711 A TW 108114711A TW 202038885 A TW202038885 A TW 202038885A
Authority
TW
Taiwan
Prior art keywords
output
signals
terminal
logic value
state
Prior art date
Application number
TW108114711A
Other languages
Chinese (zh)
Other versions
TWI679975B (en
Inventor
黃朝約
Original Assignee
神雲科技股份有限公司
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 神雲科技股份有限公司 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

Images

Abstract

A storage box includes a box body, M*N infrared sensors and light emitting diodes(LEDs), a logic unit and a processing unit. The logic unit includes a plurality of three-state output latches, wherein M*N generates M*N driving signals based on M first control signals and N input and output signals to control the LEDs to emit light. The other M*N three-state output latches output N of M*N sensing signals of the infrared sensors to the N input and output signals based on M second control signals. The processing unit generates the first control signals and the second control signals, and obtains the M*N sensing signals by the N input and output signals at different time, and further, generated the M*N driving signals by the N input and output signals at different time based on the M*N sensing signals.

Description

收納盒Storage Box

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

習知的藥品收納盒包含多個容置藥物的收納空間、多個分別感測該等收納空間是否容置藥物的紅外線感測器、多個分別對應該等收納空間以顯示是否容置藥物的發光二極體、及一處理單元。該處理單元電連接該等紅外線感測器,以接收多個感測信號,並還電連接該等發光二極體,且根據該等感測信號產生多個驅動信號,以分別控制該等發光二極體分別在該等收納空間發光或不發光,以對應顯示每一該收納空間是否有容置藥物。The conventional drug storage box includes a plurality of storage spaces for accommodating drugs, a plurality of infrared sensors that respectively sense whether the storage spaces contain drugs, and a plurality of corresponding storage spaces to display whether the drugs are accommodated. 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 emitting The diodes respectively emit light or no light in the storage spaces to correspondingly display whether each storage space contains medicines.

舉例來說,該等收納空間的數量是6*7等於42個,且該等收納空間呈矩陣排列,以對應每週七天,每天最多六次的藥物服用。當該42個收納空間都有容置藥物時,該處理單元根據該42個感測信號,產生該42個驅動信號、以使得該42個發光二極體發光。當第1列第1行的藥物被服用後,同樣地,該處理單元控制對應的該發光二極體在第1列第1行的收納空間不發光,且控制其餘的該41個發光二極體在其他41個收納空間保持發光。For example, the number of the storage spaces is 6*7 equal to 42, and the storage spaces are arranged in a matrix to correspond to a maximum of six medications per day, seven days a week. When all the 42 storage spaces contain medicines, the processing unit generates the 42 driving signals according to the 42 sensing signals, so that the 42 light-emitting diodes emit light. When the medicine in the first column and row 1 is taken, similarly, the processing unit controls the corresponding light-emitting diode to not emit light in the storage space of the first column and row 1, 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) drive signals. Therefore, the processing unit requires a total of 84 pins. When the processing unit has fewer than 84 pins, multiple processing units need to be installed, 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 (that is, 13), so that the total required pins are reduced To M+N+M*N (ie 55). However, because the second processing unit adopts a matrix control method, the light emission of the light-emitting diodes is restricted.

參閱圖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 the corresponding sixteen light-emitting diodes as examples to illustrate the problem of the second conventional control method. When it is desired to control the light-emitting diodes located in the R2 column and the C2 row to emit light, the two control signals in the R2 column and the C2 row are represented by solid lines as being changed by a logic value such as a logic 1 to complete. Similarly, when it is desired to control the light emitting diode located in the R3 column and the C3 row to emit light, the two control signals in the R3 column and the C3 row are represented by solid lines. However, when you want to control the two light-emitting diodes in the R2 column, the C2 row and the R3 column and C3 row to emit light at the same time, you need to control the four in the R2 column, C2 row, R3 column, and C3 row. 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 the R2 column and C3 row and R3 and C2 row also emit light, causing false display. That is to say, the use of the processing unit in the matrix form of control will cause the light emission of the light-emitting diodes to be limited by the circuit, and only a single or single row of light-emitting diodes can be displayed at a time, and the correctness cannot be simultaneously performed Control multiple coupling (Coupling) light-emitting diodes. Therefore, it has become a problem to be solved to provide a medicine storage box that uses a processing unit with a smaller number of feet to reduce the cost.

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

於是,本發明收納盒包含一盒體、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. Both M and N are 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 in the box, and respectively detect whether the storage spaces contain an object, and generate M*N sensing signals. The M*N light-emitting diodes are arranged in the box body, and receive M*N drive signals respectively, so as to be controlled to determine correspondingly to emit light or not to 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 the first three-state output latch, 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 generate the M*N drive signals in turn according to the M first control signals and the N input and output signals. The second three-state output latches receive and according to M second control signals, output N of the M*N sensing signals to the N input/output signals in turn.

該處理單元電連接該邏輯單元,並產生該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 signals in turn according to the N input and output signals at different time points Sensing signals, and then generating the M*N driving signals in sequence through the N input and output signals at different time points according to the M*N sensing signals.

在一些實施態樣中,其中,該處理單元藉由該M個第一控制信號,使得該M*N個第一三態輸出栓鎖器保持輸出前一個狀態的邏輯值,並藉由該M個第二控制信號之其中一者的邏輯值輪流依序等於一第一邏輯值,以藉由該N個輸出入信號輪流依序獲得該M*N個第二三態輸出栓鎖器所輸出的該M*N個感測信號之其中N個,進而獲得該M*N個感測信號的邏輯值。In some embodiments, the processing unit uses the M first control signals to make the M*N first three-state output latches keep outputting the logic value of the previous state, and uses the M The logic value of one of the second control signals is equal to a first logic value in turn, so as to obtain the output of the M*N second three-state output latch by the N input and output signals in turn N of the M*N sensing signals, and then obtaining the 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 implementations, 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 to make the The output of the M*N second three-state output latches is in a high impedance state, and the logic value of one of the M first control signals is sequentially equal to a second logic value by turns The N input and output signals sequentially output N of the logic values determined by the M*N drive signals to N of the M*N first three-state output latches, thereby generating the M *N drive signals.

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

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

當該致能端及該栓鎖端所接收的信號的邏輯值分別等於該第一邏輯值及該第二邏輯值時,該輸出端所輸出的信號的邏輯值等於該資料端所接收的信號的邏輯值。當該致能端及該栓鎖端所接收的信號的邏輯值都等於該第一邏輯值時,該輸出端所輸出的信號的邏輯值等於保持在前一個狀態的邏輯值。當該致能端所接收的信號的邏輯值等於該第二邏輯值時,該輸出端的輸出為該高阻抗狀態。When the logic value of the signal received by the enable terminal and the latch terminal is equal to the first logic value and the second logic value, respectively, the logic value of the signal output by the output terminal is equal to the signal received by the data terminal The logical value. When the logic values of the signals received by the enable terminal and the latch terminal are both 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 embodiments, each of the three-state output latches further includes a first inverter, a first buffer, a D-type latch, and a second buffer. The first inverter includes an input terminal electrically connected to the enable terminal of the three-state output latch, and an output terminal. The first buffer includes an input terminal electrically connected to the latch terminal of the three-state output latch, and an output terminal. 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 three-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 a control terminal electrically connected to the three-state output latch The output terminal of this output terminal. 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 aspects, wherein 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 reverse or gate. The reverse gate includes an input terminal electrically connected to the data terminal of the D-type latch, and an output terminal. The first and gate includes a first input terminal electrically connected to the output terminal of the reverse gate, a second input terminal electrically connected to the latch terminal of the D-type latch, and an output terminal. The second gate includes a first input terminal electrically connected to the latch end of the D-type latch, a second input terminal electrically connected to the data terminal of the D-type latch, and an output terminal.

該第一反或閘包括一電連接該第一及閘的該輸出端的第一輸入端、一第二輸入端、及一電連接該D型栓鎖器的該輸出端的輸出端。該第二反或閘包括一電連接該第一反或閘的該輸出端的第一輸入端、一電連接該第二及閘的該輸出端的第二輸入端、及一電連接該第一反或閘的該第二輸入端的輸出端。The first reverse 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 inverter or gate includes a first input terminal electrically connected to the output terminal of the first inverter or gate, a second input terminal electrically connected to the output terminal of the second inverter, and a second input terminal electrically connected to the first inverter Or the output end of the second input end of the 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 make the M*N first three-state output latches keep outputting 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, so as to obtain the M*N output by the M*N second three-state output latches by the N input/output signals N of the M*N sensing signals are then obtained to obtain the logic 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 then uses the M second control signals to make the output of the M*N second three-state output latches a high impedance state, and uses one of the M first control signals The logic value of is equal to a second logic value, so that N of the logic values determined by the M*N driving signals are output to the M*N first three-state output latches through the N input/output signals N of the M*N drive signals 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 the other one of the M second control signals, and then uses the M first control signals The other one is to generate the logic values of the other N of the M*N driving signals, so as to obtain the M*N sensing signals and generate the M*N driving signals.

本發明的功效在於:藉由該M*N個第一三態輸出栓鎖器儲存對應該等驅動信號所要驅動的邏輯值,並藉由該M*N個第二三態輸出栓鎖器儲存對應的該等感測信號的邏輯值,且藉由該N個輸出入信號、該M個第一控制信號、及該M個第二控制信號,即能使得該處理單元輪流依序獲得該M*N個紅外線感測器所偵測的該等感測信號,並正確且輪流依序輸出該M*N個發光二極體所需要的該等驅動信號,相較於習知技術能夠大幅地減少該處理單元所需要的信號數量或腳位數量。The effect of the present invention is that the M*N first three-state output latches store the logic values to be driven corresponding to the driving signals, and the M*N second three-state output latches store Corresponding to the logic values of the sensing signals, and through the N input and output signals, the M first control signals, and the M second control signals, the processing unit can obtain the M in turn in sequence. *The sensing signals detected by N infrared sensors, and the driving signals required by the M*N light-emitting diodes are output correctly and sequentially in turn. Compared with the conventional technology, it can greatly 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 Figure 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 (LED) 3, a logic unit 2, and a processing unit Unit 1. The box body 5 includes M*N storage spaces 9 arranged in a matrix. Both M and N are positive integers, usually greater than 1. In this embodiment, the storage box 100 is a medicine storage box, M is equal to 6, N is equal to 7, to indicate a total of 6 columns and 7 rows, and correspondingly indicate that the drug is taken up to six times a day, seven days a week, but not This is limited. In addition, it should be supplemented that the configuration of each storage space 9 is similar. Therefore, for convenience of description, FIG. 2 simply shows a storage space 9, an infrared sensor 4, and a light-emitting diode The label 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)。2 and 3, the M*N infrared sensors 4 are arranged on the box body 5, and respectively detect whether the storage spaces 9 contain an object (such as medicine), and generate M*N sensors Test signal IR_OUT[X,Y]. In this embodiment, the 6*7 infrared sensors 4 are respectively 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 (ie 0~6) to represent the infrared sensor 4[X,Y] in the X+1th column and Y+1th row, and correspondingly generate the 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 generated sensing signal IR_OUT[1 The logic value of ,2] 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], to be controlled to determine 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+1th column and Y+1th row. [X,Y], and correspondingly receive these drive 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 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 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 Figure 3, Figure 4, and Figure 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 One (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 the corresponding storage space 9 in the X+1th column and Y+1th row. 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 the corresponding X+1th column Y+1 The three-state output latch of the storage space 9 of the row. The first three-state output latches 20[X,Y] receive and generate the M*N drives in turn according to M first control signals LED_LE[X] and N input/output signals DATA[Y] Signal LED_EN[X,Y]. The second three-state output latches 21[X,Y] receive and according to the M second control signals IR_OE[X], N of the M*N sensing signals IR_OUT[X,Y] take turns Sequentially output to the N input/output signals DATA[Y].

參閱圖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]。6 and 7, for convenience of description, FIG. 6 only uses the seven first three-state output latches 20 corresponding to the storage spaces 9 in the sixth column (ie, X=5) [5, Y ] And the seven second three-state output latches 21 [5, Y] as an example 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 the 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 latches 20 [X, Y] and the second three-state output latches 21 [X, Y]) includes unanimous energy ends 26, one 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 latching ends 27 of the state output latch 20[5,Y] respectively receive the first control signals LED_LE[5] and the first three-state output latches 20[4,Y] The latch terminals 27 respectively receive the first control signals LED_LE[4], and the latch terminals 27 of the first three-state output latches 20[3,Y] respectively receive the first control signals LED_LE[ 3]. The latch 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 signal 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 row receive the N input and 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 Input/output signals DATA[Y], the data terminals 28 of the first three-state output latches 20[3,Y] respectively receive the N input/output signals DATA[Y], the first three-state The data terminals 28 of the output latch 20[2,Y] respectively receive the N input/output signals DATA[Y] and the data terminals of the first three-state output latch 20[1,Y] 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] output the M*N driving signals LED_EN[X,Y] respectively.

同一列的該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 and third The enabling terminals 26 of the state output latch 21[5,Y] respectively receive the second control signals IR_OE[5] and the second three-state output latch 21[4,Y]. The enabling terminals 26 respectively 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] respectively receive the second control signals IR_OE[2] and the second three-state output latches 21 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 latch 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 latch terminals 27 of the M*N second three-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 three-state output latches 21[X,Y] respectively receive the M*N sensing signals IR_OUT[X,Y]. The output terminals 29 of the N second three-state output latches 21 [X, Y] in the same column respectively output the N input and 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 latch 21[4,Y] respectively output the The N input/output signals DATA[Y], 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 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 terminal 29 respectively outputs the N input/output signals DATA[Y], and the output terminals 29 of the second three-state output latches 21[0,Y] output the N input/output signals DATA[Y] respectively .

參考下列表格一,每一該三態輸出栓鎖器(即該第一三態輸出栓鎖器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 表格一Refer to the following table 1, 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]) The enable terminal 26, the latch terminal 27, the data terminal 28, and the signals received or output by the output terminal 29 have the following logical relationship. input signal output signal Enable end 26 Latch end 27 Data port 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 respectively 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 value of the signal received by the enable terminal 26 and the latch terminal 27 is equal to the first logic value (ie, logic 0), the logic value of the signal output by the output terminal 29 is equal to the previous state The 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. From Figure 6 and Table 1, it can be seen that the latching terminals 27 of the M*N second three-state output latch 21[X,Y] are kept at logic 1 (that is, electrically connected to the power terminal) to ensure that the When the logic value of one of the second control signals IR_OE[X] at the enable terminal 26 is equal to logic 0, the input/output signals DATA[Y] at the output terminals 29 and the data terminals The logic values of the corresponding ones of the sensing signals IR_OUT[X,Y] of 28 remain the same, and the logic values of the rest of the second control signals IR_OE[X] remain equal to logic 1, without interference These input and output 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 again to FIG. 7, in more detail, 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]) also includes a first inverter 23, a first buffer 24, a D-type latch 22, and a second buffer 25, which means that 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 three-state output latch, and an output terminal. The first buffer 24 includes an input terminal electrically connected to the latch terminal 27 of the three-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 three-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 a control terminal electrically connected to the tri-state The output terminal 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 signals received or output by the latch terminal E, the data terminal D, and the output terminal Q of the D-type latch 22 have the following logical relationship. When the logic value of the signal received by the latch terminal E and the data terminal D is equal to the first logic value (ie, logic 0), the logic value of the signal output by the output terminal Q is equal to the one that remains 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 terminal Q outputs The logical value of the signal is equal to the logical value maintained 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 both equal to the second logic value (ie logic 1) and the first logic value (ie logic 0), the output terminal Q outputs The logic value of the signal is equal to the first logic value (ie, logic 0). When the logic value of the signal received by the latch terminal E and the data terminal D is 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 ( That is 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 also 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 reverse 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 and gate 222 includes a first input terminal electrically connected to the output terminal of the reverse gate 221, a second input terminal electrically connected to the latch terminal E of the D-type latch 22, and an output terminal. The second and gate 223 includes a first input terminal electrically connected to the latch end E of the D-type latch 22, a second input terminal electrically connected to the data terminal D of the D-type latch 22, And an output terminal.

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

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

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

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

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

於步驟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] remains at logic 1), and then executes Step S23.

於步驟S23, 該處理單元1儲存該等輸出入信號DATA[6:0]的邏輯值,接著執行步驟S24。In step S23, the processing unit 1 stores the logic 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, and 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, execute step S22. When it is determined that i is not less than 6, step S3 is executed.

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

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

於步驟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 other LED_LE[1:5] remain at logic 0), that is In other words, the logic values of the drive signals LED_EN[j,Y] of the output terminals 29 of the first three-state output latches 20[j,Y] of the logic unit 2 will be synchronously equal to the data terminals The logical value of the input/output signal DATA[Y] of 28, that is, during each turn, the processing unit 1 controls the update of the on and off states of seven light-emitting diodes at the same time. 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, and calculates j=j+1 (that is, the 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, execute step S32. And when it is judged that j is not less than 6, step S2 is executed.

總結地說,該處理單元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 also uses the M first control signals LED_LE[X] at different time points. N input and output signals DATA[Y] 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 by The N input and output signals DATA[Y], in turn, sequentially generate the M*N drive signals LED_EN[X,Y].

更詳細地說,該處理單元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 generated logic values of the M first control signals LED_LE[X] to be equal to the first logic value (ie, logic 0), so that the M*N first three-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 all equal to the first logic value (ie logic 0), so that the M*N The logic values 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 drive signals LED_EN[X,Y]) remain in the previous state The 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 generated M second control signals IR_OE[X] (such as IR_OE[5]) to be equal to the first logic value (ie logic 0) in turn, and the rest The logic value of the M-1 second control signal (such as IR_OE[4]~[0]) is equal to the second logic value (ie logic 1), so that the M*N second three-state output latches 21 The logic values of the signals received by the N enable terminals 26 and the latch terminals 27 corresponding to that one of [X,Y] (such as 21[5,Y]) are respectively equal to the first logic Value (ie, logic 0) and the second logic value (ie, logic 1), so that the M*N second three-state output latch 21[X,Y] corresponds to the one (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 received by the data terminals 28 (ie IR_OUT[5, Y]). In other words, at this time, the remaining (M-1)*N second three-state output latches (such as 21[4,Y], 21[3,Y], 21[2,Y], 21[ The logic values of the signals received by the enable terminals 26 of 1, Y] and 21 [0, Y]) are all equal to the second logic value (ie logic 1), so that the (M-1)*N The output of the output terminals 29 of the second three-state output latch is in the high impedance state without affecting the corresponding one of the M*N second three-state output latches 21[X,Y] ( For example, the logic values of the input and output signals DATA[Y] respectively output by the output terminals 29 of 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 obtain the M*N second three-state output latches 21[X,Y] outputted by the M*N second three-state output latches 21[X,Y] in turn by the N input/output signals DATA[Y] N of the sensing signals IR_OUT[X,Y] (that is, corresponding to the same column) are detected, and 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 sensing signals through the M second control signals IR_OE[X] whose X is equal to 0, 1,..., M-1 (ie, 0~5) in sequence The logic value of the signal IR_OUT[X, Y] can be used to 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 driving signals LED_EN[X,Y] *N storage spaces 9 all contain medicines, and the logic value of the M*N sensing signals IR_OUT[X,Y] is equal to the second logic value (ie logic 1), then the processing unit 1 determines the M* The logic value of the N drive signals LED_EN[X,Y] is 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 that The storage space 9 contains medicines.

更詳細地說,該處理單元1控制所產生的該M個第二控制信號IR_OE[X]的邏輯值等於該第二邏輯值(即邏輯1),使得該M*N個第二三態輸出栓鎖器21[X,Y]的該等輸出端29的輸出為該高阻抗狀態,而不影響該等輸出入信號DATA[Y]的邏輯值。In more detail, the logic value of the M second control signals IR_OE[X] generated by the processing unit 1 is equal to the second logic value (ie, logic 1), so that the M*N second three-state output The output of the output terminals 29 of the latch 21 [X, Y] is in the high impedance state without affecting the logic value of the input and 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 equal to the second logic value (logic 1) in turn, and the rest The logic value of the M-1 first control signals (such as LED_LE[4]~[0]) is equal to the first logic value (ie logic 0), so that the M*N first three-state output latches 20 The logic values of the signals received by the N enable terminals 26 and the latch terminals 27 corresponding to the one of [X, Y] (such as 20[5, Y]) are respectively equal to the first logic Value (ie logic 0) and the second logic value (ie logic 1), so that the M*N first three-state output latches 20[X,Y] correspond to one of them (such as 20[5, The logic value of the signal output by the output terminals 29 of Y]) (ie LED_EN[5, Y]) is equal to the logic value of the signal received by the data terminal 28 (ie DATA[Y]). In other words, 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 enable terminals 26 and the latch terminals 27 are all equal to the first logic value (ie logic 0), so that the (M -1) The outputs of the output terminals 29 of the *N first three-state output latches maintain the logic value of the previous state, and are not 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 output N of the logic 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 drive signals LED_EN[X, Y]. For example, the processing unit 1 sequentially inputs the driving signals LED_EN[X,Y] corresponding to the first row to the sixth row by the generated logic values of the N input and output signals DATA[Y], and then Drive the M*N light-emitting diodes 3[X,Y] 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 noted that: in this embodiment, the processing unit 1 is, for example, a microcontroller, and according to the sequence of different columns, first read all the sensing signals IR_OUT[X,Y] and then The drive signals LED_EN[X,Y] are sequentially generated. In other embodiments, because the processing unit 1 generates the first control signals LED_LE[X] and the second control signals IR_OE[X] in a short period of time, the processing unit 1 also It is possible to read the sensing signal IR_OUT[X,Y] of the same column first and then generate the driving signal LED_EN[X,Y] of the same column according to the sequence of different columns, which is not limited.

此外,在本實施例中,在每一該收納空間9只有對應一個發光二極體3,而在其他實施例中,在每一該收納空間9也可以對應二個發光二極體,其中一個發光表示該收納空間9容置有藥物,且其中另一個發光表示該收納空間9沒有容置藥物。或者,在每一該收納空間9也可以對應三個以上的發光二極體,並利用對應的多個三態輸出栓鎖器來接收對應的多個感測信號及產生對應的多個驅動信號。In addition, in this embodiment, each storage space 9 corresponds to only one light-emitting diode 3, while in other embodiments, each storage space 9 may also correspond to two light-emitting diodes, one of which is The light emission indicates that the storage space 9 contains medicines, and the other light emission indicates that the storage space 9 does not contain medicines. Alternatively, each storage space 9 can also correspond to more than three 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 first three-state output latches store the logic values to be driven corresponding to the driving signals, and the second three-state output latches store the corresponding sensing signals The logic value of, and through the N input and output signals, the M first control signals, and the M second control signals, the processing unit can obtain the M*N infrared sensors in turn The detected sensing signals, and output the driving signals required by the M*N light-emitting diodes in turn and correctly and in turn, make the processing unit and the infrared sensors and the light-emitting Between the diodes, only 2*M*N three-state output latches and N+2*M signals (such as 19) are needed. Compared with the conventional technology, M*N*2 (such as 84) or M+N+M*N (such as 55), which greatly reduces the amount of signal books or pins required by the processing unit, so it can indeed achieve the purpose of the 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, all simple equivalent changes and modifications made in accordance with the scope of the patent application of the present invention and the content of the patent specification still belong to Within the scope of the patent for the present invention.

100:收納盒 1:處理單元 2:邏輯單元 20[X,Y]:第一三態輸出栓鎖器 21[X,Y]:第二三態輸出栓鎖器 22:D型栓鎖器 221:反閘 222:及閘 223:及閘 224:反或閘 225:反或閘 23:第一反向器 24:第一緩衝器 25:第二緩衝器 26:致能端 27:栓鎖端 28:資料端 29:輸出端 3:發光二極體 3[X,Y]:發光二極體 4:紅外線感測器 4[X,Y]:紅外線感測器 5:盒體 9:收納空間 DATA[Y]:輸出入信號 LED_LE[X]:第一控制信號 IR_OE[X]:第二控制信號 LED_EN[X,Y]:驅動信號 IR_OUT[X,Y]:感測信號 C1~C4:行 R1~R4:列 E:栓鎖端 D:資料端 Q:輸出端 S1~S3:步驟 S21~S25:步驟 S31~S35:步驟 100: storage box 1: processing unit 2: logic unit 20[X,Y]: The first three-state output latch 21[X,Y]: The second three-state output latch 22: D-type latch 221: Reverse Gate 222: and gate 223: and gate 224: reverse or gate 225: reverse or gate 23: The first inverter 24: first buffer 25: second buffer 26: enabling end 27: Latch end 28: data side 29: output 3: Light-emitting diode 3[X,Y]: Light-emitting diode 4: infrared sensor 4[X,Y]: infrared sensor 5: Box body 9: Storage space DATA[Y]: Input and output signal LED_LE[X]: The first control signal IR_OE[X]: The second control signal LED_EN[X,Y]: drive signal IR_OUT[X,Y]: sense signal C1~C4: OK R1~R4: column E: Latch end D: Data terminal Q: output S1~S3: steps S21~S25: steps S31~S35: steps

本發明的其他的特徵及功效,將於參照圖式的實施方式中清楚地呈現,其中: 圖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, in which: Figure 1 is a schematic diagram illustrating the control method of the second conventional technology; Figure 2 is a schematic diagram illustrating an embodiment of the storage box of the present invention; Figure 3 is a block diagram to assist Figure 1 to illustrate the embodiment; Figure 4 is a schematic diagram, assisting Figure 1 to illustrate the electrical connection of the embodiment; Figure 5 is a schematic diagram assisting Figure 1 to illustrate the electrical connection relationship of this embodiment; Figure 6 is a circuit diagram illustrating a part of the circuit of a logic unit of this embodiment; Figure 7 is a circuit diagram illustrating a three-state output latch of this embodiment; Figure 8 is a circuit diagram illustrating a D-type latch of this embodiment; and Fig. 9 is a flowchart illustrating the operation process of this embodiment.

100:收納盒 100: storage box

1:處理單元 1: processing unit

2:邏輯單元 2: logic unit

3:發光二極體 3: Light-emitting diode

4:紅外線感測器 4: infrared sensor

5:盒體 5: Box body

9:收納空間 9: Storage space

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, including: A box, including M*N storage spaces arranged in a matrix, M and N are both positive integers; M*N infrared sensors are arranged in the box body and respectively detect whether the storage spaces contain an object, and generate M*N sensing signals; M*N light-emitting diodes are arranged in the box, and receive M*N drive signals respectively, so as to be controlled to determine correspondingly to emit light or not to emit light in the storage spaces; and A logic unit electrically connected to the infrared sensors and the light emitting diodes, and includes M*N*2 three-state output latches, where the M*N three-state output latches are defined as The first three-state output latch, 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 according to the M th A control signal and N input and output signals, which in turn generate the M*N drive signals in sequence, and the second three-state output latches receive and sense the M*N drive signals according to the M second control signals. N of the signals are output to the N input and output signals in turn; and A processing unit, which 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 sequentially by the N input and output signals at different time points According to the M*N sensing signals, the N input and output signals are used at different time points to 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 uses the M first control signals to make the M*N first three-state output latches keep outputting the logic value of the previous state, and borrow The logic value of one of the M second control signals is equal to a first logic value in turn, so that the M*N second three-state output latches are obtained in turn by the N input and output signals N of the M*N sensing signals output by the device, and then obtaining the 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 output of the M*N second three-state output latch is in a high impedance state, and the logic value of one of the M first control signals is sequentially equal to a second logic value in turn, In order to output N of the logic values determined by the M*N drive signals to N of the M*N first three-state output latches in turn by the N input/output signals, and then Generate the M*N drive signals. 如請求項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 consistent energy end, a latch end, a data end, and an output end, and the M*N first three-state outputs The latches are 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 enable 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 row 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 three-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 three-state output latches in the same column receive the same one of the M second control signals, and the pins of the M*N second three-state output latches The lock terminal receives the second logic value, the data terminals of the M*N second three-state output latches receive the M*N sensing signals, and the N second three-state output latches in the same row are locked The output terminals of the converter output the N input and output signals. 如請求項5所述的收納盒,其中,每一該三態輸出栓鎖器的該致能端、該栓鎖端、該資料端、及該輸出端所接收或輸出的信號之間具有以下的邏輯關係, 當該致能端及該栓鎖端所接收的信號的邏輯值分別等於該第一邏輯值及該第二邏輯值時,該輸出端所輸出的信號的邏輯值等於該資料端所接收的信號的邏輯值, 當該致能端及該栓鎖端所接收的信號的邏輯值都等於該第一邏輯值時,該輸出端所輸出的信號的邏輯值等於保持在前一個狀態的邏輯值, 當該致能端所接收的信號的邏輯值等於該第二邏輯值時,該輸出端的輸出為該高阻抗狀態。The storage box according to claim 5, wherein the enable terminal, the latch terminal, the data terminal, and the signal received or output from the output terminal of each of the three-state output latches have the following Logical relationship, When the logic value of the signal received by the enable terminal and the latch terminal is equal to the first logic value and the second logic value, respectively, the logic value of the signal output by the output terminal is equal to the signal received by the data terminal Logical value, When the logic value of the signal received by the enable terminal and the latch terminal are both 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 includes: A first inverter includes an input terminal electrically connected to the enable terminal of the three-state output latch, and an output terminal; A first buffer, including an input terminal electrically connected to the latch end of the three-state output latch, and an output terminal; A D-type 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 three-state output latch, and an output terminal; and A 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 a three-state output latch electrically connected The output terminal of the output terminal, 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 first logic value In the case of two logic values, 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 three-state output latch further includes: A reverse gate, including an input terminal electrically connected to the data terminal of the D-type latch, and an output terminal; A first gate includes a first input terminal electrically connected to the output terminal of the reverse gate, a second input terminal electrically connected to the latch terminal of the D-type latch, and an output terminal; A second gate includes a first input terminal electrically connected to the latch end of the D-type latch, a second input terminal electrically connected to the data terminal of the D-type latch, and an output terminal; A first reverse 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 A second inverter gate includes a first input terminal electrically connected to the output terminal of the first inverter gate, a second input terminal electrically connected to the output terminal of the second inverter gate, and a second input terminal electrically connected to the first inverter gate. The output terminal of the second input terminal of the inverted 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 uses the M first control signals to make the M*N first three-state output latches keep outputting the logic value of the previous state, and borrow 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 by the N input/output signals *N of the N sensing signals, and then obtaining the logic value of N of the M*N sensing signals, The processing unit then uses the M second control signals to make the output of the M*N second three-state output latches a high impedance state, and uses one of the M first control signals The logic value of is equal to a second logic value, so that N of the logic values determined by the M*N driving signals are output to the M*N first three-state output latches by the N input/output signals N of the M*N drive signals generate logic values of N of the M*N drive signals, The processing unit sequentially obtains the logic values of the other N of the M*N sensing signals by the other one of the M second control signals, and then uses the M first control signals The other one is to generate the logic values of the other N of the M*N driving signals, so as to obtain the M*N sensing signals and generate the M*N driving signals.
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 TWI679975B (en) 2019-12-21
TW202038885A true 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)

Family Cites Families (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
US9717654B2 (en) * 2013-08-13 2017-08-01 Next Paradigm Inc. Electronic pill box prefill system including a blister pack with a capacitive sensor
TWI554268B (en) * 2014-08-13 2016-10-21 研華股份有限公司 Electronic medicine containing device, system for dispensing medicines and method thereof
US10285904B2 (en) * 2015-06-22 2019-05-14 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
TWI679975B (en) 2019-12-21

Similar Documents

Publication Publication Date Title
JP5696175B2 (en) Error detection on programmable logic resources
KR101363602B1 (en) Data Processing Hardware
CN102903334B (en) LED (Light-Emitting Diode) display processing method and display driving method
JP5384557B2 (en) LED driving device and driving system thereof
JP2010527459A (en) LED string driving device having shift register and level shifter
KR102535805B1 (en) Driver for display panel and display apparatus having the same
WO2013071183A1 (en) Content addressable memory in integrated circuit
US6489937B1 (en) LED matrix control system with Field Programmable Gate Arrays
TWI622976B (en) Gray scale generator and driving circuit using the same
JP2008096422A (en) Chip testing device and system
CN106685411A (en) Latch circuit, double data rate ring counter based on the latch circuit, and related devices
CN109949742B (en) Display panel's drive circuit and display panel
US11120749B2 (en) Display device
US11138941B2 (en) Organic light emitting diode display device
TWI540565B (en) Multiplex driver and display device
TWI679975B (en) Storage Box
TWI649733B (en) Display device and its gate driver
CN112075746B (en) Storage box
TW201506779A (en) Arithmetic logic unit
CN113785351A (en) LED backlight capable of detecting failure
TW200923874A (en) Light emitting device
TWI813932B (en) Optoelectronic packages and keypads
TWI781584B (en) Cascade driver system of preventing wires from being staggered
TWI791242B (en) Led display panel and driving method thereof
WO2023019598A1 (en) Display device, display panel and driving method therefor

Legal Events

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