Created
January 14, 2025 11:01
-
-
Save Jay-davisphem/d286788b11584b4d3e4f7c59ec948987 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library IEEE; | |
use IEEE.STD_LOGIC_1164.ALL; | |
entity WeatherStation is | |
Port ( | |
switches : in STD_LOGIC_VECTOR(1 downto 0); -- Two switches | |
lcd_data : out STD_LOGIC_VECTOR(7 downto 0) -- Data sent to LCD | |
); | |
end WeatherStation; | |
architecture Behavioral of WeatherStation is | |
begin | |
process(switches) | |
begin | |
if switches(0) = '1' then | |
lcd_data <= "00110101"; -- Simulated Temp: 25°C (in binary) | |
else | |
lcd_data <= "00000000"; -- Default: 0°C | |
end if; | |
end process; | |
end Behavioral; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment