Professional Documents
Culture Documents
Electronic Voting Machine
Electronic Voting Machine
Project Report
ELECTRONIC VOTING MACHINE
The project aims to build an Electronic Voting Machine which takes three parties
into consideration and counts the votes of these parties and display the count of
these votes on seven segment display. Quartus version 13.0 is the synthesis tool
used and the code for this project is written in Verilog HDL.
WORKING METHODOLOGY
The voting machine is powered up using a switch “master_enable” .There is
another switch “en “ which allows the voters to cast their votes to the respective
parties, this enable is reset once the voter has cast his/ her vote thus indicating that
he can’t vote more than once. “en_led” is used to indicate whether the voter can
vote or not. There are three buttons for three different parties and three
corresponding LEDs for each for example LED_1 glows if party_1 gets the vote. If
the voter presses two buttons at a time corresponding to two parties, invalid LED
glows indicating invalid voting. The count is incremented upon the casting of
votes. The count of votes (maxmum:15) for each party is displayed on a pair of
seven segment display one indicating the LSB of votes and the other indicating the
MSB of votes ,So here six “seven segment displays” are used .
FLOWCHART OF CODE
It shows how the flow of code procedure and what processes are done at each step.
At clock signal
the process
starts.
If either of the
If both enable
enable inputs is
inputs are ON
zero
Check the
Turn ON enable Turn ON invalid
button pressed
led led
by the user
If more than
If only one key is
one keys are
pressed
pressed
Display the
count on seven
segment
RTL View
TTL View
WAVEFORM
CONCLUSION
This project helped us clear various concepts of Verilog including the
concepts of usage of push buttons, implementing behavior modelling
with the help of switch case, using clock to synchronize all the devices
and switches, etc. This project also taught us to use two seven segment
displays together to display a two digit number.
REFERENCES
1. S. Palnitkar, Verilog HDL: a guide to digital design and synthesis. Taipei, Taiwan: Sun/Pearson,
2009.
APPENDIX
Code [Verilog HDL]
module elect ( b1, b2, b3, led, master_enable, en, en_led, inval_led, s1, s2, s3, s4, s5, s6, clk );
initial
begin
ctr1 = 4'b0;
ctr2 = 4'b0;
ctr3 = 4'b0;
enable = 1'b0;
en_led = 1'b0;
led = 3'b000;
inval_led = 1'b0;
end
else begin
enable = 1'b0;
en_led = 1'b0;
led = 3'b000;
inval_led = 1'b0;
end