Академический Документы
Профессиональный Документы
Культура Документы
IN THIS PROJECT WE SHOW THE NEW IDEA AND CONCEPT IN VOTING MACHINE. WITH THE HELP OF
THIS CONCEPT ANY VOTER CAST HIS VOTE FROM ANY PLACE WITH ANY PHONE.
TO ACTIVATE THIS SYSTEM IN REAL LIFE, WE MUST ISSUE ONE UNIQUE ID NUMBER TO EACH VOTER.
FIRST OF ALL PERSON DIAL THE NUMBER, AND PRESS THE HASH BUTTON FROM MOBILE OR LANDLINE.
AS VOTER PRESS THE HASH BUTTON, VOICE RESPONSE SYSTEM RESPOND WITH PREDEFINED MESSAGE
ON THE PHONE. WITH THE HELP OF VOICE COMMAND SYSTEM VOTER ENTER ITS UNIQUE ID AND
SYSTEM COMPARE THE ID WITH DATA BASE. IF THE DATA BASE IS EQUIPPED WITH THIS ID THE SYSTEM
DEMAND A PASSWORD. VOTER ENTER THE PASSWORD AND SYSTEM COMPARE THE PASSWORD. IF THE
PASSWORD IS OK THEN VOTER CAST A VOTE BY PRESSING A SWITCH OPTION.AS THE VOTER CAST THE
VOTE , CAST VOTE IS SAVE IN THE EXTERNAL MEMORY FOR STORAGE. AT THE RECEIVER END WE CHECK
THE TOTAL VOTE AND INDIVIDUAL VOTE BY PRESSING A SWITCH
.
COMPONENTS USED:
Diode == in 4007.
In this project we use total two diodes to convert AC into DC. As a full wave rectifier we must require a
centre tap Transformer with two diode as a rectifier. Output of the rectifier is further converted in
smooth dc with the help of capacitor filter. Capacitor converts the pulsating dc into smooth DC with the
help of charging and Discharging effect.
IC 7805.
IC 7805 regulator provide a regulated DC output from 9 volt AC. IC 7805 provide a constant 5 volt DC.
IC 8870:-- IC 8870 is a DTMF decode and provide a 4 bit output and connected to the controller
directly. Pin no 11,12,13,14 is connected to the pin no 14,15,16,17 of the controller. Pin no 15 of the
8870 is acknowledgement pin. Whenever 8870 decode the data then pin no 15 goes high and at this
time, this data is connected to the pin no 13 via NPN transistor.
IC 89S52:--
IC 89s52 is 40 Pin IC and family member of the 8051 controller. Pin no 40 of the controller is connected
to the positive 5 volt supply. Pin no 18 and 19 is connected to the external crystal oscillator to set a
machine cycle of the controller. Pin no 9 is reset pin and connected to external RC circuit to provide a
power reset automatically. All the manual switch is connected to the pin no 5,6,7,8,10,11,12 of the
controller to use as a manual check voting switch to check the total vote, individual vote for 4
candidate , memory clear password
.
IC 74154: IC 74154 is 4 bit to 16 pin decoder and use to extend the controller pins. IC 74154 is a 4 to
16 decoder and connected to the voice processor circuit. Output from the IC 74154 is connected to the
voice processor for voice response system
LCD : in this project we use 2 by 16 character to display all the message related to voting machine.
There is total 8 data lines for the data and 3 control line for the control bits.Pin no 39 to 32 is connected
to the 8 data lines and pin no 26,27,28 is connected to the RS,RW and Enable pin of the LCD display
Components used:
Step down transformer from 220 volt Ac to 9-0-9 ac. We use step down transformer to step down the
voltage from 220 to 9 volt ac. This AC is further connected to the rectifier circuit for AC to DC conversion.
DIODE.
In this project we use IN 4007 diode as a rectifier. IN 4007 is special diode to convert the AC into DC
In this project we use two diode as a rectifier. Here we use full wave
converts the pulsating dc into smooth dc and this DC is connected to the Regulator circuit for Regulated
5 volt DC.
Pin no 40 of the controller is connected to the positive supply. Pin no 20 is connected to the
ground. Pin no 9 is connected to external resistor capacitor to provide a automatic reset option
when power is on.
Reset Circuitry:
Pin no 9 of the controller is connected to the reset circuit. On the circuit we connect one resistor
This is not a big circuit we are just using a capacitor to charge the microcontroller and again
Pin no 18 and 19 is connected to external crystal oscillator to provide a clock to the circuit.
We can also resonators instead of costly crystal which are low cost and external capacitor can
be avoided.
But the frequency of the resonators varies a lot. And it is strictly not advised when used for
communications projects.
How is this time then calculated?
The speed with which a microcontroller executes instructions is determined by what is known as
the crystal speed. A crystal is a component connected externally to the microcontroller. The
crystal has different values, and some of the used values are 6MHZ, 10MHZ, and 11.059 MHz
etc.
Thus a 10MHZ crystal would pulse at the rate of 10,000,000 times per second.
10,000,000/12=833333.33333 cycles.
This means that in one second, the microcontroller would execute 833333.33333 cycles.
PIN NO 1 VSS GROUND
PIN NO 4 RS RS = 0 TO SELECT
1.1 VOTING
Voting is a method for a group such as a meeting or an electorate to make a decision or to
express an opinion often following discussions or debates.
1.1.1 Voting Techniques
In India all earlier elections be it state elections or centre elections a voter used to cast his/her
vote to his/her favorite candidate by putting the stamp against his/her name and then folding the ballot
paper as per a prescribed method before putting it in the Ballot box. This is a long, time-consuming
process and very much prone to errors.
This method wanted voters to be skilled voters to know how to put a stamp, and methodical
folding of ballot paper. Millions of paper would be printed and heavy ballot boxes would be loaded and
unloaded to and from ballot office to polling station. All this continued till election scene was completely
changed by electronic voting machine. No more ballot paper, ballot boxes, stamping, etc. all this
condensed into a simple box called ballot unit of the electronic voting machine.
Device type
Ballot paper : Papers and boxes
EVM : Embedded system with Assembly code
TVM : Embedded system with Assembly code
Visual Output
Ballot paper : Stamp on paper
EVM : Single LED against each candidate's name
TVM : LCD screen and one LED
Security Issues
Ballot paper : No security provided by the system, neither during polling nor
during voting.
EVM : During polling, a facility is provided to seal the machine in case
of booth capturing. No further voting can be done afterwards.
TVM : machine is disconnected from the telephone line. No more calls
can be received afterward.
Power Supply
Ballot paper : No power supply required.
EVM : 6V alkaline batteries or electricity.
TVM : Electricity and supply from exchange.
Capacity
Ballot paper : As much a ballot box can hold.
EVM : 3840 Votes.
TVM : Depends on the size of flash memory attached.
2.1 INTRODUCTION
These days almost all the electronic equipments include a circuit that converts AC supply into DC
supply. The part of equipment that converts AC into DC is known as AC to DC converter. In general, at
the input of the power supply is a transformer. It is followed by a rectifier, a smoothing filter and then by
a voltage regulator circuit.
A transformer in which the output (secondary) voltage is less than the input (primary) voltage is
called step down transformer. Alternating current is passed through the primary coil which creates the
changing magnetic field in iron core. The changing magnetic field then induces alternating current of
the same frequency in the secondary coil (the output). A step down transformer has more turns of wire
on the primary coil than in secondary coil which makes a smaller induced voltage in the secondary coil.
The transformer equation relates the number of turns of wire to the difference in voltage
between the primary and secondary coils.
Vp
/Vs = Np/Ns ...(2.1)
2.2.2 Rectifier
Rectifier is defined as an electronic device used for converting A.C voltage into unidirectional
voltage. A rectifier utilizes unidirectional conduction device like P-N junction diode.
2.2.3 Filter
The output from any of the rectifier circuits is not purely D.C but also has some A.C components,
called ripples, along it. Therefore such supply is not useful for driving sophisticated electronic
devices/circuits. Hence, it becomes essential to reduce the ripples from the pulsating D.C supply
available from rectifier circuits to the minimum. This is achieved by using a filter or smoothing circuit
which removes the A.C components and allows only the D.C component to reach the load. A filter circuit
should be placed between the rectifier and the load.
INPUT 7805
OUTPUT
GND
b. Ground:- This pin is connected to the ground of the circuit to which this 5V DC supply is provided.
c. Output:- If the input voltage at input pin is between 8-18V then at the output pin a stable 5V DC
voltage will be available.
7805 can give +5V output at about 150 mA current, but it can be increased to 1A when good cooling is
added to 7805 regulator chip.
The transformer supplies the source voltage for two diode rectifiers, D1 and D2. This
transformer has a center-tapped, low-voltage secondary winding that is divided into two equal parts
(W1 and W2). W1 provides the source voltage for D1, and W2 provides the source voltage for D2. The
connections to the diodes are arranged so that the diodes conduct on alternate half cycles. When the
center tap is grounded, the voltages at the opposite ends of the secondary windings are 180 degrees
out of phase with each other. Thus, when the voltage at point A is positive with respect to ground, the
voltage at point B is negative with respect to ground. Let's examine the operation of the circuit during
one complete cycle.
During the first half cycle (indicated by the solid arrows), the anode of D1 is positive with
respect to ground and the anode of D2 is negative. As shown, current flows from ground (center tap)
to point A, through diode D1 to point B and to point D. When D1 conducts, it acts like a closed switch
so that the positive half cycle is felt across the load (R L).
During the second half cycle (indicated by the dotted lines), the polarity of the applied voltage
has reversed. Now the anode of D2 is positive with respect to ground and the anode of D1 is negative.
Now only D2 can conduct. Current now flows, as shown, from point C to point B through diode D2 then
to point F and back to point D.
Now during both the cycles the capacitor C1 quickly charges to the peak voltage but when the
input voltage becomes less than peak voltage the capacitor discharges through load resistance and
loses charge. But because of large load resistance the discharging time is large and hence capacitor
does not have sufficient time to discharge appreciably. Due to this the capacitor maintains a
sufficiently large voltage across the load.
The voltage across the capacitor is applied to 7805 voltage regulator which provides a constant
5V D.C. voltage at its output.
Fig. 2.4 Output waveforms of centre-tap full-wave rectifier
CHAPTER 3
AUDIO RECORD AND PLAYBACK
3.1 INTRODUCTION
In Tele Voting Machine project we required that a pre-recorded message should be played when
the call is made to the number connected to the voting circuit. For this we are using APR 9600 single
chip audio recording and play back device.
3.2.1 Features
VSSD 12
VSSA 13
Positive Output for Speaker Connection: Should be connected
to the positive terminal of the output speaker. Total output
power is.1 W into 16 ohms. Do not use speaker loads lower
SP+ 14 than 8 ohms or device damage may result
Chip Select: A low level on this pin enables the device for
operation. Toggling this pin also resets several message
/CE 23
management features
On power up, the device is ready to record or play back, in any of the enabled message
segments. To record, /CE must be set low to enable the device and /RE must be set low to enable
recording. You initiate recording by applying a low level on the message trigger pin that represents the
message segment you intend to use. The message trigger pins are labeled /M1_Message - /M8_Option
on pins 1-9 (excluding pin 7) for message segments 1-8 respectively.
When actual recording begins the device responds with a single beep (if the BE pin is high to
enable the beep tone) at the speaker outputs to indicate that it has started recording. Recording
continues as long as the message pin stays low. The rising edge of the same message trigger pin during
record stops the recording operation (indicated with a single beep).
If the message trigger pin is held low beyond the end of the maximum allocated duration
recording stops automatically (indicated with two beeps), regardless of the state of the message trigger
pin. The chip then enters low-power mode until the message trigger pin returns high. After the message
trigger pin returns to high, the chip enters standby mode. Any subsequent high to low transition on the
same message trigger pin will initiate recording from the beginning of the same message segment. The
entire previous message is then overwritten by the new message, regardless of the duration of the new
message. Transitions on any other message trigger pin or the /RE pin during the record operation are
ignored until after the device enters standby mode.
5.1 INTRODUCTION
DTMF stands for Dual Tone Multi Frequency. In TVM we are required to convey the information
of phone key pressed by the voter to the microcontroller for further processing. DTMF receiver converts
the analog signal to digital signal that could be fed to the microcontroller through BCD decoder. In this
project we have used HT9170 series of DTMF receiver.
5.2.1 Features
Operating voltage: 2.5V~5.5V
Minimal external components
No external filter is required
Low standby current (on power down mode)
Excellent performance
Tristate data output for µC interface
3.58MHz crystal or ceramic resonator
1633Hz can be inhibited by the INH pin
HT9170D: 18-pin SOP package
5.2.2 Pin Configuration
Pull-high
RT/GT I/O CMOS IN/OUT Tone acquisition time and release time can
be set through connection with external
resistor
The HT9170 series tone decoders consist of three band pass filters and two digital decode
circuits to convert a tone (DTMF) signal into digital code output. The pre-filter is a band rejection filter
which reduces the dialing tone from 350Hz to 400Hz. The low group filter filters low group frequency
signal output whereas the high group filter filters high group frequency signal output. When each signal
amplitude at the output exceeds the specified level, it is transferred to full swing logic signal. When
input signals are recognized to be effective, DV becomes high, and the correct tone code (DTMF) digit is
transferred.
When one of the telephone set's buttons is pressed two tones are produced: One signifying the
row and the other the column. The frequencies are chosen thus that they don't contain harmonic
frequencies of each other. Normal human speech doesn't contain mixed frequencies that are stable for
a significant duration.
1 2 3 A 697
4 5 6 B 770
7 8 9 C 852
0 * # D 941
When the voltage of RT/GT changes from 0 to VTRT (2.35V for 5V supply), the input signal is
effective and the correct code will be created by the code detector. After D0~D3 are completely latched,
DV output becomes high. When the voltage of RT/GT falls down from VDD to VTRT (i.e.., when there is
no input tone), DV output becomes low, and D0~D3 keeps data until a next valid tone input is produced.
CHAPTER 6
BCD TO DECIMAL DECODER
6.1 INTRODUCTION
In TVM project DTMF output is fed to microcontroller through BCD to Decimal Decoder. For this
we selected DM74154 4-to-16 line decoder. It is 24 pin IC with 4 input lines and 16 output lines. In this
project we have used only 4 output line to cast vote to 4 different candidates.
6.2.1 Features
Table 6.1
H=High Level, L=Low Level, X=Don’t Care.
CHAPTER 7
MICROCONTROLLER 89S52
7.1 INTRODUCTION
7.2 FEATURES
Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers
can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high
by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are
externally being pulled low will source current (IIL) because of the internal pull-ups. In
addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count
input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively, as
shown in the following table. Port 1 also receives the low-order address bytes during
Flash programming and verification.
Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers
can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high
by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are
externally being pulled low will source current (IIL) because of the internal pull-ups. Port
2 emits the high-order address byte during fetches from external program memory and
during accesses to external data memory that use 16-bit addresses. In this application,
Port 2 uses strong internal pull-ups when emitting 1s.
Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers
can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high
by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are
externally being pulled low will source current (IIL) because of the pull-ups. Port 3
receives some control signals for Flash programming and verification. Port 3 also serves
the functions of various special features of the AT89S52, as shown in the following table.
RST Reset input. A high on this pin for two machine cycles while the oscillator is running
resets the device. This pin drives high for 98 oscillator periods after the Watchdog times
out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the
default state of bit DISRTO, the RESET HIGH out feature is enabled.
ALE/PROG
Address Latch Enable (ALE) is an output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG)
during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6
the oscillator frequency and may be used for external timing or clocking purposes. Note,
however, that one ALE pulse is skipped during each access to external data memory. If
desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit
set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly
pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external
execution mode.
PSEN Program Store Enable (PSEN) is the read strobe to external program memory. When the
AT89S52 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to
external data memory.
EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting at 0000H up to FFFFH.
Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.
EA should be strapped to VCC for Internal program executions. This pin also receives the
12-volt programming enable voltage (VPP) during Flash programming.
XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.
– Pin no 1,2,3,4 of PORT 1 are connected to get the vote data input from 74154 (BCD to DECIMAL
decoder) for four different candidates.
– Pin no 5,6,7,8 are connected to four push-button switches to check the vote data casted for
individual candidate.
– Pin no 9 is connected to the reset button to reset the microcontroller automatically when we
switch on the power. It is a Power on reset.
– Pin no 10 of PORT 3 is connected to a push-button switch to check the total vote caste for all the
candidates.
– Pin no 11 and 12 of PORT 3 are connected to two push-button switches (R-1 and R-2) to reset or
clear all the vote data. To reset the data firstly we will press the R-1 button then press the R-2
button and again press the R-1 button. Then all the vote data has to be cleared from the
AT24c02 flash memory.
– Crystal is connected to the pin no 18(XTAL 1) and pin no 19(XTAL 2) providing 11.0592 MHz
frequency.
– Pin no 20 is connected to the ground (GND).
– Pin no 21 and 22 of PORT 2 are connected to pin no 5(SDA- serial data) and pin no 6 (SCL- serial
clock input) of AT24c02 flash memory.
– Pin no 26, 27, 28 of PORT 2 are connected to the pin no 4, 5, 6 of LCD display. Pin no 26 is
connected to RS (register select), pin no 27 is connected to R/W (read/write select) and pin no
28 is connected to En(chip enable signal) of LCD.
– Pin no 31( EA/Vpp) should be strapped to VCC for internal program executions, this pin also
receives the 12-volt programming enable voltage (VPP) during flash programming.
– Pin no 32 – 39 of PORT 0 are connected to the DB0-DB7 (8-bit) data lines of LCD display.
– Pin no 40 is connected to the positive supply (Vcc).
CHAPTER 8
LIQUID CRYSTAL DISPLAY
8.1 INTRODUCTION
Figure 8.FFFF
FIG. 8.1
Liquid Crystal Display also called as LCD is very helpful in providing user interface as well as for
debugging purpose. The most common type of LCD controller is HITACHI 44780 which provides a simple
interface between the controller & an LCD. These LCD's are very simple to interface with the controller
as well as are cost effective.
The most commonly used ALPHANUMERIC displays are 1x16 (Single Line & 16 characters), 2x16
(Double Line & 16 character per line) & 4x20 (four lines & Twenty characters per line).
The LCD requires 3 control lines (RS, R/W & EN) & 8 (or 4) data lines. The number on data lines
depends on the mode of operation. If operated in 8-bit mode then 8 data lines + 3 control lines i.e. total
11 lines are required. And if operated in 4-bit mode then 4 data lines + 3 control lines i.e. 7 lines are
required. How do we decide which mode to use? It’s simple if you have sufficient data lines you can go
for 8 bit mode & if there is a time constrain i.e. display should be faster then we have to use 8-bit mode
because basically 4-bit mode takes twice as more time as compared to 8-bit mode.
Figure 8.2
Table 8.1 Pin Description of LCD
1 Vss Ground
1.RS(Register Select)
When RS is low (0), the data is to be treated as a command. When RS is high (1), the data being sent
is considered as text data which should be displayed on the screen.
2. R/W(Read/Write)
When R/W is low (0), the information on the data bus is being written to the LCD. When RW is high (1),
the program is effectively reading from the LCD. Most of the times there is no need to read from the LCD
so this line can directly be connected to GND thus saving one controller line.
3. E(enable)
The ENABLE pin is used to latch the data present on the data pins. A HIGH - LOW signal is required to
latch the data. The LCD interprets and executes our command at the instant the EN line is brought low.
If you never bring EN low, your instruction will never be executed.
4. D0-D7
The 8 bit data pins D0-D7 are used to send information to the LCD or read the contents of the LCD’s
internal registers. .To display any character on LCD micro controller has to send its ASCII value to the
data bus of LCD. For e.g. to display 'AB' microcontroller has to send two hex bytes 41h and 42h
respectively LCD display used here is having 16x2 size. It means 2 lines each with 16 characters.
In 4-bit mode the data is sent in nibbles, first we send the higher nibble and then the lower nibble. To
enable the 4-bit mode of LCD, we need to follow special sequence of initialization that tells the LCD
controller that user has selected 4-bit mode of operation. We call this special sequence as resetting the
LCD. Following is the reset sequence of LCD.
Wait for about 20mS
Send the first init value (0x30)
Wait for about 10mS
Send second init value (0x30)
Wait for about 1mS
Send third init value (0x30)
Wait for 1mS
Select bus width (0x30 - for 8-bit and 0x20 for 4-bit)
Wait for 1mS
8.3 LCD CONNECTIONS IN 4-BIT MODE
Figure 8.3
Sending data/command in 4-bit Mode
The common steps are:
Mask lower 4-bits
Send to the LCD port
Send enable signal
Mask higher 4-bits
Send to LCD port
Send enable signal
EXAMPLE:
Fig. 8.4
Thus, our standard practice will be to send an instruction to the LCD and then call our WAIT_LCD
routine to wait until the instruction is completely executed by the LCD. This will assure that our program
gives the LCD the time it needs to execute instructions and also makes our program compatible with any
LCD, regardless of how fast or slow it is.
The WRITE_TEXT routine that we just wrote will send the character in the accumulator to the
LCD which will, in turn, display it. Thus to display text on the LCD all we need to do is load the
accumulator with the byte to display and make a call to this routine.
CHAPTER 9
AT24c02 FLASH MEMORY
9.1 INTRODUCTION
The AT24C01A/02/04/08A/16A provides 1024/2048/4096/8192/16384 bits of serial electrically
erasable and programmable read-only memory (EEPROM) organized as 128/256/512/1024/2048 words
of 8 bits each. The device is optimized for use in many industrial and commercial applications where low
power and low voltage operation are essential. The AT24C01A/02/04/08A/16A is available in space-
saving 8-lead PDIP, 8-lead JEDEC SOIC, 8-lead Ultra Thin Mini-MAP (MLP 2x3), 5-lead SOT23
(AT24C01A/AT24C02/AT24C04), 8-lead TSSOP, and 8-ball dBGA2 packages and is accessed via a Two-
wire serial interface. In addition, the entire family is available in 2.7V (2.7V to 5.5V) and 1.8V (1.8V to
5.5V) versions.
9.2 FEATURES
Low-voltage and Standard-voltage Operation
– 2.7 (VCC = 2.7V to 5.5V)
– 1.8 (VCC = 1.8V to 5.5V)
Internally Organized 128 x 8 (1K), 256 x 8 (2K), 512 x 8 (4K),
1024 x 8 (8K) or 2048 x 8 (16K)
Two-wire Serial Interface
Schmitt Trigger, Filtered Inputs for Noise Suppression
Bidirectional Data Transfer Protocol
100 kHz (1.8V) and 400 kHz (2.7V, 5V) Compatibility
Write Protect Pin for Hardware Data Protection
8-byte Page (1K, 2K), 16-byte Page (4K, 8K, 16K) Write Modes
Partial Page Writes Allowed
Self-timed Write Cycle (5 ms max)
High-reliability
– Endurance: 1 Million Write Cycles
– Data Retention: 100 Years
9.3 BLOCK DIAGRAM
Fi
g. 9.1
SERIAL CLOCK (SCL): The SCL input is used to positive edge clock data into each EEPROM device and
negative edge clock data out of each device.
SERIAL DATA (SDA): The SDA pin is bidirectional for serial data transfer. This pin is open-drain driven
and may be wire-ORed with any number of other open-drain or open collector devices.
DEVICE/PAGE ADDRESSES (A2, A1, A0): The A2, A1 and A0 pins are device address inputs that are hard
wired for the AT24C01A and the AT24C02. As many as eight 1K/2K devices may be addressed on a single
bus system (device addressing is discussed in detail under the Device Addressing section).
The AT24C04 uses the A2 and A1 inputs for hard wire addressing and a total of four 4K devices
may be addressed on a single bus system. The A0 pin is a no connect and can be connected to ground.
The AT24C08A only uses the A2 input for hardwire addressing and a total of two 8K devices may
be addressed on a single bus system. The A0 and A1 pins are no connects and can be connected to
ground. The AT24C16A does not use the device address pins, which limits the number of devices on a
single bus to one. The A0, A1 and A2 pins are no connects and can be connected to ground.
WRITE PROTECT (WP): The AT24C01A/02/04/08A/16A has a Write Protect pin that provides hardware
data protection. The Write Protect pin allows normal Read/Write operations when connected to ground
(GND). When the Write Protect pin is connected to VCC, the write protection feature is enabled and
operates as shown in table 9.2
CLOCK and DATA TRANSITIONS: The SDA pin is normally pulled high with an external device. Data on
the SDA pin may change only during SCL low time periods. Data changes during SCL high periods will
indicate a start or stop condition as defined below.
START CONDITION: A high-to-low transition of SDA with SCL high is a start condition which must
precede any other command.
STOP CONDITION: A low-to-high transition of SDA with SCL high is a stop condition. After a read
sequence, the stop command will place the EEPROM in a standby power mode.
ACKNOWLEDGE: All addresses and data words are serially transmitted to and from the EEPROM in 8-bit
words. The EEPROM sends a zero to acknowledge that it has received each word. This happens during
the ninth clock cycle.
STANDBY MODE: The AT24C01A/02/04/08A/16A features a low-power standby mode which is enabled:
(a) upon power-up and (b) after the receipt of the STOP bit and the completion of any internal
operations.
MEMORY RESET: After an interruption in protocol, power loss or system reset, any 2- wire part can be
reset by following these steps:
1. Clock up to 9 cycles.
2. Look for SDA high in each cycle while SCL is high.
3. Create a start condition.
CHAPTER 10
PROJECT DESCRIPTION
START
NO
YES
DISPLAY THE MESSAGE
CAST THE VOTE
1
Figure 10.2
NO 3
YES
GET THE NO. OF VOTES FOR CANDIDATE 1 FROM MEMORY.
DISPLAY ON LCD
VOTE CASTED
2
Figure 10.2 Contd…
NO
4
YES
DISPLAY ON LCD
VOTE CASTED
2
Figure 10.2 Contd…
YES
GET THE NO. OF VOTES FOR CANDIDATE 3 FROM MEMORY.
DISPLAY ON LCD
VOTE CASTED
2
Figure 10.2 Contd…
NO 2
YES
GET THE NO. OF VOTES FOR CANDIDATE 4 FROM MEMORY.
DISPLAY ON LCD
VOTE CASTED
2
Figure 10.2 Contd…
NO
YES
GET THE NO. OF VOTES FOR CANDIDATE 1 FROM MEMORY.
DISPLAY ON LCD
YES
GET THE NO. OF VOTES FOR CANDIDATE 2 FROM MEMORY.
DISPLAY ON LCD
6
Figure 10.2 Contd…
NO
YES
DISPLAY ON LCD
NO 7
YES
YES
GET THE NO. OF VOTES FOR CANDIDATE 4 FROM MEMORY.
DISPLAY ON LCD
NO
YES
GET THE TOTAL NO. OF VOTES FROM MEMORY.
DISPLAY ON LCD
A
NO
8YES
NO
A
YES
CHECK THE STATUS OF P3.1
IS P3.1 = 0
START
WHEN CALLL IS MADE TO CAST THE VOTE . THE FIRST RING SEND A LOW SIGNAL TO P3.3.
THE 2ND RING CAUSES THE APR 9600 TO PLAY AUDIO MESSAGE.
ONNECTS 220Ω RESISTANCE ACROSS TELEPHONE LINE THAT DISCONNECTS THE RINGER FROM TELEPHONE LINE IN THE EXCHAN
THE VOTER CAST THE VOTE AFTER LISTENING THE AUDIO MESSAGE.
Figure 10.3
THE CALL IS DISCONNECTED AFTER 1.5 MINUTE .TURNED ON.
10.4 ASSEMBLY CODE
ORG 0000H
LJMP MAIN
ORG 0003H
RETI
;ljmp ex0_isr
ORG 000BH
RETI
;ljmp tim0_isr
ORG 0013H
RETI
;ljmp ex1_isr
ORG 001BH
RETI
;ljmp tim1_isr
ORG 0023H
RETI
;ljmp ser_isr
MAIN:
LCALL DELAY41
LCALL DELAY41
LCALL DELAY41
LCALL DELAY41
LCALL DELAY41
LCALL DELAY41
MOV 129 , # 040H
MOV 137 , # 00H
MOV 136 , # 00H
MOV 168 , # 00H
MOV 184 , # 00H
MOV 152 , # 00H
MAIN1:
MOV A , # 0
MOV 45 , A
MOV A, #00H
CALL READ_RANDOM
JC MAIN1
MOV 34 , A
MAIN2:
MOV A , # 1
MOV 45 , A
MOV A, #00H
CALL READ_RANDOM
JC MAIN2
MOV 35 , A
MAIN3:
MOV A , # 2
MOV 45 , A
MOV A, #00H
CALL READ_RANDOM
JC MAIN3
MOV 36 , A
MAIN4:
MOV A, # 3
MOV 45, A
MOV , #00H
CALL READ_RANDOM
JC MAIN4
MOV 37 , A
MAIN5:
MOV A , # 4
MOV 45 , A
MOV A, #00H
CALL READ_RANDOM
JC MAIN5
MOV 38 , A
MAIN6:
MOV A , # 5
MOV 45 , A
MOV A, #00H
CALL READ_RANDOM
JC MAIN6
MOV 39 , A
MAIN7:
MOV A , # 6
MOV 45 , A
MOV A,#00H
CALL READ_RANDOM
JC MAIN7
MOV 40 , A
MAIN8:
MOV A , # 7
MOV 45 , A
MOV A,#00H
CALL READ_RANDOM
JC MAIN8
MOV 41, A
MAIN9:
MOV A, # 8
MOV 45, A
MOV A, #00H
CALL READ_RANDOM
JC MAIN9
MOV 42, A
MAIN10:
MOV A, # 9
MOV 45, A
MOV A, #00H
CALL READ_RANDOM
JC MAIN10
MOV 43, A
SETB WP
CLR RST_FLG
CLR CLR_FLG1
CLR CLR_FLG2
;Initialize LCD
MAIN_LP1:
LCALL DELAY41
JB KEY0,NXT_KEY1
LJMP ACT_KEY0
NXT_KEY1:
JB KEY1,NXT_KEY2
LJMP ACT_KEY1
NXT_KEY2:
JB KEY2,NXT_KEY3
LJMP ACT_KEY2
NXT_KEY3:
JB KEY3,NXT_KEY4
LJMP ACT_KEY3
NXT_KEY4:
JB KEY4,NXT_KEY5
LJMP ACT_KEY4
NXT_KEY5:
JB KEY5,NXT_KEY6
LJMP ACT_KEY5
NXT_KEY6:
JB KEY6,NXT_KEY7
LJMP ACT_KEY6
NXT_KEY7:
JB KEY7,NXT_KEY8
LJMP ACT_KEY7
NXT_KEY8:
JB KEY8,NXT_KEY9
LJMP ACT_KEY8
NXT_KEY9:
JB KEY9,NXT_KEY10
LJMP ACT_KEY9
NXT_KEY10:
JB KEY10,NXT_KEY11
LJMP ACT_KEY10
NXT_KEY11:
JB KEY11,NXT_KEY12
LJMP ACT_KEY11
NXT_KEY12:
LJMP MAIN_LP1
ACT_KEY1:
CLR CLR_FLG1
CLR CLR_FLG2
MOV 33, # '1'
JB RST_FLG,INC_CNT1
JMP EXIT_KEY1
INC_CNT1:
MOV A , 34
ADD A, #01H
DA A
MOV 34 , A
MOV A , 35
ADDC A, #00H
DA A
MOV 35 , A
MOV A , 42
ADDA, #01H
DA A
MOV 42 , A
MOV A , 43
ADDC A, #00H
DAA
MOV 43 , A
CLR RST_FLG
LCALL VOTE_CASTED
LCAL SAVE_DATA
EXIT_KEY1:
LJMP MAIN_LP1
ACT_KEY2:
CLR CLR_FLG1
CLR CLR_FLG2
MOV 33 , # '2'
JB RST_FLG,INC_CNT2
JMP EXIT_KEY2
INC_CNT2:
MOV A , 36
ADD A, #01H
DAA
MOV 36 , A
MOV A , 37
ADDC A, #00H
DAA
MOV 37 , A
MOV A , 42
ADD A, #01H
DA A
MOV 42 , A
MOV A , 43
ADDC A, #00H
DA A
MOV 43 , A
CLR RST_FLG
LCALL VOTE_CASTED
LCALL SAVE_DATA
EXIT_KEY2:
LJMP MAIN_LP1
ACT_KEY3:
CLR CLR_FLG1
CLR CLR_FLG2
MOV 33 , # '3'
JB RST_FLG,INC_CNT3
JMP EXIT_KEY3
INC_CNT3:
MOV A , 38
ADD A, #01H
DA A
MOV 38 , A
MOV A , 39
ADDC A, #00H
DA A
MOV 39 , A
MOV A , 42
ADD A, #01H
DA A
MOV 42 , A
MOV A , 43
ADDC A, #00H
DA A
MOV 43 , A
CLR RST_FLG
LCALL VOTE_CASTED
LCALL SAVE_DATA
EXIT_KEY3:
LJMP MAIN_LP1
ACT_KEY4:
CLR CLR_FLG1
CLR CLR_FLG2
MOV 33 , # '4'
JB RST_FLG,INC_CNT4
JMP EXIT_KEY4
INC_CNT4:
MOV A , 40
ADD A, #01H
DA A
MOV 40 , A
MOV A , 41
ADDC A, #00H
DA A
MOV 41 , A
MOV A , 42
ADD A, #01H
DA A
MOV 42 , A
MOV A , 43
ADDC A, #00H
DA A
MOV 43 , A
CLR RST_FLG
LCALL VOTE_CASTED
LCALL SAVE_DATA
EXIT_KEY4:
LJMP MAIN_LP1
ACT_KEY5:
CLR CLR_FLG1
CLR CLR_FLG2
LCALL DISP_CNT1
MOV 33 , # '5'
LJMP MAIN_LP1
ACT_KEY6:
CLR CLR_FLG1
CLR CLR_FLG2
LCALL DISP_CNT2
MOV 33 , # '6'
LJMP MAIN_LP1
;key to see total vote casted for candidate-3
ACT_KEY7:
CLR CLR_FLG1
CLR CLR_FLG2
LCALL DISP_CNT3
MOV 33 , # '7'
LJMP MAIN_LP1
ACT_KEY9:
CLR CLR_FLG1
CLR CLR_FLG2
LCALL DISP_TOTAL
MOV 33, # '9'
LJMP MAIN_LP1
ACT_KEY0:
JNB CLR_FLG2,SKP_ACT0
LCALL CLR_CNTRS
LCALL SAVE_DATA
CLR CLR_FLG1
CLR CLR_FLG2
SJMP EXIT_ACT0
SKP_ACT0:
SETB CLR_FLG1
MOV 33 , # '0'
EXIT_ACT0:
LJMP MAIN_LP1
ACT_KEY10:
JNB CLR_FLG1,EXIT_ACT10
SETB CLR_FLG2
MOV 33 , # 'a'
EXIT_ACT10:
LJMP MAIN_LP1
ACT_KEY11:
CLR CLR_FLG1
CLR CLR_FLG2
MOV 33 , # 62H
SETB RST_FLG
LCALL CAST_VOTE
LJMP MAIN_LP1
DISP_TOTAL:
MOV 128 , # 001H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV DPTR,#MSG_TOTAL
LCALL WRITE_MSG
MOV 128 , # 0C6H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV A , 43
ANL A,#0F0H
SWAP A
ADD A,#30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 43
ANL A, #0FH
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 42
ANL A, #0F0H
SWAP A
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 42
ANL A, #0FH
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
RET
DISP_CNT1:
MOV 128 , # 001H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV DPTR,#MSG_CNT1
LCALL WRITE_MSG
MOV 128 , # 0C6H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV A , 35
ANL A, #0F0H
SWAP A
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 35
ANL A, #0FH
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 34
ANL A, #0F0H
SWAP A
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 34
ANL A, #0FH
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
RET
DISP_CNT2:
MOV 128 , # 001H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV DPTR,#MSG_CNT2
LCALL WRITE_MSG
MOV 128 , # 0C6H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV A , 37
ANL A, #0F0H
SWAP A
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 37
ANL A, #0FH
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 36
ANL A, #0F0H
SWAP A
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 36
ANL A, #0FH
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
RET
DISP_CNT3:
MOV 128 , # 001H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV DPTR,#MSG_CNT3
LCALL WRITE_MSG
MOV 128 , # 0C6H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV A , 39
ANL A, #0F0H
SWAP A
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 39
ANL A, #0FH
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 38
ANL A, #0F0H
SWAP A
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 38
ANL A, #0FH
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
RET
DISP_CNT4:
MOV 128 , # 001H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV DPTR,#MSG_CNT4
LCALL WRITE_MSG
MOV 128 , # 0C6H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV A , 41
ANL A, #0F0H
SWAP A
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 41
ANL A, #0FH
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 40
ANL A, #0F0H
SWAP A
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
MOV A , 40
ANL A, #0FH
ADD A, #30H
MOV 128 , A
LCALL DATA_BYTE
RET
CLR_CNTRS:
MOV A, #00H
MOV 34 , A
MOV 35 , A
MOV 36 , A
MOV 37 , A
MOV 38 , A
MOV 39 , A
MOV 40 , A
MOV 41 , A
MOV 42 , A
MOV 43 , A
MOV 128 , # 001H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV DPTR,#MSG_CLR
LCALL WRITE_MSG
RET
VOTE_CASTED:
MOV 128 , # 001H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV DPTR,#MSG4
LCALL WRITE_MSG
CLR LED
RET
CAST_VOTE:
MOV 128 , # 001H
LCALL COMMAND_BYTE
LCALL DELAY41
MOV DPTR,#MSG3
LCALL WRITE_MSG
SETB LED
RET
CLR_LCD:
MOV 128 , # 001H
LCALL COMMAND_BYTE
LCALL DELAY41
RET
DISPLAY:
MOV 128 , # 080H
LCALL COMMAND_BYTE
LCALL DELAY1
MOV DPTR,#MSG1
LCALL WRITE_MSG
MOV 128 , # 0C0H
LCALL COMMAND_BYTE
LCALL DELAY1
MOV DPTR,#MSG2
LCALL WRITE_MSG
SETB LED
RET
WRITE_MSG:
MOV A, #00H
MOVC A, @A+DPTR
CJNE A, #'$',WRITE_CONT
RET
WRITE_CONT:
MOV 128 , A
LCALL DATA_BYTE
INC DPTR
LJMP WRITE_MSG
COMMAND_BYTE:
CLR LCD_RS
LJMP CMD10
DATA_BYTE:
SETB LCD_RS
NOP
CMD10:
CLR LCD_RW
NOP
SETB LCD_EN
NOP
CLR LCD_EN
RET
DELAY1:
MOV R0, #00H
DELAY10:
DJNZ R0, DELAY10
RET
DELAY41:
MOV R0, #00H
MOV R1, #0FH
DLP410:
DJNZ R0, DLP410
DJNZ R1, DLP410
RET
SAVE_DATA:
CLR WP
LCALL DELAY41
SAVE1:
MOV A , 34
MOV 44 , A
MOV A , # 0
MOV 45 , A
MOV A, #00H
LCALL WRITE_BYTE
JC SAVE1
SAVE2:
LCALL DELAY41
MOV A , 35
MOV 44 , A
MOV A , # 1
MOV 45 , A
MOV A, #00H
LCALL WRITE_BYTE
JC SAVE2
SAVE3:
LCALL DELAY41
MOV A , 36
MOV 44 , A
MOV A , # 2
MOV 45 , A
MOV A, #00H
LCALL WRITE_BYTE
JC SAVE3
SAVE4:
LCALL DELAY41
MOV A , 37
MOV 44 , A
MOV A , # 3
MOV 45 , A
MOV A, #00H
LCALL WRITE_BYTE
JC SAVE4
SAVE5:
LCALL DELAY41
MOV A , 38
MOV 44 , A
MOV A , # 4
MOV 45 , A
MOV A, #00H
LCALL WRITE_BYTE
JC SAVE5
SAVE6:
LCALL DELAY41
MOV A , 39
MOV 44 , A
MOV A , # 5
MOV 45 , A
MOV A, #00H
LCALL WRITE_BYTE
JC SAVE6
SAVE7:
LCALL DELAY41
MOV A , 40
MOV 44 , A
MOV A , # 6
MOV 45 , A
MOV A, #00H
LCALL WRITE_BYTE
JC SAVE7
SAVE8:
LCALL DELAY41
MOV A , 41
MOV 44 , A
MOV A , # 7
MOV 45 , A
MOV A, #00H
LCALL WRITE_BYTE
JC SAVE8
SAVE9:
LCALL DELAY41
MOV A , 42
MOV 44 , A
MOV A , # 8
MOV 45 , A
MOV A, #00H
LCALL WRITE_BYTE
JC SAVE9
SAVE10:
LCALL DELAY41
MOV A , 43
MOV 44 , A
MOV A , # 9
MOV 45 , A
MOV A, #00H
LCALL WRITE_BYTE
JC SAVE10
LCALL DELAY41
SETB WP
RET
WRITE_BYTE:
; AT24Cxx Byte Write function.
; Called with programmable address in A, byte address in
; register ADDR_LO, data in register ZDATA.
; Does not wait for write cycle to complete.
; Returns CY set to indicate that the bus is not available
; or that the addressed device failed to acknowledge.
; Destroys A.
LCALL START
JC X49 ; abort if bus not available
RL A ; programmable address to bits 3:1
ORL A , # 160
CLR ACC.0 ; specify write operation
LCALL SHOUT ; send device address
JC X48 ; abort if no acknowledge
MOV A , 45
LCALL SHOUT
JC X48 ; abort if no acknowledge
MOV A , 44
LCALL SHOUT ; send data
JC X48 ; abort if no acknowledge
CLR C
; clear error flag
X48:
LCALL STOP
X49:
RET
READ_CURRENT:
LCALL START
JC X45 ; abort if bus not available
RL A ; programmable address to bits 3:1
ORL A , # 160
SETB ACC.0 ; specify read operation
LCALL SHOUT ; send device address
JC X44 ; abort if no acknowledge
LCALL SHIN ; receive data byte
LCALL NAK ; do not acknowledge byte
CLR C ; clear error flag
X44:
LCALL STOP
X45:
RET
READ_RANDOM:
PUSH 240
MOV 240 , A
LCALL START
JC X47 ; abort if bus not available
RL A ; programmable address to bits 3:1
ORL A , # 160
CLR ACC.0 ; specify write operation
LCALL SHOUT ; send device address
JC X46 ; abort if no acknowledge
MOV A , 45
LCALL SHOUT
JC X46 ; abort if no acknowledge
MOV A , 240
LCALL READ_CURRENT
JMP X47 ; exit
X46:
LCALL STOP
X47:
POP 240
RET
START:
; Send START, defined as high-to-low SDA with SCL high.
; Return with SCL, SDA low.
; Returns CY set if bus is not available.
SETB SDA
SETB SCL
NOP
NOP
NOP
NOP
NOP
X40:
SETB C ; set error flag
X41:
RET
STOP:
; Send STOP, defined as low-to-high SDA with SCL high.
; SCL expected low on entry. Return with SCL, SDA high.
CLR SDA
NOP ; enforce SCL low and data setup
NOP
NOP
NOP
NOP
NOP
SETB SCL
NOP ; enforce setup delay
NOP
NOP
NOP
NOP
SETB SDA
NOP
NOP
NOP
NOP
NOP
RET
SHOUT:
; Shift out a byte to the AT24Cxx, most significant bit first.
; SCL, SDA expected low on entry. Return with SCL low.
; Called with data to send in A.
; Returns CY set to indicate failure by slave to acknowledge.
; Destroys A.
PUSH 240
MOV 240 , # 8
X42:
RLC A ; move bit into CY
MOV SDA, C ; output bit
NOP ; enforce SCL low and data setup
NOP
NOP
NOP
NOP
SETB SCL ; raise clock
NOP ; enforce SCL high
NOP
NOP
NOP
NOP
CLR SCL ; drop clock
DJNZ 240 , X42
SETB SDA ; release SDA for ACK
NOP ; enforce SCL low and tAA
NOP
NOP
NOP
NOP
SETB SCL ; raise ACK clock
NOP ; enforce SCL high
NOP
NOP
NOP
NOP
MOV C, SDA ; get ACK bit
CLR SCL ; drop ACK clock
NOP
NOP
NOP
NOP
NOP
POP 240
RET
SHIN:
; Shift in a byte from the AT24Cxx, most significant bit first.
; SCL expected low on entry. Return with SCL low.
; Returns received data byte in A.
PUSH 240
MOV 240 , # 8
X43:
SETB SDA ; make SDA an input
NOP ; enforce SCL low and data setup
NOP
NOP
NOP
NOP
SETB SCL ; raise clock
NOP ; enforce SCL high
NOP
NOP
NOP
NOP
MOV C, SDA ; input bit
RLC A ; move bit into byte
CLR SCL ; drop clock
NOP
NOP
NOP
NOP
NOP
DJNZ 240 , X43
NOP
NOP
NOP
NOP
NOP
POP 240
RET
ACK:
; Clock out an acknowledge bit (low).
; SCL expected low on entry. Return with SCL, SDA low.
NAK:
; Clock out a negative acknowledge bit (high).
; SCL expected low on entry. Return with SCL low, SDA high.
MSG1:
DB ' VOTING-MACHINE$'
MSG2:
DB 'IGIT VOTING $'
MSG3:
DB '*CAST THE VOTE*$'
MSG4:
DB '**VOTE CASTED**$'
MSG_CLR:
DB '**All Cleared**$'
MSG_CNT1:
DB 'CANDIDATE 1$'
MSG_CNT2:
DB 'CANDIDATE 2$'
MSG_CNT3:
DB 'CANDIDATE 3$'
MSG_CNT4:
DB 'CANDIDATE 4$'
MSG_TOTAL:
DB 'Total Vote Cast$'
END
The complete system (including all the hardware components and software routines) is working
as per the initial specifications and requirements of our project. Because of the creative nature of the
design, and due to lack of time some features could not be fine-tuned and are not working properly. So
certain aspects of the system can be modified as operational experience is gained with it.
Initially the landline section in the circuit got hanged after 3 rings & the circuit to automatic
switch on the landline section does not work properly as the electromagnetic relay connected
earlier consumes more current when circuit is powered on therefore, a remedy to this problem
is that we have used reed relay which has low switch & voltage ratings, capable of faster
switching speeds and mainly used for temporarily storing information in telephone exchanges.
Also, the voice processor section having APR9600 chip got hanged due to reverse current flow in
that section. To avoid this we have connected an op-amp 714 to compensate for the same.
As the users work with the system, they develop various new ideas for the
development and enhancement of the circuit.
CHAPTER 12
APPLICATIONS
The practical relevance of this project is that it can be used in TV reality shows where viewers
can vote to any participant of their choice.
Further this project can be used practically in various types of selection & voting schemes to be
held in schools and colleges for the selection for different posts such as union president or
others.
CHAPTER 13
FUTURE SCOPE
Number of candidates could be increased by using other microcontroller or an 8255 IC.
It could be interfaced with printer to get the hard copy of the result almost instantly from the
machine itself.
It could also be interfaced with the personal computer and result could be stored in the central
server and its backup could be taken on the other backend servers.
On adding security and verification features it can be used for central elections and replace the
existing machines.
On adding the feature of negative voting we can give people one more choice of reducing the votes
of misappropriate candidate.