Concentrator device of pulse counting agreement

文档序号:118272 发布日期:2021-10-19 浏览:29次 中文

阅读说明:本技术 一种脉冲计数协议的集线器装置 (Concentrator device of pulse counting agreement ) 是由 张伟 于 2021-03-15 设计创作,主要内容包括:本发明提供了一种脉冲计数协议的集线器装置,包括多组定时器电路,脉冲计数器、温度寄存器、温度高阈值寄存器、温度低阈值寄存器、温度热限寄存器,还包括温度比较电路,接口电路,和8位OTP单元。本发明可以16个通道独立地获取多监控点的温度,一旦温度超过预先设置的温度值,就会发生ALT或THM报警信号,供上位机MCU通过SMBus总线读取温度值和温度状态值。本发明可以解决MCU连接多颗脉冲计数温度芯片时,MCU的定时器资源和中断资源短缺,造成无法读取温度的值的问题。本发明中最多可以级联4080颗脉冲温度传感器,同时转换温度具有响应优点且同步,减少MCU使用数目而具有显著的经济效益。(The invention provides a hub device of a pulse counting protocol, which comprises a plurality of groups of timer circuits, a pulse counter, a temperature register, a temperature high threshold register, a temperature low threshold register and a temperature thermal limit register, and also comprises a temperature comparison circuit, an interface circuit and an 8-bit OTP unit. The invention can independently obtain the temperature of multiple monitoring points through 16 channels, and once the temperature exceeds the preset temperature value, an ALT or THM alarm signal can be generated for an upper computer MCU to read the temperature value and the temperature state value through an SMBus bus. The invention can solve the problem that the temperature value cannot be read due to the shortage of timer resources and interrupt resources of the MCU when the MCU is connected with a plurality of pulse counting temperature chips. At most 4080 pulse temperature sensors can be cascaded in the invention, and the temperature conversion has the advantages of response, synchronization and obvious economic benefit by reducing the use number of MCUs.)

1. A hub device of a pulse counting protocol, comprising a timer circuit, a pulse counter, a temperature register, a temperature high threshold register, a temperature low threshold register, a temperature hot limit register, a temperature comparison circuit, an interface circuit, an OTP unit and an alarm module, wherein:

the timer circuit outputs a high level and a low level;

during the high level period of the pulse counter, the counter PAccReg circuit carries out accumulated counting; during the low level, outputting the value of the PaccReg and restoring the initial value;

the temperature register receives the value of the PACCReg during the low level period and outputs the value to the interface circuit;

the temperature comparison circuit compares the values of the temperature high threshold register, the temperature low threshold register, the temperature thermal limit register and the temperature register and obtains a result;

the temperature register, the temperature high threshold value register, the temperature low threshold value register and the temperature thermal limit register are in communication connection with the interface circuit and the OTP unit.

2. The pulse counting protocol hub device according to claim 1, further comprising an alarm module for determining whether to alarm according to the result of the temperature comparison circuit.

3. The pulse counting protocol hub device of claim 1, wherein there are multiple sets of timer circuit, pulse counter, temperature register, temperature high threshold register, temperature low threshold register, and temperature hot limit register.

4. The pulse counting protocol hub device of claim 1, wherein the timer circuit outputs a high level through an open drain circuit every Tms after powering up, and then outputs a low level for 5 ms.

5. The pulse counting protocol hub device of claim 1,

if the value of the temperature register is higher than the preset value of the high threshold value register, the corresponding TempHighStatus bit is 1, otherwise, the corresponding TempHighStatus bit is 0;

if the value of the temperature register is lower than the preset value of the low threshold register, the bit of the corresponding TempLowStatus is 1, otherwise, the bit is 0.

6. The pulse counting protocol hub device of claim 5, wherein the ALT alarm signal is triggered when TempHighStatus and TempLowStatus are 1; the ALT alarm signal is ended when TempHighStatus and TempLowStatus are automatically cleared.

