You are on page 1of 4

TKE 5602 - Practice On Microcontroller Technology Page |1

TITLE : ASSIGNMENT 1 ( GROUP )

REQUIREMENTS : To complete this assignment, this soft a!e " ha!# a!e a!e $e !e%&i!e# ' i( ii( iii( Mic!o ) P!o ISIS * P!ofessional Eas+PI), #e-elopment $oa!#

SAFETY MEASURES :

Ma.e s&!e the ci!c&its is i!ing co!!ectl+ ( fo! the sim&lation &sing soft a!e )( Ma.e s&!e follo the !ight inst!&ction " step to #one this assignment(

PROBLEM : A client ante# to ha-e an a&tomatic light cont!ol s+stem in his ho&se that can ope!ate as follo ' i( In the mo!ning hen the s&n is at the f!ont

TKE 5602 - Practice On Microcontroller Technology Page |2

Ass&me ' i( ii( iii( i-( -( /!ont senso! as S itch R01 0ac. senso! as S itch R01 All lamps insi#e the ho&se as 2E34R)5 2amp at the $ac.+a!# as 2E34R)6 One se-en4segment connecte# to PORT3

INTERFACING CONNECTION DIAGRAM : Acco!#ing to the p!o$lem statement, f!om the p!o$lem( e &se PI)17/8**A as the mic!ocont!olle!( This

connection is i!ing acco!#ingl+ f!om the #atasheet of PI)17/8*9A an# the !e%&i!ement

TKE 5602 - Practice On Microcontroller Technology Page |3

FLOWCHART :

PROGRAMMING : This p!og!amming is c!eate &sing Mic!o ) P!o acco!#ingl+ f!om the flo cha!t a$o-e(

-oi# main() : "" )onfig&!e the I " O pins TRIS0 ; 1<16= TRIS) ; 1= TRIS3 ; 1= "" Initial po!ts -al&e PORT0 ; 1= PORT) ; 1= PORT3 ; 1= "" Set the R01 an# R01 as inp&t "" Set the all po!ts at PORT) as o&tp&t "" Set the all po!ts at PORT3 as o&tp&t

TKE 5602 - Practice On Microcontroller Technology Page |4

hile (1) : if(R01>$it;;1) : PORT3 ; 1<@f= PORT) ; 1<11= C else if(R01>$it;;1) : PORT) ; 1<1,= PORT3 ; 1<*6= C else : PORT) ; 1<1c= PORT3 ; 1<11= C C C REFFERENCES : Int!otoEm$e##e#P!og!amming&sing)>UofM(p#f PI)17f8*9A #atasheet $+ Mic!ochip

"" 2ooping "? If s itch R01 is p!ess, *segment ill #ispla+ AaB an# no 2E3 ill ON ?" "? If s itch R01 is p!ess, *segment ill #ispla+ ApB an# 31 ill ON ?" "? If s itch R01 an# R01 not p!esse#, *segment il not #ispla+ an# $oth 2E3 ill ON?"

You might also like