perfect digital code lock project doc

22
Design and implementation of Digital Code Lock using VHDL INTRODUCTION The circuit described here is of an electronic combination lock for daily use. It responds only to the right sequences of four digits that are keyed in remotely. If a wrong key is touched, it resets the lock. The lock code can be set by connecting the line wires to the input bits. For example, if the code is 1756, connect line 1 to 1 st bit, line 7 to 2nd bit, line 5 to 3rd bit, line 6 to 4 th bit and rest of the lines—0,2, 3, 4, 8, and 9—to the next 6 bits, making 10 input lines to the lock, where authorized user only knows that pin is just 4 bits. The circuit is built around four d flip-flop’s. The clock pins of the four flip-flops are connected to the 4bits which is the password or key of the lock. The correct code sequence for energisation of D Flipflops is realised by clocking points of 4bits of password in that order. The six remaining inputs are connected to reset circuit which resets all the flip- flops. Touching the key pad switches correctly (i.e..the correct password) briefly pulls the clock input pin high and the state of flip-flop is altered. Thus, if correct clocking sequence is followed then high output occurs which unlocks the system. APPLICATIONS This circuit can be usefully employed in cars so that the car can start only when the correct code sequence is

Upload: jagadish-cool

Post on 02-Mar-2015

1.323 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Perfect Digital Code Lock Project DOC

Design and implementation of Digital Code Lock using VHDL

INTRODUCTION

The circuit described here is of an electronic combination lock for daily use. It responds only to the right sequences of four digits that are keyed in remotely. If a wrong key is touched, it resets the lock. The lock code can be set by connecting the line wires to the input bits.

For example, if the code is 1756, connect line 1 to 1st bit, line 7 to 2nd bit, line 5 to 3rd bit, line 6 to 4th bit and rest of the lines—0,2, 3, 4, 8, and 9—to the next 6 bits, making 10 input lines to the lock, where authorized user only knows that pin is just 4 bits.

The circuit is built around four d flip-flop’s. The clock pins of the four flip-flops are connected to the 4bits which is the password or key of the lock. The correct code sequence for energisation of D Flipflops is realised by clocking points of 4bits of password in that order. The six remaining inputs are connected to reset circuit which resets all the flip-flops. Touching the key pad switches correctly (i.e..the correct password) briefly pulls the clock input pin high and the state of flip-flop is altered. Thus, if correct clocking sequence is followed then high output occurs which unlocks the system.

APPLICATIONS

This circuit can be usefully employed in cars so that the car can start only when the correct code sequence is keyed in via the key pad. The circuit can also be used in various other applications.

Page 2: Perfect Digital Code Lock Project DOC

BLOCK DIAGRAM OF THE PROJECT

Page 3: Perfect Digital Code Lock Project DOC

WORKING

In the block diagram we can see that, the bits of the password or connected to the flip flops. When the bits are pressed it sends an active high signal to the respective flip flop.

With the rising clock edge the output of the flip flop is equal to the input, hence output of all the flip flops is high and they are ANDED so as to give a high signal.

The flip flops are set so that the output initially is zero (q=0), and hence the output of negation is one (~q=1).

Consider that the password of the circuit is 1234.

These particular switches are connected as the inputs of the D flip flops respectively.

On pressing the above switches in sequence will lead to a high output, else the output is low.

Let as assume that a person who is trying to break the lock presses 4321.

In this case the output of the fourth flip flop is high since fourth switch is connected to the corresponding fourth flip flop. The output of this D flip flop is ANDED with negated output of third flip flop which is high due to default settings.

Hence the output of AND gate is high which leads to a high output at the OR gate and this signal is given as feed back which resets all the flip flops.

Hence the above circuit works only for one password.

One major advantage of the above circuit is that it provides high security by misguiding a person who is trying to hack the lock by the number of input bits to be entered.

Here a person who knows the password will only enter the code, that is he will press only four bits of code and will have access. But a person who is trying to break the lock will never know that the numbers of bits in the password are 4, because the numbers of inputs to be entered are 10.

Page 4: Perfect Digital Code Lock Project DOC

The circuit will only work when 4 bits of the password are pressed, but when more than 4 bits are pressed, it will cause the output of the OR gate to be high and this high signal is given to the flip flops in the feed back and will reset them.

So there is high probability that the hacker will always enter more than 4 bits (since he doesn’t know that there are 4 flip flops corresponding to 4 bits of code) and every time the circuit is reset.

The password of the circuit can be changed by connecting the required switches of the new password to the respective flip flops as desired.

Apart from numbers, letter and alphanumeric characters can also be used to set the password.

Page 5: Perfect Digital Code Lock Project DOC

TRUTH TABLE

We have set the Password as “1234” to our circuit and realized the circuit with the respective Truth tables as follows.

Table for OR6Pin 5 Pin 6 Pin 7 Pin 8 Pin 9 Pin 0 OUT_O6

1 X X X X X 1

X 1 X X X X 1

X X 1 X X X 1

X X X 1 X X 1

X X X X 1 X 1

X X X X X 1 1

0 0 0 0 0 0 0 REQUIRED

Page 6: Perfect Digital Code Lock Project DOC

Table for FILP-FLOPS

D1 D2 D3 D4 Q1 QBAR1 Q2 QBAR2 Q3 QBAR3

Q4 QBAR4

1 2 3 4 1 0 1 0 1 0 1 0

1 2 X X 1 0 1 0 0 1 0 1

1 X X X 1 0 0 1 0 1 0 1

2 X X X 0 1 1 0 0 1 0 1

3 X X X 0 1 0 1 1 0 0 1

4 X X X 0 1 0 1 0 1 1 0

Page 7: Perfect Digital Code Lock Project DOC

Table For AND4

D_Q1 D_Q2 D_Q3 D_Q4 OUT_A4

1 1 1 1 1

1 1 X X 1 N RESET FF

1 X X X 1 N RESET FF

Table For AND1 Table For AND2

Table For AND3

D_Q2 D_QBAR1 A1

0 0 0

0

1

0

1 0

0

1 1 1

D_Q3 D_QBAR2 A2

0 0 0

0

1

0

1 0

0

1 1 1

Page 8: Perfect Digital Code Lock Project DOC

Table for main output

A1 A2 A3 O3=A1+A2+A3 O6 O8=

03+06

OUT OF 08

1 X X 1 X 1 RESET ALL FF

X 1 X 1 X 1 RESET ALL FF

X X 1 1 X 1 RESET ALL FF

CHAPTER 3

D_Q4 D_QBAR3 A3

0 0 0

0

1

0

1 0

0

1 1 1

Page 9: Perfect Digital Code Lock Project DOC

INTRODUCTION OF VLSI

Very-large-scale integration (VLSI) is the process of creating

integrated circuits by combining thousands of transistor-based circuits into

a single chip. VLSI began in the 1970s when complex semiconductor and

communication technologies were being developed. The microprocessor is

a VLSI device. The term is no longer as common as it once was, as chips

have increased in complexity into the hundreds of millions of transistors.

Overview

The first semiconductor chips held one transistor each. Subsequent

advances added more and more transistors, and, as a consequence, more

individual functions or systems were integrated over time. The first

integrated circuits held only a few devices, perhaps as many as ten diodes,

transistors, resistors and capacitors, making it possible to fabricate one or

more logic gates on a single device. Now known retrospectively as "small-

scale integration" (SSI), improvements in technique led to devices with

hundreds of logic gates, known as large-scale integration (LSI), i.e. systems

with at least a thousand logic gates. Current technology has moved far past

this mark and today's microprocessors have many millions of gates and

hundreds of millions of individual transistors.

At one time, there was an effort to name and calibrate various

levels of large-scale integration above VLSI. Terms like Ultra-large-scale

Integration (ULSI) were used. But the huge number of gates and transistors

available on common devices has rendered such fine distinctions moot.

Page 10: Perfect Digital Code Lock Project DOC

Terms suggesting greater than VLSI levels of integration are no longer in

widespread use. Even VLSI is now somewhat quaint, given the common

assumption that all microprocessors are VLSI or better.

As of early 2008, billion-transistor processors are commercially

available, an example of which is Intel's Montecito Itanium chip. This is

expected to become more commonplace as semiconductor fabrication

moves from the current generation of 65 nm processes to the next 45 nm

generations (while experiencing new challenges such as increased variation

across process corners). Another notable example is NVIDIA’s 280 series

GPU.

This microprocessor is unique in the fact that its 1.4 Billion

transistor count, capable of a teraflop of performance, is almost entirely

dedicated to logic (Itanium's transistor count is largely due to the 24MB L3

cache). Current designs, as opposed to the earliest devices, use extensive

design automation and automated logic synthesis to lay out the transistors,

enabling higher levels of complexity in the resulting logic functionality.

Certain high-performance logic blocks like the SRAM cell, however, are still

designed by hand to ensure the highest efficiency (sometimes by bending

or breaking established design rules to obtain the last bit of performance by

trading stability).

What is VLSI?

Page 11: Perfect Digital Code Lock Project DOC

VLSI stands for "Very Large Scale Integration". This is

the field which involves packing more and more logic devices into

smaller and smaller areas.

VLSI

1. Simply we say Integrated circuit is many transistors on one chip.

2. Design/manufacturing of extremely small, complex circuitry using

modified semiconductor material

3. Integrated circuit (IC) may contain millions of transistors, each a

few mm in size

4. Applications wide ranging: most electronic logic devices

History of Scale Integration late 40s Transistor invented at Bell Labs

late 50s First IC (JK-FF by Jack Kilby at TI)

early 60s Small Scale Integration (SSI)

10s of transistors on a chip

late 60s Medium Scale Integration (MSI)

100s of transistors on a chip

early 70s Large Scale Integration (LSI)

1000s of transistor on a chip

early 80s VLSI 10,000s of transistors on a

chip (later 100,000s & now 1,000,000s)

Ultra LSI is sometimes used for 1,000,000s

SSI - Small-Scale Integration (0-102)

MSI - Medium-Scale Integration (102-103)

LSI - Large-Scale Integration (103-105)

Page 12: Perfect Digital Code Lock Project DOC

VLSI - Very Large-Scale Integration (105-107)

ULSI - Ultra Large-Scale Integration (>=107)

Advantages of ICs over discrete components

While we will concentrate on integrated circuits , the

properties of integrated circuits-what we can and cannot efficiently put in

an integrated circuit-largely determine the architecture of the entire

system. Integrated circuits improve system characteristics in several critical

ways. ICs have three key advantages over digital circuits built from discrete

components:

Size. Integrated circuits are much smaller-both transistors and

wires are shrunk to micrometer sizes, compared to the

millimeter or centimeter scales of discrete components. Small

size leads to advantages in speed and power consumption,

since smaller components have smaller parasitic resistances,

capacitances, and inductances.

Speed. Signals can be switched between logic 0 and logic 1

much quicker within a chip than they can between chips.

Communication within a chip can occur hundreds of times

faster than communication between chips on a printed circuit

board. The high speed of circuits on-chip is due to their small

size-smaller components and wires have smaller parasitic

capacitances to slow down the signal.

Page 13: Perfect Digital Code Lock Project DOC

Power consumption. Logic operations within a chip also take

much less power. Once again, lower power consumption is

largely due to the small size of circuits on the chip-smaller

parasitic capacitances and resistances require less power to

drive them.

VLSI and systems

These advantages of integrated circuits translate into advantages at the

system level:

Smaller physical size. Smallness is often an advantage in

itself-consider portable televisions or handheld cellular

telephones.

Lower power consumption. Replacing a handful of standard

parts with a single chip reduces total power consumption.

Reducing power consumption has a ripple effect on the rest

of the system: a smaller, cheaper power supply can be

used; since less power consumption means less heat, a fan

may no longer be necessary; a simpler cabinet with less

shielding for electromagnetic shielding may be feasible, too.

Reduced cost. Reducing the number of components, the

power supply requirements, cabinet costs, and so on, will

inevitably reduce system cost. The ripple effect of

integration is such that the cost of a system built from

custom ICs can be less, even though the individual ICs cost

more than the standard parts they replace.

Page 14: Perfect Digital Code Lock Project DOC

Understanding why integrated circuit technology has such profound

influence on the design of digital systems requires understanding both the

technology of IC manufacturing and the economics of ICs and digital

systems.

Applications

Electronic system in cars.

Digital electronics control VCRs

Transaction processing system, ATM

Personal computers and Workstations

Medical electronic systems.

Etc….

Applications of VLSI

Electronic systems now perform a wide variety of tasks in daily

life. Electronic systems in some cases have replaced mechanisms that

operated mechanically, hydraulically, or by other means; electronics are

usually smaller, more flexible, and easier to service. In other cases

electronic systems have created totally new applications. Electronic

systems perform a variety of tasks, some of them visible, some more

hidden:

Personal entertainment systems such as portable MP3

players and DVD players perform sophisticated algorithms

with remarkably little energy.

Electronic systems in cars operate stereo systems and

displays; they also control fuel injection systems, adjust

Page 15: Perfect Digital Code Lock Project DOC

suspensions to varying terrain, and perform the control

functions required for anti-lock braking (ABS) systems.

Digital electronics compress and decompress video, even at

high-definition data rates, on-the-fly in consumer

electronics.

Low-cost terminals for Web browsing still require

sophisticated electronics, despite their dedicated function.

Personal computers and workstations provide word-

processing, financial analysis, and games. Computers

include both central processing units (CPUs) and special-

purpose hardware for disk access, faster screen display, etc.

Medical electronic systems measure bodily functions and

perform complex processing algorithms to warn about

unusual conditions. The availability of these complex

systems, far from overwhelming consumers, only creates

demand for even more complex systems.

The growing sophistication of applications continually pushes the design

and manufacturing of integrated circuits and electronic systems to new

levels of complexity. And perhaps the most amazing characteristic of this

collection of systems is its variety-as systems become more complex, we

build not a few general-purpose computers but an ever wider range of

special-purpose systems. Our ability to do so is a testament to our growing

mastery of both integrated circuit manufacturing and design, but the

Page 16: Perfect Digital Code Lock Project DOC

increasing demands of customers continue to test the limits of design and

manufacturing