Vhdl, Electrical Engineering

Assignment Help:
Im doing my final year project and Im stuck in vhdl coding. The main mission of this project is to design and build a tap changer which is going to be fitted to power transformers for regulation of the output voltage to required levels for the Micro Grid.
The tap changer system will consist of 9 changers with a 4v step having 9 switches/ Relays. 5 relays will be in the first stage, second stage consist of 3 relays, third stage has got 2 relays and the final stage has 1 relay. The voltage range of the tap changer 399- 431, Tap changer will perform step-up or step-down duties depending on what is requires. ( Tap1-399volts, Tap2 403volts, Tap3 407volts, Tap4 411volts, Tap5 415volts, Tap6 419volts, Tap7 423volts, Tap8 427volts, Tap9 2311volts. )
Im using vhdl programme to control the switches( switch1 to switch 9) using Spartan 3 board and displaying the selected switch on the board. I have written a bit of the the code which is at the bottom and im completely stuck I just need help in finishing the code and have attached the You are my last hope .

use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity UPDOWNCOUNTERHOLD is
Port ( Clock : in STD_LOGIC;
Reset : in STD_LOGIC;
-- Automatic : in STD_LOGIC;--- AUTOMATIC SELECTION
Tap_set : in STD_LOGIC;--- ACTIVATES THE TAP SELECTED
SW : in STD_LOGIC_VECTOR (8 downto 0);---- switch for Tap 1 up to 9
--SSG_input : in std_logic_vector(3 downto 0); -- input to seven segment display
Tap_Output: out STD_LOGIC_VECTOR (8 downto 0);-- Tap output
SSG_out : out STD_LOGIC_VECTOR (6 downto 0);--- SEVEN SEGMENT OUTPUT DISPLAY
AN0 : out STD_LoGIC);
end UPDOWNCOUNTERHOLD;

architecture Behavioral of UPDOWNCOUNTERHOLD is

Constant Max_tap :integer := 9;-- referance for the switches
signal Max_tap_vector:std_logic_vector(3 downto 0);
Signal Auto :STD_LOGIC;---- signal for Automatic
Signal Tap_select :STD_LOGIC;-----signal for Tap_set
Signal Switch :std_logic_vector(3 downto 0);----- signal for SW
Signal Tap_out :std_logic_vector(3 downto 0);----- signal for Tap_Output
Signal Seven_segment :std_logic_vector(6 downto 0);----- signal for the seven segment display
SIGNAL S_SW :std_logic_vector(3 DOWNTO 0);----- SIGANAL FOR SWITCH IN MAUNAL/TAP SELECT
BEGIN
PROCESS(Clock,Reset,Tap_set)

BEGIN

IF (Reset = ''1'') THEN

Tap_out <= "0001"; -- reset to tap 1
Seven_segment <= "1001111" ;-- reset it to display tap 1

ELSIF (rising_edge(Clock)) THEN

IF (Tap_set = ''1'') THEN

Tap_Out<= Switch; -- running on manual output depends on the tap switch which is on

end if;

IF (Tap_out > Max_tap) THEN ---- If the output is more than 9 reset

Tap_Out<= "0001"; --- reset to tap 1
Seven_segment <= "1001111" ;-- reset it to display tap 1

IF (conv_integer(Max_tap)) = Max_tap_vector then

--IF (conv_integer(Max_tap_vector)) = Max_tap then------converting interger
--OTHER_VECTOR<=(others =>''0'');
END IF;
END IF;
End if;
END PROCESS;
PROCESS(SW,Clock)
Begin
--S_SW <= SW(3 DOWNTO 0) ;
case SW is
when "0001"=>SSG_out<= "1001111";
when "0010"=>SSG_out<= "0010010";
when "0011"=>SSG_out<= "0000110";
when "0100"=>SSG_out<= "1001100";
when "0101"=>SSG_out<= "0100100";
when "0110"=>SSG_out<= "0100000";
when "0111"=>SSG_out<= "0001111";
when "1000"=>SSG_out<= "0000000";
when "1001"=>SSG_out<= "0000100";
--nothing is displayed when a number more than 9 is given as input.
when others =>SSG_out<="1111111" ;
end case ;
END PROCESS;
end Behavioral;
?

Related Discussions:- Vhdl

Determine dielectric materials are which type of materials, Dielectric mate...

Dielectric materials are (A) Insulating materials.        (B) Semiconducting materials. (C) Magnetic materials.         (D) Ferroelectric materials. Ans:

What is 16-bit isa, What is 16-bit ISA? Compare it with 8-bit ISA bus. ...

What is 16-bit ISA? Compare it with 8-bit ISA bus. The only difference among the 8 and 16-bit ISA bus is that other connector is attached behind the 8-bit connector. This 16-bi

Find the minimum sum of products, Given that , f(a,b,c,d,e) = Σm (6,7,9,11,...

Given that , f(a,b,c,d,e) = Σm (6,7,9,11,12,13,16,17,18,20,21,23,25,28) using a Karnaugh map. (i) Find the essential prime implicants (ii) Find the minimum sum of product

Determine the 60-hz resistance of line, Q A handbook lists the 60-Hz resist...

Q A handbook lists the 60-Hz resistance at 50°C of a 900-kcmil aluminumconductor as 0.1185/mile. If four such conductors are used in parallel to form a line, determine the 60-Hz r

Working of harmonic distortion analyzer, Q. Explain with the help of a bloc...

Q. Explain with the help of a block diagram the working of harmonic distortion analyzer. OR Write short note on Harmonic distortion analyzer. Sol. Several methods h

Determine the total energy loss, Determine the total energy loss: Two ...

Determine the total energy loss: Two capacitors C 1 = 50 μF and C 2 = 100 μF are connected in parallel across 250 V supply. Determine the total energy loss. Figure

Show the r-1s complement, Q. Show the r-1s Complement? Subtract eve...

Q. Show the r-1s Complement? Subtract every digit of the number from r-1 (the radix of the system - 1)ex.             952 10

Schrodinger’s wave equation, Discuss the degeneracy of energy of energy sta...

Discuss the degeneracy of energy of energy states. Solve the Schrodinger’s equation for a free particle in three dimensional boxes and find Eigen values and Eigen function of free

Transparent latch d flip flop, Transparent latch D flip  Flop A typica...

Transparent latch D flip  Flop A typical  example  of this  type of D flop  is 7475 shown  in figure when CLK  connected is enable signal is high and the flip  flop  is enabled

Analysis of financial plans, Complete the financial reporting for each peri...

Complete the financial reporting for each period and develop recommendations using the templates provided. Procedure 1.  Read the case study. 2.  Complete the financial re

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd