CN114860630B - Digital processing circuit and signal processing method - Google Patents

Digital processing circuit and signal processing method Download PDF

Info

Publication number
CN114860630B
CN114860630B CN202210466630.2A CN202210466630A CN114860630B CN 114860630 B CN114860630 B CN 114860630B CN 202210466630 A CN202210466630 A CN 202210466630A CN 114860630 B CN114860630 B CN 114860630B
Authority
CN
China
Prior art keywords
latch
output
input
signal
digital processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210466630.2A
Other languages
Chinese (zh)
Other versions
CN114860630A (en
Inventor
章建军
余颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lorentz Technology Co ltd
Original Assignee
Shenzhen Lorentz Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Lorentz Technology Co ltd filed Critical Shenzhen Lorentz Technology Co ltd
Priority to CN202210466630.2A priority Critical patent/CN114860630B/en
Publication of CN114860630A publication Critical patent/CN114860630A/en
Application granted granted Critical
Publication of CN114860630B publication Critical patent/CN114860630B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/12Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
    • G06F13/124Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine
    • G06F13/126Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine and has means for transferring I/O instructions and statuses between control unit and main processor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Microcomputers (AREA)

Abstract

The application provides a digital processing circuit and a signal processing method, and relates to the technical field of signal processing. The digital processing circuit includes: the digital control system comprises a digital processor and N1 output latches, wherein N2 data bus pins of the digital processor are respectively connected with N2 input pins of each output latch, N1 first input and output pins of the digital processor are also respectively connected with control pins of the N1 output latches, and N2 output pins of each output latch are used for respectively connecting with input ends of N2 devices to be controlled so as to perform signal control on the N2 devices to be controlled; wherein N1 and N2 are integers greater than or equal to 1. Therefore, one pin can control multiple signals through a conventional digital processor, so that the pin resource is saved, the cost of the digital processor is saved, and the number of data buses is saved.

Description

Digital processing circuit and signal processing method
Technical Field
The present invention relates to the field of signal processing technologies, and in particular, to a digital processing circuit and a signal processing method.
Background
A Micro Control Unit (MCU), also called Single Chip Microcomputer (CPU) or a Single Chip Microcomputer (MCU), is a Chip-level computer formed by properly reducing the frequency and specification of a Central Processing Unit (CPU) and integrating peripheral interfaces such as memory, counter (Timer), USB, a/D conversion, UART, PLC, DMA, and even LCD driving circuits on a Single Chip, and performing different combination control for different applications.
Because the MCU has the advantages of programmability and low-cost devices, the MCU is widely applied to electronic equipment and digital power supply equipment. The MCU processes digital signals to realize signal control, and the digital signals are controlled and detected through pins of the MCU.
At present, because the resources of pins of an MCU (micro controller unit) and a DSP (Digital Signal Processing) chip at a low end are limited, one pin can only control or detect one Signal, which may result in an increase in control cost.
Disclosure of Invention
The present invention is directed to provide a digital processing circuit and a signal processing method to solve the problems of high control cost in the prior art.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a digital processing circuit, including: the digital processing unit comprises a digital processor and N1 output latches, wherein N2 data bus pins of the digital processor are respectively connected with N2 input pins of each output latch, N1 first input and output pins of the digital processor are also respectively connected with control pins of the N1 output latches, and N2 output pins of each output latch are used for respectively connecting with input ends of N2 devices to be controlled so as to perform signal control on the N2 devices to be controlled;
wherein N1 and N2 are integers greater than or equal to 1.
Optionally, the digital processing circuit further comprises: the N2 input pins of each input latch are used for being respectively connected with the output ends of N2 devices to be detected so as to detect signals of the N2 devices to be detected;
wherein N3 is an integer greater than or equal to 1.
Optionally, the first input/output pin and/or the second input/output pin is: a general purpose input output pin.
Optionally, the digital processor is a micro control unit or a digital signal processor.
In a second aspect, an embodiment of the present application provides a signal processing method for a digital processor in a digital processing circuit as set forth in any one of claims 1 to 4 above; the method comprises the following steps:
detecting an interrupt signal at a preset timing interval;
if the interrupt signal is detected, configuring N2 data bus pins of the digital processor as output pins;
assigning N2 data bus pins of the digital processor respectively, and performing signal control on corresponding equipment to be controlled through a first output latch in N1 output latches;
and assigning values to N2 data bus pins of the digital processor again, and performing signal control on corresponding equipment to be controlled through a second output latch in the N1 output latches until the number of the controlled equipment reaches a preset control number threshold.
Optionally, the assigning is performed to N2 data bus pins of the digital processor, and the signal control is performed on the corresponding device to be controlled through a first output latch of the N1 output latches, including:
assigning values to N2 data bus pins of the digital processor respectively to obtain N2 output data;
sending a first latch chip selection signal to a control pin of the first output latch, so that the first output latch latches the N2 output data;
and sending a first latch access chip removal selection signal to a control pin of the first output latch, so that the first output latch cancels the latch function, and respectively performs signal control on N2 devices to be controlled based on the N2 output data.
Optionally, the method further comprises:
and sending the first latch chip selection signal to a control pin of the first output latch, so that the first output latch only latches data and stops signal control on corresponding equipment to be controlled.
Optionally, before sending the first latch chip select signal to the control pin of the first output latch, the method further includes:
after the first latch access chip elimination selection signal is sent, the first latch access chip elimination signal is sent to a control pin of the first output latch after a first preset time is delayed, wherein the first preset time is longer than or equal to the preset transmission time of the digital processor and the output latch.
Optionally, if the digital processing circuit further includes: n3 input latches, after the number of controlled devices reaches the preset number threshold, the method further comprising:
configuring N2 data bus pins of the digital processor as input pins;
and sequentially carrying out signal detection on the corresponding equipment to be detected through the input latches in the N3 input latches until the number of the detected equipment reaches a preset detection number threshold.
Optionally, the sequentially performing signal detection on the corresponding device to be detected through input latches of the N3 input latches includes:
sending a second latch chip selection signal to a control pin of a preset input latch in the N3 input latches, so that the preset input latch latches N2 input data received by the input pin;
and sending a second latch cancellation chip selection signal to a control pin of the preset input latch, so that the preset input latch cancels the latch function, and respectively carrying out signal detection on N2 devices to be detected based on the N2 input data.
Compared with the prior art, the method has the following beneficial effects:
the embodiment of the application provides a digital processing circuit and a signal processing method, wherein the digital processing circuit comprises: the digital control system comprises a digital processor and N1 output latches, wherein N2 data bus pins of the digital processor are respectively connected with N2 input pins of each output latch, N1 first input and output pins of the digital processor are also respectively connected with control pins of the N1 output latches, and N2 output pins of each output latch are used for respectively connecting with input ends of N2 devices to be controlled so as to perform signal control on the N2 devices to be controlled; wherein N1 and N2 are integers greater than or equal to 1. Therefore, one pin can control multiple signals through a conventional digital processor, so that the pin resource is saved, the cost of the digital processor is saved, and the number of data buses is saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
FIG. 1 is a schematic diagram of a digital processing circuit according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a latch according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of another digital processing circuit according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a signal processing method according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a signal control method according to an embodiment of the present disclosure;
fig. 6 is a schematic flowchart of another signal control method according to an embodiment of the present disclosure;
fig. 7 is a schematic flowchart of another signal processing method according to an embodiment of the present application;
fig. 8 is a schematic flowchart of another signal detection method according to an embodiment of the present disclosure;
fig. 9 is a schematic diagram of a signal processing apparatus according to an embodiment of the present application;
fig. 10 is a schematic diagram of a digital processor according to an embodiment of the present application.
Icon: 100-digital processor, 200-output latch, 300-input latch, 901-detection module, 902-configuration module, 903-first control module, 904-second control module, 1001-processor, 1002-storage medium.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
In order to reduce the cost of signal processing, the present application provides a digital processing circuit and a signal processing method, and first, a digital processing circuit provided in an embodiment of the present application is explained by using specific examples.
Fig. 1 is a connection diagram of a digital processing circuit according to an embodiment of the present disclosure. As shown in fig. 1, the digital processing circuit includes: the digital processing device comprises a digital processor 100 and N1 output latches 200, wherein N2 data bus pins of the digital processor 100 are respectively connected with N2 input pins of each output latch 200, N1 first input/output pins of the digital processor 100 are also respectively connected with control pins of the N1 output latches 200, and N2 output pins of each output latch 200 are used for respectively connecting input ends of N2 devices to be controlled so as to perform signal control on the N2 devices to be controlled; wherein N1 and N2 are integers greater than or equal to 1. Specifically, N1 and N2 may be determined based on the total number of pins of a digital processor, such as the digital processing circuit illustrated in fig. 1, which has 2 first input-output pins and 8 data bus pins.
In the operation of the digital processing circuit, N1 first input/output pins of the digital processor 100 are respectively connected to control pins of N1 output latches 200, and the digital processor 100 controls the N1 output latches 200 through the first input/output pins.
On the basis of fig. 1, the embodiment of the present application further provides a latch. Fig. 2 is a schematic structural diagram of a latch according to an embodiment of the present application. As shown in fig. 2, the latch has 3 kinds of pins, which are an input pin, an output pin and a control pin, respectively, the input pin is used for receiving a digital signal sent by the digital processor, the output pin is used for outputting a signal sent by the digital processor to the control device, and the control pin is used for receiving a control signal sent by the digital processor to control the latch to latch/unlatch. When the digital signal of the control pin of the digital processor control latch is changed from 'latch cancel chip selection signal' to 'latch chip selection signal', the current input data of the input pin can be latched to the latch immediately and can not be output, and when the digital signal of the control pin is 'latch chip selection signal', the data of the output pin is always kept unchanged and can not be changed along with the data of the input pin; when the digital signal of the control pin is changed into a 'latch canceling chip selection signal', the latch is canceled, and the digital signal of the output pin is changed along with the change of the digital signal of the input pin.
The digital processor 100 may in turn control each output latch 200 of the N1 output latches 200 into an "unlatched" state via the control pins of the N1 output latches 200. When the digital processor 100 controls one of the output latches 200 to enter a "latch canceling" state, the other output latches 200 are controlled to enter a "latch" state, and at this time, the digital processor 100 controls N2 data bus pins of the digital processor 100 to be connected with N2 input pins of the output latch 200 in the "latch canceling" state through N2 data bus lines, but not connected with the output latch 200 in the "latch" state, so as to control the device to be controlled connected with the output latch 200 in the "latch canceling" state. The digital processor 100 sequentially controls each output latch 200 to enter a "latch canceling" state, so as to sequentially control the devices to be controlled connected to each output latch 200.
In the digital processing circuit, a conventional digital processor can complete one pin to control multiple signals, so that the pin resource is saved, and the cost of the digital processor is saved. Meanwhile, the data buses in the connection mode can be recycled, only N2 data buses are needed, and the number of the data buses is saved.
In summary, an embodiment of the present application provides a digital processing circuit, which includes: the digital control system comprises a digital processor and N1 output latches, wherein N2 data bus pins of the digital processor are respectively connected with N2 input pins of each output latch, N1 first input and output pins of the digital processor are also respectively connected with control pins of the N1 output latches, and N2 output pins of each output latch are used for respectively connecting with input ends of N2 devices to be controlled so as to perform signal control on the N2 devices to be controlled; wherein N1 and N2 are integers greater than or equal to 1. Therefore, one pin can control multiple signals through a conventional digital processor, so that the pin resource is saved, the cost of the digital processor is saved, and the number of data buses is saved.
On the basis of the above fig. 1, the embodiment of the present application further provides another digital processing circuit. Fig. 3 is a schematic structural diagram of another digital processing circuit according to an embodiment of the present disclosure.
As shown in fig. 3, the digital processing circuit further includes: the N3 input latches 300, the N3 second input and output pins of the digital processor 100 are further connected to the control pins of the N3 input latches 300, the N2 data bus pins of the digital processor 100 are further connected to the N2 output pins of each input latch 300, and the N2 input pins of each input latch 300 are used for being connected to the output terminals of N2 devices to be detected, respectively, so as to perform signal detection on the N2 devices to be detected; wherein N3 is an integer greater than or equal to 1. Specifically, N1, N2, and N3 may be determined according to the total number of pins of the digital processor 100, such as the digital processing circuit illustrated in fig. 3, where the digital processor 100 has 2 first input and output pins, 1 first input and output pin, and 8 data bus pins.
In the operation of the digital processing circuit, N3 second input/output pins of the digital processor 100 are respectively connected to control pins of N3 input latches 300, and the digital processor 100 controls the N3 input latches 300 through the second input/output pins. The structure of input latch 300 is the same as that of the latch shown in fig. 2.
The digital processor 100 may in turn control each input latch 300 of the N3 input latches 300 into an "unlatched" state via the control pins of the N3 input latches 300. When the digital processor 100 controls one of the input latches 300 to enter the "latch canceling" state, the other input latches 300 are controlled to enter the "latch" state, and at this time, the digital processor 100 controls N2 data bus pins of the digital processor 100 to be connected with N2 input pins of the input latch 300 in the "latch canceling" state through N2 data bus lines, but not connected with the input latch 300 in the "latch" state, so as to detect the device to be detected connected with the input latch 300 in the "latch canceling" state. The digital processor 100 sequentially controls each input latch 300 to enter a "latch cancellation" state, so as to sequentially detect the devices to be detected connected to each input latch 300. The principle of sequentially controlling the N1 output latches 200 to control the device to be controlled is further completed in combination with the above-described embodiment. The digital processor can complete signal control and detection on the equipment through the N1 output latches 200 and the N3 input latches 300 in sequence.
In the digital processing circuit, a conventional digital processor can complete one pin control and detect multi-path signals, so that the pin resource is saved, and the cost of the digital processor is saved. Meanwhile, the data buses in the connection mode can be recycled, only N2 data buses are needed, and the number of the data buses is saved.
To sum up, another digital processing circuit provided in the embodiments of the present application further includes: the N2 input pins of each input latch are used for being respectively connected with the output ends of N2 devices to be detected so as to detect signals of the N2 devices to be detected; wherein N3 is an integer greater than or equal to 1. Therefore, the control and detection of multiple signals by one pin can be completed by a conventional digital processor, so that the pin resource is saved, the cost of the digital processor is saved, and the number of data buses is saved.
With continued reference to fig. 1 and 3, the first input/output pin and/or the second input/output pin is: a general purpose input output pin. The digital processor is a micro control unit or a digital signal processor.
On the basis of fig. 1 to fig. 3, an embodiment of the present application further provides a signal processing method. Fig. 4 is a flowchart illustrating a signal processing method according to an embodiment of the present application, where the signal processing method is executed by a digital processor in any one of the digital processing circuits shown in fig. 1 to fig. 3. As shown in fig. 4, the method includes:
s101, detecting an interrupt signal at a preset timing interval.
A timer in the digital processor is timed out, and the digital processor can perform relevant control operation on the latch during the timed out period. Therefore, it is necessary to detect an interrupt signal. It is worth noting that the interrupt duration of the digital processor is determined by the time of production, e.g., 1 millisecond.
S102, if the interrupt signal is detected, configuring N2 data bus pins of the digital processor as output pins.
When the interrupt signal is detected, it indicates that the digital processor can perform the control operation. When the digital processor is used for controlling the device to be controlled through N1 output latches, N2 data bus pins of the digital processor are configured as output pins. And connecting N2 data bus pins with output latches corresponding to the equipment to be controlled through a data bus for data transmission. It should be noted here that each device to be controlled maintains a connection relationship with its corresponding output latch, and it is ensured that the device to be controlled can be controlled in real time through the output latch.
S103, assigning values to N2 data bus pins of the digital processor respectively, and performing signal control on corresponding equipment to be controlled through a first output latch in the N1 output latches.
And when N2 data bus pins of the digital processor are successfully connected with the first output latch through the data bus. The digital processor assigns values to N2 data bus pins of the digital processor respectively, transmits the control signal to the first output latch through the data bus, and the first output latch transmits the control signal to the equipment to be controlled corresponding to the first output latch, so that the corresponding equipment to be controlled is controlled. For example, N2 data buses of the digital processor may control N2 devices to be controlled simultaneously.
And S104, assigning values to N2 data bus pins of the digital processor again, and performing signal control on corresponding equipment to be controlled through a second output latch in the N1 output latches until the number of the controlled equipment reaches a preset control number threshold.
And after the signal control of the equipment to be controlled corresponding to the first output latch is finished, the connection between N2 data bus pins of the digital processor and the first output latch is cancelled. Then, the N2 data bus pins of the digital processor are connected to the second output latch through the data bus. And the digital processor assigns the N2 data bus pins of the digital processor again, transmits the control signal to the second output latch through the data bus, and transmits the control signal to the equipment to be controlled corresponding to the second output latch through the second output latch, so that the corresponding equipment to be controlled is controlled through signals.
And the digital processor is sequentially connected with the output latches connected with the equipment to be controlled in the N1 output latches to complete signal control on all the equipment to be controlled.
For example, N2 data bus pins of the digital processor may control N2 devices to be controlled simultaneously through the output latches, and the output latches are N1, so that the N2 data buses of the digital processor may control at most (N1 × N2) devices to be controlled through the N1 output latches. And a pin can control a plurality of signals through a conventional digital processor, so that the pin resource is saved, and meanwhile, only N2 data buses are needed, so that the control cost is saved.
In summary, the signal processing method provided in the embodiment of the present application detects an interrupt signal at a preset time interval; if the interrupt signal is detected, configuring N2 data bus pins of the digital processor as output pins; assigning N2 data bus pins of the digital processor respectively, and performing signal control on corresponding equipment to be controlled through a first output latch in N1 output latches; and assigning the N2 data bus pins of the digital processor again, and performing signal control on the corresponding equipment to be controlled through a second output latch in the N1 output latches until the number of the controlled equipment reaches a preset control number threshold. Therefore, one pin can control multiple signals through a conventional digital processor, so that the pin resource is saved, the cost of the digital processor is saved, and the number of data buses is saved.
On the basis of the above fig. 4, the embodiment of the present application further provides a signal control method. Fig. 5 is a flowchart illustrating a signal control method according to an embodiment of the present application. As shown in fig. 5, in S103, assigning values to N2 data bus pins of the digital processor, and performing signal control on the corresponding device to be controlled through a first output latch of the N1 output latches, includes:
s201, assigning N2 data bus pins of the digital processor respectively to obtain N2 output data.
And the digital processor assigns the N2 data bus pins of the digital processor respectively according to the control requirement to obtain N2 output data, and the output data comprises a control signal.
S202, sending a first latch chip selection signal to a control pin of the first output latch, so that the first output latch latches the N2 output data.
And sending a first latch chip selection signal to a control pin of the first output latch, so that the first output latch latches the N2 output data, namely the currently input data of the input pin can be immediately latched to the latch and cannot be output. After the first latch chip selection signal is sent out and the first preset time is delayed, the next operation is carried out, the first preset time is longer than or equal to the preset transmission time of the digital processor and the output latch, the transmission and the latching of N2 output data can be completed within the first preset time, and the N2 output data are collected in the latch.
S203, sending a first latch access chip removal selection signal to a control pin of the first output latch, so that the first output latch removes a latch function, and respectively performing signal control on N2 devices to be controlled based on N2 output data.
And after the first latch chip selection signal is sent out, a first latch access chip removal selection signal is sent to a control pin of the first output latch after delaying for a first preset time. At this point, N2 output data have completed the acquisition within the latch. And then sending a first latch access chip removal selection signal to a control pin of the first output latch so that the first output latch cancels the latch function, and the digital signal of the output pin of the first output latch changes along with the change of the digital signal of the input pin. And transmitting the N2 output data to the N2 devices to be controlled, and respectively carrying out signal control on the N2 devices to be controlled.
In summary, in the signal control method provided in the embodiment of the present application, N2 data bus pins of a digital processor are respectively assigned to obtain N2 output data; sending a first latch chip selection signal to a control pin of a first output latch so that the first output latch latches the N2 output data; and sending a first latch access deselection signal to a control pin of the first output latch, so that the first output latch cancels the latching function, and respectively performing signal control on the N2 devices to be controlled based on the N2 output data. Therefore, signal control of the equipment to be controlled is completed in sequence, and pin cost and data bus cost are saved.
On the basis of the foregoing fig. 5, an embodiment of the present application further provides another signal control method. Fig. 6 is a flowchart illustrating another signal control method according to an embodiment of the present application. As shown in fig. 6, the method further includes:
s204, sending a first latch chip selection signal to a control pin of the first output latch, so that the first output latch only latches data and stops signal control on corresponding equipment to be controlled.
And after the signal control of the N2 devices to be controlled corresponding to the first output latch is finished. I.e. without the need for controlling the first output latch. And sending a first latch chip selection signal to a control pin of the first output latch, so that the first output latch only latches data and stops signal control on the corresponding equipment to be controlled.
On the basis of fig. 6, before sending the first latch chip select signal to the control pin of the first output latch in S204, so that the first output latch only latches data, the method further includes:
and after the first latch access chip selection signal is sent out, a first latch chip selection signal is sent to a control pin of the first output latch after the first latch access chip selection signal is delayed for a first preset time.
After the first latch access chip elimination selection signal is sent out, the digital signal of the output pin of the first output latch changes along with the change of the digital signal of the input pin, namely the first output latch outputs N2 output data, and the N2 devices to be controlled are respectively subjected to signal control based on the N2 output data. And N2 output data are provided, and the data are transmitted from the first output latch to the equipment to be controlled and the control is completed, but the data are not instantly completed and certain transmission and control time is needed, so that after the first preset time is needed to be delayed, the N2 output data are transmitted and the control is completed, and then the first latch chip selection signal is sent to the control pin of the first output latch. The first preset duration is greater than or equal to the preset transmission duration of the digital processor and the output latch.
On the basis of the above fig. 4, the embodiment of the present application further provides another signal processing method. Fig. 7 is a schematic flowchart of another signal processing method according to an embodiment of the present application. As shown in fig. 7, if the digital processing circuit further includes: n3 input latches, and after the number of controlled devices reaches the preset number threshold, the method further includes:
s301, configuring N2 data bus pins of the digital processor as input pins.
The digital processor may be connected to the input latch for detecting the device to be tested in addition to the output latch for controlling the device to be controlled. When the digital processor is used for detecting the equipment to be detected through the N3 input latches, N2 data bus pins of the digital processor are configured as output pins. And connecting the N2 data bus pins with the input latches corresponding to the equipment to be detected through the data bus for data transmission. It should be noted here that each device under test is connected to its corresponding input latch, so as to ensure that the device under test can be detected in real time through the input latch.
S302, signal detection is performed on the corresponding equipment to be detected sequentially through the input latches in the N3 input latches until the number of the equipment to be detected reaches a preset detection number threshold.
And after N2 data bus pins of the digital processor are successfully connected with the input latch through the data bus. The signal to be detected is transmitted to the input latch by the equipment to be detected, and then the signal to be detected is transmitted to the digital processor by the input latch, so that the corresponding equipment to be detected is subjected to signal detection. For example, N2 data buses of the digital processor may simultaneously detect N2 devices under test.
And after the signal control of the equipment to be detected corresponding to the first input latch is finished, the connection between N2 data bus pins of the digital processor and the first input latch is cancelled. Then, the N2 data bus pins of the digital processor are connected to the second input latch through the data bus. And the digital processor realizes signal detection on the corresponding equipment to be detected through the second input latch again.
And the digital processor is sequentially connected with the input latches of the equipment to be detected in the N3 input latches, and completes signal detection on all the equipment to be detected.
For example, N2 data bus pins of the digital processor may simultaneously detect N2 devices under test through the input latches, and N3 input latches, then the N2 data buses of the digital processor may detect up to (N3 × N2) devices under test through the N3 input latches. The conventional digital processor can detect a plurality of signals by one pin, so that the pin resource is saved, and meanwhile, only N2 data buses are needed, so that the detection cost is saved.
To sum up, in another signal processing method provided in the embodiment of the present application, N2 data bus pins of a digital processor are configured as input pins; and sequentially carrying out signal detection on the corresponding equipment to be detected through the input latches in the N3 input latches until the number of the detected equipment reaches a preset detection number threshold. Therefore, one pin can detect multiple signals through a conventional digital processor, so that the pin resource is saved, and meanwhile, only N2 data buses are needed, so that the detection cost is saved.
On the basis of fig. 7, another signal detection method is further provided in the embodiments of the present application. Fig. 8 is a schematic flowchart of another signal detection method according to an embodiment of the present application. In S302, sequentially performing signal detection on the corresponding device to be detected through the input latches of the N3 output latches, including:
s401, sending a second latch chip selection signal to a control pin of a preset input latch in the N3 input latches, so that the preset input latch latches N2 input data received by the input pin.
And sending a second latch chip selection signal to the control pin of the input latch, so that the input latch latches the N2 input data, namely the currently input data of the input pin is immediately latched to the latch and is not output. After the second latch chip selection signal is sent out and the second preset time is delayed, the next operation is carried out, the second preset time is longer than or equal to the preset transmission time of the digital processor and the input latch, the transmission and latching of N2 input data can be completed within the second preset time, and N2 output data are collected in the latch.
S402, sending a second latch cancellation chip selection signal to a control pin of the preset input latch, so that the preset input latch cancels a latch function, and respectively carrying out signal detection on N2 devices to be detected based on N2 input data.
And after the second latch chip selection signal is sent out, a second latch chip selection cancellation signal is sent to the control pin of the input latch after delaying for a second preset time. At this point, N2 input data have completed the acquisition within the latch. And sending a second latch cancellation chip selection signal to the control pin of the input latch so that the input latch cancels the latch function, and the digital signal of the output pin of the input latch changes along with the change of the digital signal of the input pin. And transmitting the N2 input data to a digital processor, and respectively carrying out signal detection on the N2 devices to be detected.
After the second latch chip selection canceling signal is sent out, the digital signal of the output pin of the first input latch changes along with the change of the digital signal of the input pin, namely the first input latch outputs N2 input data, and the N2 devices to be detected are respectively subjected to signal detection based on the N2 input data. And N2 input data are provided, and the data are transmitted from the first input latch to the digital processor and the detection is completed, but the data are not completed instantly, and certain transmission and detection time is needed, so that after the second preset time is needed to be delayed, the N2 input data are transmitted and the detection is completed, and then a second latch chip selection signal is sent to the control pin of the first input latch. And the second preset duration is greater than or equal to the preset transmission duration of the digital processor and the input latch.
And after the signal detection of the N2 devices to be detected corresponding to the first input latch is completed. I.e. without the need for controlling the first input latch. And sending a second latch chip selection signal to a control pin of the first input latch, so that the first input latch only latches data and stops signal detection on the corresponding device to be detected.
In summary, in another signal detection method provided in the embodiment of the present application, a second latch chip selection signal is sent to a control pin of a preset input latch in N3 input latches, so that the preset input latch latches N2 input data received by the input pin; and sending a second latch cancellation chip selection signal to a control pin of the preset input latch, so that the preset input latch cancels the latch function, and respectively carrying out signal detection on N2 devices to be detected based on N2 input data. Therefore, signal detection of the equipment to be detected is completed in sequence, and pin cost and data bus cost are saved.
The following describes a signal processing apparatus, a digital processor, a storage medium, and the like for implementing the present application, and specific implementation procedures and technical effects thereof are referred to above, and will not be described again below.
Fig. 9 is a schematic diagram of a signal processing apparatus according to an embodiment of the present disclosure, and as shown in fig. 9, the signal processing apparatus may include:
a detection module 901, configured to detect an interrupt signal at a preset time interval;
a configuration module 902, configured to configure N2 data bus pins of the digital processor as output pins if the interrupt signal is detected;
the first control module 903 is configured to assign values to N2 data bus pins of the digital processor, and perform signal control on a corresponding device to be controlled through a first output latch of the N1 output latches;
and the second control module 904 is configured to re-assign values to N2 data bus pins of the digital processor, and perform signal control on the corresponding device to be controlled through a second output latch of the N1 output latches until the number of controlled devices reaches a preset control number threshold.
Further, the first control module 903 is specifically configured to assign values to N2 data bus pins of the digital processor, respectively, to obtain N2 output data; sending a first latch chip selection signal to a control pin of a first output latch so that the first output latch latches N2 output data; and sending a first latch access deselection signal to a control pin of the first output latch, so that the first output latch cancels the latching function, and respectively performing signal control on the N2 devices to be controlled based on the N2 output data.
Further, the first control module 903 is specifically configured to send a first latch chip selection signal to a control pin of the first output latch, so that the first output latch only performs data latch and stops performing signal control on the corresponding device to be controlled.
Further, the first control module 903 is specifically configured to send the first latch chip select signal to the control pin of the first output latch after the first latch access chip select signal is sent out and a first preset time is delayed, where the first preset time is greater than or equal to a preset transmission time of the digital processor and the output latch.
Further, the second control module 904 is specifically configured to configure N2 data bus pins of the digital processor as input pins; and sequentially carrying out signal detection on the corresponding equipment to be detected through the input latches in the N3 input latches until the number of the detected equipment reaches a preset detection number threshold.
Further, the second control module 904 is specifically configured to send a second latch chip selection signal to a control pin of a preset input latch of the N3 input latches, so that the preset input latch latches N2 input data received by the input pin; and sending a second latch cancellation chip selection signal to a control pin of the preset input latch, so that the preset input latch cancels the latch function, and respectively carrying out signal detection on the N2 devices to be detected based on the N2 input data.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. As another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 10 is a schematic diagram of a digital processor according to an embodiment of the present application, where the digital processor may be an apparatus with a computing processing function.
The digital processor includes: a processor 1001, and a storage medium 1002. The processor 1001 and the storage medium 1002 are connected by a bus.
The storage medium 1002 is used for storing a program, and the processor 1001 calls the program stored in the storage medium 1002 to execute the above-described method embodiment. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, the invention also provides a program product, for example a computer-readable storage medium, comprising a program which, when being executed by a processor, is adapted to carry out the above-mentioned method embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other media capable of storing program codes.

Claims (8)

1. A digital processing circuit, wherein the digital processing circuit comprises: the digital processing unit comprises a digital processor and N1 output latches, wherein N2 data bus pins of the digital processor are respectively connected with N2 input pins of each output latch, N1 first input and output pins of the digital processor are also respectively connected with control pins of the N1 output latches, and N2 output pins of each output latch are used for respectively connecting with input ends of N2 devices to be controlled so as to perform signal control on the N2 devices to be controlled;
wherein N1 and N2 are integers which are more than or equal to 1;
the digital processing circuit further comprises: the N2 input pins of each input latch are used for being respectively connected with the output ends of N2 devices to be detected so as to detect signals of the N2 devices to be detected;
wherein N3 is an integer greater than or equal to 1.
2. The circuit of claim 1, wherein the first input-output pin and/or the second input-output pin is: a general purpose input output pin.
3. The circuit according to any of claims 1-2, wherein the digital processor is a micro control unit or a digital signal processor.
4. A signal processing method, for use in a digital processor in a digital processing circuit as claimed in any one of claims 1 to 3; the method comprises the following steps:
detecting an interrupt signal at a preset timing interval;
if the interrupt signal is detected, configuring N2 data bus pins of the digital processor as output pins;
assigning values to N2 data bus pins of the digital processor respectively, and performing signal control on corresponding equipment to be controlled through a first output latch in the N1 output latches;
assigning N2 data bus pins of the digital processor again, and performing signal control on corresponding equipment to be controlled through a second output latch of the N1 output latches until the number of controlled equipment reaches a preset control number threshold;
configuring N2 data bus pins of the digital processor as input pins;
and sequentially carrying out signal detection on the corresponding equipment to be detected through the input latches in the N3 input latches until the number of the detected equipment reaches a preset detection number threshold.
5. The method of claim 4, wherein assigning values to N2 data bus pins of the digital processor and controlling signals of corresponding devices to be controlled through a first output latch of the N1 output latches comprises:
assigning values to N2 data bus pins of the digital processor respectively to obtain N2 output data;
sending a first latch chip selection signal to a control pin of the first output latch, so that the first output latch latches the N2 output data;
and sending a first latch access chip removal selection signal to a control pin of the first output latch, so that the first output latch cancels the latch function, and respectively performs signal control on N2 devices to be controlled based on the N2 output data.
6. The method of claim 5, further comprising:
and sending the first latch chip selection signal to a control pin of the first output latch, so that the first output latch only latches data and stops signal control on corresponding equipment to be controlled.
7. The method of claim 6, wherein prior to sending the first output latch control pin the first latch chip select signal, the method further comprises:
after the first latch access chip elimination selection signal is sent, the first latch access chip elimination signal is sent to a control pin of the first output latch after a first preset time is delayed, wherein the first preset time is longer than or equal to the preset transmission time of the digital processor and the output latch.
8. The method of claim 4, wherein sequentially passing through input latches of the N3 input latches for signal detection of the corresponding device under test comprises:
sending a second latch chip selection signal to a control pin of a preset input latch in the N3 input latches, so that the preset input latch latches N2 input data received by the input pin;
and sending a second latch cancellation chip selection signal to a control pin of the preset input latch, so that the preset input latch cancels the latch function, and respectively carrying out signal detection on N2 devices to be detected based on the N2 input data.
CN202210466630.2A 2022-04-27 2022-04-27 Digital processing circuit and signal processing method Active CN114860630B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210466630.2A CN114860630B (en) 2022-04-27 2022-04-27 Digital processing circuit and signal processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210466630.2A CN114860630B (en) 2022-04-27 2022-04-27 Digital processing circuit and signal processing method

Publications (2)

Publication Number Publication Date
CN114860630A CN114860630A (en) 2022-08-05
CN114860630B true CN114860630B (en) 2023-04-18

Family

ID=82635490

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210466630.2A Active CN114860630B (en) 2022-04-27 2022-04-27 Digital processing circuit and signal processing method

Country Status (1)

Country Link
CN (1) CN114860630B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0417748A2 (en) * 1989-09-11 1991-03-20 Kabushiki Kaisha Toshiba Interrupt control circuit for use in 1-chip microcomputer
US5421027A (en) * 1991-08-12 1995-05-30 Motorola, Inc. Method and apparatus for generating a pin interrupt request in a digital data processor using a dual function data direction register
CN1858725A (en) * 2006-05-31 2006-11-08 威盛电子股份有限公司 Interrupt controller, interrupt signal pretreating circuit and its interrupt control method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040006664A1 (en) * 2002-07-02 2004-01-08 Amir Helzer System and method for efficient chip select expansion
CN101266589B (en) * 2008-04-18 2010-09-08 北京佳讯飞鸿电气股份有限公司 Method for processor accessing external equipment and device thereof
TWI397855B (en) * 2008-05-07 2013-06-01 Sunplus Mmedia Inc Method for reducing pin counts and microprocessor using the same
CN203732914U (en) * 2013-12-02 2014-07-23 昌辉汽车电气系统(安徽)有限公司 Vehicle body control module
CN209281212U (en) * 2019-02-25 2019-08-20 上海伟世通汽车电子系统有限公司 A kind of number I/O expanded circuit
CN110568804B (en) * 2019-10-11 2024-09-13 深圳市道通智能航空技术股份有限公司 Microprocessor pin expansion circuit, battery balance control circuit and unmanned aerial vehicle
CN210721103U (en) * 2019-11-21 2020-06-09 南京南瑞继保电气有限公司 Circuit structure for realizing multi-path output control of single processor
CN111025991A (en) * 2019-12-25 2020-04-17 深圳万讯自控股份有限公司 High-density signal input and output circuit and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0417748A2 (en) * 1989-09-11 1991-03-20 Kabushiki Kaisha Toshiba Interrupt control circuit for use in 1-chip microcomputer
US5421027A (en) * 1991-08-12 1995-05-30 Motorola, Inc. Method and apparatus for generating a pin interrupt request in a digital data processor using a dual function data direction register
CN1858725A (en) * 2006-05-31 2006-11-08 威盛电子股份有限公司 Interrupt controller, interrupt signal pretreating circuit and its interrupt control method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
阳光.一种使用锁存器和门电路实现开关量变位信号采集的方法.吉林电力.2000,(第06期),全文. *

Also Published As

Publication number Publication date
CN114860630A (en) 2022-08-05

Similar Documents

Publication Publication Date Title
CN103714029A (en) Novel two-line synchronous communication protocol and application
JP2012506091A (en) Interrupt approval in data processing systems
CN111338662A (en) Firmware upgrading method and device for slave station and terminal
CN112996020B (en) Bluetooth-based automatic test method and device and Bluetooth test terminal
US20210072979A1 (en) System For Online Cascaded Loading Firmware Based On Boundary Scan And Method Thereof
CN111966189A (en) Flexibly configured multi-computing-node server mainboard structure and program
US9317639B1 (en) System for reducing power consumption of integrated circuit
US6636100B1 (en) Can controller and one-chip computer having a built-in can controller
CN110968352A (en) PCIE equipment resetting system and server system
CN116069701A (en) PCIE resource identification method, device, equipment and storage medium
CN114860630B (en) Digital processing circuit and signal processing method
CN105808476B (en) Cross-clock-domain data transmission method and device
CN113946480A (en) Detection device and method for I2C bus
CN115643160A (en) Data acquisition method, device, equipment and medium based on daisy chain communication
CN115629926A (en) Control system, method and device based on joint test group JTAG interface
CN113596189B (en) Parallel addressing method, battery pack and parallel addressing system
CN114425787A (en) Control method and device for robot automatic test, server and storage medium
CN112463498A (en) Hardware module testing method, system, electronic device and storage medium
CN115599722B (en) Method and device for realizing accurate transmission of serial port data based on kernel of operating system
CN111638905A (en) Version number generation method and device, electronic equipment and readable storage medium
US6795010B1 (en) Techniques for pausing and resuming analog-to-digital signal conversion
CN104932854B (en) A kind of information processing method and electronic equipment
CN107632958B (en) Signal processing device and system
CN117520242A (en) Communication method, communication device, electronic equipment and readable storage medium
CN117033276B (en) Bus communication method, system, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 518000 area 501A, building 15, Yijing company, 1008 Songbai Road, sunshine community, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen Lorentz Technology Co.,Ltd.

Address before: 518000 area 501A, building 15, Yijing company, 1008 Songbai Road, sunshine community, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN LORENTZ TECHNOLOGY Co.,Ltd.