Verilog HDL code module is used to complete the temperature data threshold setting, comparison, and LED encoding output functions. The data processing module mainly obtains data from the data cache module and the system button control module. The 12-bit binary code provided by the data cache module is the real-time temperature code, and the data processing module compares the received data with the temperature threshold parameters saved in the register. When the conditions are met, the corresponding response operation is triggered. The system button control module modifies the temperature threshold parameters by inputting a low-level signal. The data processing module will promptly update the temperature threshold parameters after receiving the corresponding control signal for temperature comparison.

The main input ports of this module are: clock signal, reset signal, temperature increase, temperature decrease, temperature mode switch, and 12-bit temperature data register. The main output ports are: LED control signal, buzzer control signal, and 14-bit binary-coded decimal display signal.

Under normal circumstances, after receiving the temperature data transmitted by the previous level data cache, the data processing module first compares the data with the temperature threshold data saved in the EPCS4 register, including the upper and lower temperature limits. When the transmitted temperature data meets the temperature range of the threshold values, the data processing module completes the output of the display signal of the binary-coded decimal while maintaining the high level of the buzzer control signal and the periodic high and low level signal output of the LED control signal. When the transmitted temperature data exceeds the temperature range of the threshold values, the data processing module controls the I/O pin to output a low-level signal for the buzzer control signal to control the buzzer to sound through the hardware circuit's triode conduction. The LED signal line outputs a low-level signal to continuously light up the LED in case of alarm.

In the temperature threshold setting mode, the data processing module can switch to debugging mode by receiving a low-level signal. When the temperature switch input signal receives the first low-level signal, the data processing module waits for the upper limit data of the temperature threshold to be set, which is determined by the temperature increase and temperature decrease input signal lines. When the temperature switch input signal receives the second low-level signal, the data processing module waits for the lower limit data of the temperature threshold to be set, which is also determined by the temperature increase and temperature decrease input signal lines. Then the data processing module resets the counter to zero for the next temperature switch input signal control signal to come

Verilog HDL语言编写代码模块完成温度数据的阙值设置、比较、以及LED编码输出功能。数据处理模块的数据来源主要有数据缓存模块以及系统按键控制模块其中数据缓存模块提供的12位二进制码为实时温度转码数据处理模块将所收到的数据同预先保存在寄存器当中的温度阙值参数进行比较当条件满足时则触发相应响应操作。系统按键控制模块通过输入低电平信号对温度阙值参数进行修改数据处理模块会在收到相应控制信号之后及时

原文地址: https://www.cveoy.top/t/topic/eM5X 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录