Compare Module Design

Overview

The compare module takes in as input values from the sensor and the keypad. It compares the sensor's value (the current relative humidity) to the desired set value (from keypad). The output signal below signals whether the current humidity level is below the set value (below = 1 means we are below, below = 0 menas we are ok).


Compare Module Top Level VHDL Code

Comparator

A simple comparator that outputs a 1 if the sensor value is below the set value, 0 otherwise

Available documentation:
  • VHDL Code

    Registers

    Registers were required to hold the data coming in from the sensor and keypad modules for comparison. The register that holds the keypad input (set humidity level) is loaded with a preset value of 25% on system reset.

    Available documentation:
  • VHDL Code for 7-bit Register
  • VHDL Code for 7-bit Register with Preset

    External Signals

  • below - signals main state machine whether or not sensor value is below the set value
  • data_enable - signal from keypad that latches keypad data
  • freq_latch - signal from main state machine to latch sensor data
    Back to Design Index.
    Back to project home page.