• No results found

micro-p mini project Full Report

N/A
N/A
Protected

Academic year: 2021

Share "micro-p mini project Full Report"

Copied!
19
0
0

Loading.... (view fulltext now)

Full text

(1)

UNIVERSITI MALAYSIA PERLIS UNIVERSITI MALAYSIA PERLIS

EMT 245 EMT 245

INTRODUCTION TO MICROPROCESSOR DESIGN INTRODUCTION TO MICROPROCESSOR DESIGN

A PROPOSAL REPORT ON THE MINI PROJECT A PROPOSAL REPORT ON THE MINI PROJECT

( DIGITAL CODE LOCKING SYSTEM) ( DIGITAL CODE LOCKING SYSTEM)

COURSE: COURSE: RK 86- ELECTRONIC ENGINEERING RK 86- ELECTRONIC ENGINEERING DATE OF SUMISSION: DATE OF SUMISSION: !8 MAY 2"!6 !8 MAY 2"!6 GROUP MEMERS: GROUP MEMERS: N NOO## NNAAMMEE MMAATTRRIICCNNOO !

! AIINA NUUL L KKAAMMIILLAAH H IINNTTI I MMOOHHD D YYUUSSOOFFFF !4!4!!""$$!!%%""%% 2

2 KKEENNNNY Y FFOONNG G PPEENNG G &&YYEE !!44!!""$$!!%%2266 $

$ NUNUR R AAIIN N SSHHAA''LLIIN N IINNTTI I JJUUSSOOHH !!44!!""$$!!%%66%% 4

4 SSEEEE &&EEII HHOORR !!44!!""$$!!%%88!!

READ AND APPROVED Y READ AND APPROVED Y

      ( ( )) DDAATTEE TALE OF CONTENTS TALE OF CONTENTS

(2)

NO CONTENT PAGE !# INTRODUCTION $ 2# ACKGROUND 4-5 $# METHODOLOGY 6-8 4# RESULT DISCUSSION *-!% 5# CONCLUSION !8 6# REFERENCE !* !#" I+,./01,.+: Page | 2

(3)

Throughout this mini project that had been conducted on Digital Code Locking System, we had use a digital lock which is a device which has an electronic control assembly attached to it. They are provided with an access control system that allows only authorized  persons to access a restricted area. This system allows the user to unlock the device with a  password. The password is entered by making use o a keypad. The user can also set his  password to ensure better protection. The major components include a keypad!"#$T %& as a input, L'D !"#$T (& and )*segment L'D !"#$T C& as output then, the controller (T+C- which belongs to the +/+- series o microcontrollers. 0sing the digital code lock it will reduce the risk and liability o keys alling into wrong hands. 1t also can be adapted to any electronic gadget which needs to be protected rom unauthorised2access. 1t will only responds to the right se3uence o three digits that are keyed in remotely. 1 a wrong key is touched, it resets the lock and the program will be halted. The 45 Sim+- was used to do a program or this mini project. The +/+- simulator program 45 Sim+-, has several  built*in input output graphical user interaces !601s& developed or the users7 practice. (lthough not e8actly accurate as in the actual hardware input and output devices, but these graphical interaces do oer the user some added value demonstration materials in understanding our program urther. #ne can especially observe our simulation program and analyse on any assembly code improvements.

2#" 31.0+/:

(4)

9or this mini project, we were used + types o components. That is L'D or "#$T (, :8; <eypad input or "#$T %, )*segment L'D or "#$T C, 4icroprocessor +/+- interacing with +=--, %readboard, jumper wire, resistor and capacitor. The table below, showed all the component and their description.

 >o Components Description

 + L'Ds !output& !"#$T (&

+ L'Ds aligned in one row in one panel. There are two panels available. The horizontal panel and the vertical panel. 'ach L'D re3uires logic ?16? to illuminate. Direct usage bit to L'D representation.

= :8; <eypad !input&

!"#$T %&