7. The pulse counting protocol hub device of claim 1, wherein the value of the corresponding TemptHmstatus becomes 1 if the value of the temperature register is higher than the value of the thermal limit register, and the value of the corresponding TemptHmstatus becomes 0 if the value of the temperature register is lower than the value of the thermal limit-hysteresis register.

8. The pulse counting protocol hub device according to claim 7, wherein when TempTHMStatus is 1, a THM alarm signal is triggered; when TempTHMStatus is 0, the THM alarm signal is released.

9. The pulse counting protocol hub device according to claim 1, wherein the hub device is connected to an upper computer through an SMBus bus.

10. The pulse counting protocol hub device according to claim 9, wherein when the hub device triggers an alarm, the upper computer reads a temperature value of the hub device through the SMBus bus.

Technical Field

The invention relates to the technical field of electronic communication, in particular to a concentrator device of a pulse counting protocol.

Background

When a plurality of pulse counting chips are connected with the MCU, due to the limitation of interrupt resources (2-4) and timer resources (3-8), other components also need to be used, so that the resources left for temperature monitoring are not large, and only 2 temperature points can be monitored. So that the temperature monitoring is not comprehensive, and the equipment is abnormal. Often expending a great deal of manpower to inspect and maintain the equipment.

The invention patent of patent document CN103426271B discloses an electrical fire monitor with pulse metering and a method for implementing the same, wherein the electrical fire monitor comprises an electrical fire monitor which comprises a residual current sampling unit, a temperature sampling unit, a three-phase voltage sampling unit, a three-phase current sampling unit, a 4-circuit sampling signal filtering unit, a 3-circuit pulse input unit, a 3-circuit pulse output unit, a processor, a display, a memory, an indicator light, a key unit, an RS485 serial communication unit, an external clock unit and a power supply unit. The electric fire monitor with pulse metering and the implementation method thereof can not only collect data of parameters related to electric fire, but also measure various energy parameters in a pulse metering mode, enrich the functions of the electric fire monitor and simplify the equipment structure, thereby meeting various requirements of users. But the above scheme cannot realize the multi-channel monitoring function.

Disclosure of Invention

In view of the deficiencies in the prior art, it is an object of the present invention to provide a hub device for a pulse counting protocol.

The hub device of the pulse counting protocol provided by the invention comprises a timer circuit, a pulse counter, a temperature register, a temperature high threshold register, a temperature low threshold register, a temperature thermal limit register, a temperature comparison circuit, an interface circuit, an OTP unit and an alarm module, wherein:

the timer circuit outputs a high level and a low level;

during the high level period of the pulse counter, the counter PAccReg circuit carries out accumulated counting; during the low level, outputting the value of the PaccReg and restoring the initial value;

the temperature register receives the value of the PACCReg during the low level period and outputs the value to the interface circuit;

the temperature comparison circuit compares the values of the temperature high threshold register, the temperature low threshold register, the temperature thermal limit register and the temperature register and obtains a result;

the temperature register, the temperature high threshold value register, the temperature low threshold value register and the temperature thermal limit register are in communication connection with the interface circuit and the OTP unit.

Preferably, the temperature comparison circuit further comprises an alarm module, and the alarm module judges whether to alarm or not according to the result of the temperature comparison circuit.

Preferably, the timer circuit, the pulse counter, the temperature register, the temperature high threshold register, the temperature low threshold register and the temperature thermal limit register are provided with a plurality of groups.

Preferably, the timer circuit outputs a high level through an open drain circuit every Tms after power-up and then outputs a low level for 5 ms.

Preferably, if the value of the temperature register is higher than the preset value of the high threshold register, the bit of the corresponding TempHighStatus is 1, otherwise, it is 0;

if the value of the temperature register is lower than the preset value of the low threshold register, the bit of the corresponding TempLowStatus is 1, otherwise, the bit is 0.

Preferably, when TempHighStatus and TempLowStatus are 1, triggering ALT alarm signal; the ALT alarm signal is ended when TempHighStatus and TempLowStatus are automatically cleared.