= button panel using the :8; matri8. 0sing )*bit signals, ; bit column and : bit row sent into the  processor. The acknowledge signal, D( will assert

!logic ?16?& upon valid key press together with the :8; bit matri8 data. The data will stay present ater the key is released until another key is pressed. D( * Data (cknowledge

; )*segment L'D !output&

!"#$T C&

)*segment L'D active high panel. $e3uires +*bit data to send and operate the desired segment. Direct  pin to L'D representation.

:

%readboard ( breadboard is a device used as a construction  base in developing an electronic circuit.

%readboards can allows them to be reusable. (  breadboard is made o plastic and perorated with numerous holes. Small tin*plated bronze or nickel alloy clips are located under the perorations and  provide contact points or @nodes@ to attach electronic pieces to create a circuit. ( breadboard is used or multiple unctions to create a variety o   products using electricity.

(5)

-4icroprocessor +/+- interacing with

+=--The unction o this block is to manage all o the internal and e8ternal transers o both Data and Control or Status words. 1t accepts inputs rom the C"0 (ddress and Control busses and in turn, issues commands to both o the Control 6roups.

A

Bumper ire

( short length o conductor  used to link  two cross* connect termination points o a circuit, or

to bypass a circuit.

)

$esistor ( device that has electrical resistance and that is used in an electric circuit or protection, operation, or current control.

+

Capacitor ( device or accumulating and holding a charge o electricity, consisting o two e3ually charged

conducting suraces having opposite signs and separated by a dielectric.

1ntegrated circuit* ):c== pin The 44):C==> is a A*key encoder that includes all the internals to take the output o a A*key

switch, and encode it onto only our outputs using a truth table. This is a boon, as it gives you more 12# to control or monitor other things without having to go buy a bigger !in the sense o more pin outs or 12#& microcontroller.

(6)

$#" M,7./..9:  >o 5es $ight rong Page | 6 Press frst button? Start Show value in 7 segment Light up led Light up the led

ompare value with !

(7)

 >o

5es

$ight rong

 >o

Page | 7 Press se#ond button?

Light up led Light up led

ompare value with 4 Show value in 7

segment

Press third button? "ead data

(8)

5es

$ight

Page | $ ompare value with $

Show value

Light up lower bit o%  led

&nd ompare value

with !3

Light up upper bit o%  led

(9)

4#" R0, D10.+:

The hardware simulation re3uires the origin address start at =///?. L1 S", ;99/? will allows Stack "ointer points to the address ;99/?. 4E1 (, //////% is or the indication o  the output and input or port (, port %, port C. The port % is set to be input and the other   ports will be set as output. #0T +;? is the control port that controls the input and output  ports as to be set as planned. % register is used to be the counter or counting the times o 

ailure o user pressed. C register is used to count the total amount o value or successul keypad inputs.

The program continues with a loop test with port %. T'ST" is a loop or a the button in keypad is pressed or not. 1> +? indicates when a value is pressed or released. (>1 /? commands the logical (>D with accumulator. 1 no button is pressed, the F lag !zero lag& will be  and the program continue looping back to T'ST".

(ter detected a button is pressed, the program continue to T'ST"( loop which test the  button is released or not. 1 the button is not released, it will continue looping T'ST"(. (>1 /? commands the logical (>D with accumulator. 1 the button is not released, the F lag !zero lag& will be / and the program continue looping back to T'ST"(. 4eanwhile i  the button is released and F lag will be  and the program continue.

(10)

T indicates the position o the keypad pressed and released, to make sure that the button  pressed and released is in the keypad. L1 ?, ;///h is the loading the data rom ;///?. L1 D, ////? is used to make sure the D' register pair is / since the ' register !lower bit& will be used. Then, move accumulator value to register '. >ow register ' have the keypad position value. D(D D stands or add register pair D' to ?L register and save in ?L register. 1 the  position pressed is -, means that the memory pointer will point rom address ;/// to address

;//- and then display the value in address ;//-. #0T +=? indicate the accumulator value will display on the ) segment since +=? stand or port C and port C is connected to ) segment. This allows user to know what he typed. C"1 //////% stand or immediately compare the accumulation value with the data typed in. 1 the value is the same as the compared value, F 9lag will be set otherwise the F lag will be /. 1 the F lag is reset !/& the  program will jump conditionally to $#>6 subroutine. 4eanwhile, i the F lag is set !&

the program will jump conditionally to $16?T subroutine.

(11)

1n the $#>6 subroutine, the program will show the "() to light up in port (. 4eanwhile, in the $16?T subroutine, the program will show the "(/ to light up in port (. The arrangement is made like this to prevent conusion or user and the program. The lower bits will indicate the correct password and the upper bits will indicate the wrong password. (dditional in the $16?T subroutine, the C register will be saved value o  into the program. Since the irst password is , the value o  is then save into C register.

Since the D(D D and moving 4 to ( may cause conusion to the program. L1 ?,;///? will be typed again.

The program will continue as the second input is pressed.

1t is similar to the irst value where the program will wait until the second value is pressed. T'ST"= is a looping condition where program waits user to press the second key in the keypad.

(12)

(ter a key is pressed, T'ST"=( looping condition will be tested when the user haven7t released the button. 1 the user didn7t release the button that he pressed, the program will continue loop back to T'ST"=(.

Similar to the irst value, the accumulator now have the position o keypad in the program T=.

(ter gotten the value, the value is copied to ' register. D(D D will unction again to have the memory pointer points to the desire memory address and get its value rom ;///?. Then, the ?L registers have the value rom the ;///?. 9or e8ample, i : is pressed, the memory  pointer will points to ;//:? in the memory to get its value stored.

The value o ?L will be moved to accumulator to display its result in the +=? ! port C &.

(13)

(ter the program allows the ) segment to display what is the user pressed, immediately compare with the password :. 1 the password is correct, the zero lag will be set. Then the  program will jump conditionally with F lag e3ual to  to C#$$'CT=. 1 the password  pressed is not :, the zero lag will not be set. Then the program will jump conditionally with  jump not zero !B>F& to $#>6.

1n the $#>6 subroutine, the program is set to allow the "(A to be light up and set the output or port ( !+/?&. This shows a dierent L'D lights up. 4eanwhile, in the C#$$'CT= subroutine, additional program or the C register is present. The value stored in C register will be moved to accumulator and then add immediately with :. 1 the password is correct or both times, the accumulator now will be -. The program continues with moving  back to C register. The correct L'D lights up will be the "( since it is the second password

and it is not the irst password already. (ter displaying the L'D either "( or "(A the  program will jump unconditionally to T'ST"; where the program allow user to press the

third password.

(14)

1n line A), T'ST"; is similar to T'ST" and T'ST"=. T'ST"; is a looping program to detect the third password to be pressed. 1 nothing is pressed in this time, the program will continue looping back to T'ST";.

1n line ), T'ST";( is similar to T'ST"( and T'ST"=(. T'ST";( is a looping program to detect when the user released the pressed password. 1 the user didn7t released, the program will just loop back to T'ST";(.

T; indicate or the program to know the location o the keypad pressed.

(15)

L1 ? indicate the memory location pointed out by the A bit address into register L and copies the contents o the ne8t memory location into register ?. The contents o source memory location are not altered. %y resetting the D' to // another memory pointer location can be easily get or the program. 1 a + keypad is press, the memory pointer will point rom ;///? to ;//?. !+ is the th number is the keypad& Then the memory point will point to

;//? and get the value stored in the accumulator. (ter that, the value o accumulator is then displayed in port C or the )segment display. The value is immediately compared with the saved password G +. 1 the password is correct, then the zero lag will be set. Thereore, the program will ignore line +: since it is a jump conditionally when zero lag is reset and  proceed to line +-. Line +- indicates a jump conditionally when zero lag is set and it will  jump to C#$$'CT; subroutine. Line +A is the $#>6= subroutine, when L'D "(- will lights up. This allows the programmer to understand which password is correct or wrong. The L'D is set as port (.

(16)

Line + indicates the subroutine or C#$$'CT;. 1n the subroutine, the register C value is moved to accumulator and added immediately with value + and then move back to register C. Since this subroutine is determined the third correct password. Thereore "(= is set to be light up. (ter that the program jumps unconditionally to subroutine correct.

Line A indicate the wrong password combination that user typed. L'D is set to light up rom "(: to "() !?igher bits& and beore the user able to key in again, the register % is decrement  by . Since this program only allow user to try ; times. This is a saety precaution or prevent thet issues in real lie. 1 the password is wrongly key in ; times, the program will be jump to '>D. %eore the Hlie7 is been used up, the program will loop back to T'ST" which is the allows user to key in the irst password again.

(17)

Line /= indicates subroutine or correct8 which is only when the last password is typed. This program makes sure that the password typed in is correct and is in order. The saved  password is :+ and total value o this password is ;. Thereore, the register o C is then

moved out to accumulator and compare with ;. 1 the value is less than ; the zero lag will  be reset and jump conditionally to 8orc subroutine !reer above&. 1 the value is ;, the  program will let the lower bit o the L'D in port ( lights up. 9inally, the program will be halt

straight i the password is correct.

(lthough the total value o the password is ;, i user key in the password not in order or  other amount that can be ; !such as =;+& it will not be trigger as the correct password  because only when the irst password is correct, the C register will stored  continue by the

second password is correct, the value o C register will accumulate to -. Then only i the third  password is correct again, the value o C register will be accumulated to ;. #ther than this

way, the C register will not have the value o ; and it is impossible to show the correct arrangement or the L'D in port (.

Line / is the program or the keypad. This program starts at origin o ;///?. D9% indicate the data value set into the keypad. 9or e8ample, i  in the keypad is pressed, the memory  point will point to ;///? and the value o ;///? which is //////% is taken as the value.

This is output will be shown at the ) segment and to be compared or the password.

1n this program, there is a special declaration or the )segment display. The +/--Development board or "C is spoiled. Thereore "C is replaced by "C) since ) segment only use ) port and "C) normally is not been used. The interchange o "C and "C) will show the perect result or display the value.

(18)

5#" C.+10.+:

The overall system was constructed and tested. The results are it works perectly. e were able to e8ecute all the unctions speciied in our proposal. The biggest hurdle we had to overcome with this project was interacing the microcontroller with the hardware components. e think that this digital code lock is very marketable because it is ine8pensive due to low power consumption, easy to use, comparatively and highly reliable. (s such, we design a cheap and eective security system or buildings, cars, saes, doors and gates, so as to prevent unauthorized person rom having access to ones properties through the use o  codes, we thereore e8periment the application o electronic devices as locks.

This simple digital code lock using microcontroller can be enhanced by incorporating new means o authentication. 4ost prevalent orm o digital lock is that using a numerical code or authenticationI the correct code must be entered in order or the lock to deactivate. Such locks typically provide a keypad, and some eature an audible response to each press. Combination lengths are ; digits long in our program o digital code locking system. The code entered this way is then compared to the password stored in memory. The microcontroller continuously monitors the keypad or a match with the stored password. (s and when there is a match the output line is enabled which can then be used to trigger an L'D. (n LCD display is also used to display whether the entered password is correct or not. 9urthermore, we set the program that user has only ; times to key in the password.

(19)

6#" R;+1:

%ookJ

K >.<. Srinath, +/+- 4icroprocessor "rogramming and 1nteracing. >ew DelhiJ"rentice ?all o 1ndia "rivated Limited, =//-, pp. +)*=/-.

K= (jay adhwa, 4icroprocessor +/+-J (rchitecture, "rogramming and 1nteracing. >ew DelhiJ "?l Learning "rivate Limited, =//, pp. ;=*;A.

ebsitesJ

K; Shivam 6upta. !=/:,>ovember&. Digital code locking s ystem K#nline.

(vailableJhttpsJ22ershivamgupta.wordpress.com2project*=2---*timer*based*project2digital* code*lock system2

K: $aja >abila $aja 4uzaar. !=/,December&. Digital code lock. K#nline.

(vailableJhttpJ22www.slideshare.net2%(1<L(?2digital*code*lock K(ccessed 9eb.),=/;

References

Related documents

The FSC logo, the initials ‘FSC’ and the name ‘Forest Stewardship Council’ are registered trademarks, and therefore a trademark symbol must accompany the.. trademarks in

State Level Governance of Health Information Exchange © Image Research 2014.. Using the EHR as a

Speaking a Java idiom, methods are synchronized, that is each method of the same object is executed in mutual exclusion, and method invocations are asynchronous, that is the

Step 3: We then draw the teams into position 3, from group A to G, missing out the groups which already have a host assigned to that position, and the possible position which will

Again… deep vascular loss – not typical of glaucoma.. Glaucoma as a diagnosis of exclusion. ▪ Glaucoma defined as a disease of the

En febrero del año pasado el índice de radiación solar fue de 13, mientras que en febrero de este año 8 (2017) se llegó a tener un índice de 14, ambos de muy alto riesgo. Esta

[r]

Favor you leave and sample policy employees use their job application for absence may take family and produce emails waste company it discusses email etiquette Deviation from