Preferably, if the value of the temperature register is higher than the value of the thermal limit register, the value of the corresponding TempTHMStatus becomes 1, and if the value of the temperature register is lower than the value of the thermal limit — hysteresis register, the value of the corresponding TempTHMStatus becomes 0.

Preferably, when the TemptHMStatus is 1, triggering a THM alarm signal; when TempTHMStatus is 0, the THM alarm signal is released.

Preferably, the hub device is connected with the upper computer through an SMBus bus.

Preferably, when the hub device triggers an alarm, the upper computer reads the temperature value of the hub device through the SMBus bus.

Compared with the prior art, the invention has the following beneficial effects:

1. the invention can realize independent acquisition of the temperature of multiple monitoring points by up to 16 channels, and has wide application.

2. The invention sets an alarm signal, and when a detection point is abnormal, the upper computer can read a temperature value and a temperature state value.

3. The invention can solve the problem that the temperature value cannot be read due to the shortage of timer resources and interrupt resources of the MCU when the MCU is connected with a plurality of pulse counting temperature chips. At most 4080 pulse temperature sensors can be cascaded in the invention, and the temperature conversion has the advantages of response, synchronization and obvious economic benefit by reducing the use number of MCUs.

Drawings

Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:

FIG. 1 is a schematic diagram of an SOP and QFN package of the present invention.

Fig. 2 is a schematic diagram of the application of the present invention.

Fig. 3 is a schematic view of the internal structure of the present invention.

FIG. 4 is a diagram of an example of a waveform for a Dn port of the present invention.

FIG. 5 illustrates a connection scheme for a super multi-hub in accordance with the present invention

Detailed Description

The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.

As shown in fig. 1 to 5, the hub device of a pulse counting protocol according to the present invention includes 16 sets of timer circuits, 16 sets of pulse counters, 16 sets of temperature registers, 16 sets of temperature high threshold registers, 16 sets of temperature low threshold registers, 16 sets of temperature thermal limit registers, a temperature comparison circuit, an interface circuit and an 8-bit OTP unit for recording HubDevice. The invention can independently obtain the temperature of multiple monitoring points through 16 channels, and once the temperature exceeds the preset temperature value, an ALT or THM alarm signal can be generated for an upper computer MCU to read the temperature value and the temperature state value through an SMBus bus.

The timer circuit outputs a high level through the open drain circuit every Tms after power-up and then outputs a low level for 5 ms. And the temperature chip of the external pulse technology protocol starts temperature conversion after receiving the high level and outputs a series of pulses representing the temperature value. The low voltage of the pulse has a time Tlowus, time of high voltage Thighus。

During the period that the open drain circuit outputs high level, the pulse counter is accumulated by the counter PAccReg circuit, the data bit width is 13, and the initial value is 13' h1CE 0. Each pulse, PAccReg ═ PAccReg + 1' b 1; during the period when the open drain circuit outputs a low level, the value of PAccReg is output and then restored to the initial value.

The temperature register receives the value of PAccReg every time the open drain circuit outputs a low level, and does not receive the value at other times. And simultaneously output to the interface circuit.

The high threshold value register and the temperature low threshold value register compare the value of the temperature register with the value of the high threshold value register and compare the value of the temperature register with the value of the low threshold value register each time the temperature register is updated. If the temperature is higher than the preset value of the high threshold register, the corresponding TempHighStatus bit is 1, otherwise, the corresponding TempHighStatus bit is 0; if the temperature is lower than the preset value of the low threshold register, the bit of the corresponding TempLowStatus is 1, otherwise, the bit is 0.

When TempHighStatus and TempLowStatus are 1, the ALT can be pulled down to send an ALT alarm signal, and the MCU can receive the interruption, so that the reading action of the SMBus is triggered, the values of TempHighStatus and TempLowStatus are read, and the temperature state is checked. At this time, TempHighStatus and TempLowStatus are automatically cleared. ALT ends the pull-down state and ALT alarm ends.

The value of the temperature register is compared with the value of the temperature hot limit register each time the temperature register is updated, if the temperature is higher than the value of the hot limit register, the value of the corresponding TempthStatus becomes 1, and if the temperature is lower than the value of the hot limit-hysteresis register, the value of the corresponding TempthStatus becomes 0.

When TempTHMStatus has 1, THM can be pulled down, a THM alarm signal is started, and the MCU receives the interruption, so that a system alarm signal and the reading action of the SMBus are triggered.

The SMBus bus reads SMBus write registers and SMBus read registers, which contain the following two formats. The contents of the 2 nd byte are the HubDevice's extension byte, used to address hubs on the SMBus bus (when there are more than one connected applications as in FIG. 5). When HubDevice equals 8' h00, it indicates that all burst hubs on the SMBus bus will accept this command to write to the register and read from the register. When HubDevice is not equal to 8' h00, it indicates that a particular hub burst on the SMBus bus is accessed.

SMBus write register format

SMBus read register format

The register data format meets the 16-bit format, the access addresses of the SMBus are as follows, and the read-write performance is as follows:

further, the present invention provides a hub device of pulse counting protocol, which comprises: 16 sets of timer circuits, 16 sets of pulse counters, 16 sets of temperature registers, 16 sets of temperature high threshold registers, 16 sets of temperature low threshold registers, 16 sets of temperature hot limit registers, a temperature comparison circuit, an interface circuit and an 8-bit OTP unit are used for recording HubDevice. Selecting 8 pulse hubs, using SMBus bus to connect pulse hubs individually, writing HubDevice to 8 'h 50 address, then WrHD to 8' h51 address, writing HubDevice to OTP unit. So that 8 burst hubs have different hubdevices. The 8 pulse hubs are connected as shown in fig. 5, and a total of 128 pulsed temperature sensor probes can be connected by connecting pulsed temperature sensor probes to the hubs. SCL is connected to GPIO1 of MCU, SDA is connected to GPIO2 of MCU, ALT and THM of 8-pulse hub are connected together, and are connected to GPIO3 and GPIO4 of MCU respectively.

The low voltage of the pulse has a time Tlow2us, high voltage time Thigh6 us. The hub has a duty cycle of 70 ms.

When the power is on, each pulse type temperature sensor can simultaneously convert the temperature and simultaneously compare with the corresponding high threshold value register, the temperature low threshold value register and the thermal limit register, so that the state register is updated. So that the MCU can know the temperature real-time state of the monitored object through interruption.

The invention can independently obtain the temperature of multiple monitoring points through 16 channels, and once the temperature exceeds the preset temperature value, an ALT or THM alarm signal can be generated for an upper computer MCU to read the temperature value and the temperature state value through an SMBus bus. The situation that the temperature point monitoring is not complete can be solved. The high threshold value register and the low threshold value register, and the thermal limit register can judge the temperature state in time, so that the program development of the MCU upper computer is saved, and only ALT and THM need to be detected and interrupted. The HubDevice in the SMBus bus protocol may facilitate the use of two wires to connect multiple hubs, allowing more pulse counting temperature sensors to be bridged. Up to 255 hubs (see fig. 5) can be connected, and 16 pulse technology sensors can be connected to each hub, so that the monitored point reaches 4080 temperature points. And 4080 temperature points can synchronously respond to temperature change at the same time.

The invention can receive the waveform of the pulse shown in fig. 4, the time of the low level is more than 100ns, and the time of the high level is more than 100ns, so that the temperature with the temperature range of-50-150 ℃ can be obtained within 640us at the shortest time. If some channels in the 16 groups of channels are not used, the corresponding bit can be set to 0 through the DEN register, so that part of timer circuits in the circuit are in an idle state, and power consumption is saved.

Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, units provided by the present invention as pure computer readable program code, the system and its various devices, modules, units provided by the present invention can be fully implemented by logically programming method steps in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system and various devices, modules and units thereof provided by the invention can be regarded as a hardware component, and the devices, modules and units included in the system for realizing various functions can also be regarded as structures in the hardware component; means, modules, units for performing the various functions may also be regarded as structures within both software modules and hardware components for performing the method.

The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种局域网接口装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类