单片机8255扩展交通灯设计.docx

上传人:b****7 文档编号:16489111 上传时间:2023-07-14 格式:DOCX 页数:15 大小:103.16KB
下载 相关 举报
单片机8255扩展交通灯设计.docx_第1页
第1页 / 共15页
单片机8255扩展交通灯设计.docx_第2页
第2页 / 共15页
单片机8255扩展交通灯设计.docx_第3页
第3页 / 共15页
单片机8255扩展交通灯设计.docx_第4页
第4页 / 共15页
单片机8255扩展交通灯设计.docx_第5页
第5页 / 共15页
单片机8255扩展交通灯设计.docx_第6页
第6页 / 共15页
单片机8255扩展交通灯设计.docx_第7页
第7页 / 共15页
单片机8255扩展交通灯设计.docx_第8页
第8页 / 共15页
单片机8255扩展交通灯设计.docx_第9页
第9页 / 共15页
单片机8255扩展交通灯设计.docx_第10页
第10页 / 共15页
单片机8255扩展交通灯设计.docx_第11页
第11页 / 共15页
单片机8255扩展交通灯设计.docx_第12页
第12页 / 共15页
单片机8255扩展交通灯设计.docx_第13页
第13页 / 共15页
单片机8255扩展交通灯设计.docx_第14页
第14页 / 共15页
单片机8255扩展交通灯设计.docx_第15页
第15页 / 共15页
亲,该文档总共15页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

单片机8255扩展交通灯设计.docx

《单片机8255扩展交通灯设计.docx》由会员分享,可在线阅读,更多相关《单片机8255扩展交通灯设计.docx(15页珍藏版)》请在冰点文库上搜索。

单片机8255扩展交通灯设计.docx

单片机8255扩展交通灯设计

GuangdongInstituteofEducation

BTECCenter

Program:

Electrical/ElectronicEngineering(Electronic)

UnitTitle:

MicroprocessorSystems

UnitNo:

10AssignmentTitle:

Designoftrafficlightsonpublicroads

AssignmentNo.:

1002

IssueDate:

10.19

SubmissionDeadline:

12.13

Assessor/Tutor:

SunnyYao

InternalVerifier:

RickyZhang

Student:

HongGuo

Student’sReg.No:

A233172

NOTESTOSTUDENTS

●Checkcarefullythesubmissiondateandtheinstructionsgivenwiththeassignment.Lateassignmentswillnotbeaccepted.

●Ensurethatyougiveyourselfenoughtimetocompletetheassignmentbytheduedate.

●Donotleavethingssuchasprintingtothelastminute–excusesofthisnaturewillnotbeacceptedforfailuretohand-intheworkontime.

●Youmusttakeresponsibilityformanagingyourowntimeeffectively.

●Ifyouareunabletohandinyourassignmentontimeandhavevalidreasonssuchasillness,youmayapply(inwriting)foranextension.

●Whenyourefertotheworkofotherauthorsinyourassignment,youmustpracticecitationbyfollowingHarvardSystemforReferencing.

●Ifyouarecaughtplagiarizing,youcouldhaveyourgradereducedtozero,oratworst,youcouldbeexcludedfromthecourse.

STUDENT’SDECLARATION:

Iconfirmthatthisisallmyownwork.

Student’sSignature:

HongGuo

ASSESSMENTforPart1

Grade

Criteria/

Descriptors

Evidence

Feedback

Assess

PassAssessment

1.Investigatemicroprocessor-basedsystems

1.1Comparetypesofmicroprocessordevicefamilies

※Parameters(speed,cost,i/ofacilities,instructionset,physicalsize)ofnolessthenthreetypesofmicroprocessordevicefamiliesisdescribed.

threetypesofmicroprocessordevicefamiliesisdescribed.

V

3.Interfacemicroprocessor-basedsystems

3.1Evaluateandchooseprogrammableinterfacedevicesforaparticularsituation

※Evaluatesimplynolessthanthreetypicalapplicationsofmicroprocessor-basedsystems

Allrequirementsmet.

V

3.2Design,buildprogramandtestaninterfaceforanexternaldevicetoamicroprocessor-basedsystem

※Designaschematiccircuit,builtaprogramandtestaninterfaceforanexternaldevicetoamicroprocessor-basedsystem

Thedocumentsarewelldone.

V

GradingAssessment

M1identifyandapplystrategiestofindappropriatesolutions

Applystrategiestofindanappropriatesolutionofthegivenproblem

※Evidencesareshownthatyouhavelookedupmanyreadingmaterialsandworkedoutagoodsolutionforthegivenproblem

Youmanageyourworkwell.

V

M2selectandapplyappropriatemethods/techniques

Applyappropriatetechniquestodesignsoftware

※Astructureddesigntechniqueisusedverywell.

verywell.

V

M3presentandcommunicateappropriatefindings

Documentiswritteninfluentlanguageandcorrectlycitestherelevantreferences

※Documentiswritteninveryfewmistakesandreportformsisvarious.

Thishasbeensuccessfullydone.

V

D1usecriticalreflectiontoevaluateownworkandjustifyvalidconclusions

Usecriticalreflectiontoevaluateownwork

※Thereisevaluationinyourassignmentthatexplainsprogram’sadvantagesanddisadvantages.

Thereisevidenceforthis.

V

D2takeresponsibilityformanagingandorganizingactivities

Manageyourworkaccordingtoatimescheduleandimplementtheapplicationindependently.

※Handintheassignmentontimeanddoitwithoutotherperson'help.

Youmanageyourworkwell.

V

D3demonstrateconvergent/lateral/creativethinking

Creativethinkingisshowninyourdesign

※Proposeacreativethinkinginsolutionsormethods/techniques

Thereisevidenceforthis.

V

Assessor’sadditionalcomments

Youmanageyourworkwell.

Assessor’ssignature:

XiangdongYi

Student’sFeedback

Thankyou

Student’ssignature:

HongGuo

Notes:

AssignmentDescription

Scenario

Onthebustlingroadofheavytrafficandendlessstreamofpeople,Safetyguidelinesforpublicroadsareveryimportanttoensurepeopleagainsttrafficinjury.Thetraditionalwayistoequiptrafficpoliceorcoordinationandmanagementpersonnelforthepublicroads.Butthismethodisnotonlyawasteofhumanandfinancialresources.Besideswhilethetrafficpoliceorthecoordinationandmanagementpersonnelareworkingtheyusuallyhavetowithstandsunning,windingorraining.Inaddition,theymuststillfacetosecuritythreatsbringingfromtrafficaccidentsineveryminute.Nowadaysscienceandtechnologyareinrapiddevelopment,thistraditionalpracticecancompletelybereplacedbyadvancedelectronicproducts.Thepublicroadsafetyindicatorlightswhicharedesignbasedonmicroprocessorsarerightlysuchproducts.Notonlytheseproductscanbedesignedflexiblyandadjustedeasilybutalsotheyarecost-effectiveinusingandmaintenance.Inaddition,theyarereallyabeautifullandscapeincitylife.

NowsupposeyouareanElectricalEngineer.YouareassignedtodesignatypeoftrafficlightsonpublicroadsforMunicipalAuthority.Thespecificrequirementsareasfollows:

1.Theproductcanabsolutelyguaranteethesafeoftraffic.

2.Productshouldhavenolessthantwoguidelinessoastofitfordifferentroadconditions.

3.Pleasesetasideacertainnumberofportssothattheycanbeupgradedinsomeday.

Asanelectronicsdesignengineer,youmustcompletethetaskasfollowing:

Task:

1.(PassCriterion1.1)Comparetypesofmicroprocessordevicefamilies.Pleasecomparenolessthenthreetypesofmicroprocessordevicefamiliesinparameters(wordlength,speed,memoryspace,timer/counters,i/ofacilities,interrupt)intableandthenselectonetypetodoyourdesign.

2.(PassCriterion3.1)Evaluateandchooseprogrammableinterfacedevicesforaparticularsituation.Generallyspeaking,programmableinterfacedeviceisatypeofmulti-purposeLSIchip.Forexample,8279isacommonprogrammableinterfacedevicewhichcanconvenientlyaccomplishadesignincludingmicroprocessor-basedsystems,keyboardandmonitors.Foranotherexample,8255and8155arealsoprogrammableinterfacedeviceswhicharegenerallyusedforexpandingportsofmicroprocessor-basedsystems.Pleaseevaluateandchooseappropriateprogrammableinterfacedevicestoaccomplishyourdesign.

3.(PassCriterion3.2)Design,buildprogramandtestaninterfaceforanexternaldevicetoamicroprocessor-basedsystem.Designaschematiccircuit,builtanalgorithmblockflowdiagram,writeaprogramandtestaninterfaceforanexternaldevicetoamicroprocessor-basedsystem.Pleasepayattentiontotheirconsistencyandprovidedetaildesignsteps.Inaddition,adetailedstatedescriptionoftheimplementationphenomenonofyourprogramshouldbegivenintextandgraphicsortables.

Solution:

1.Accordingtothesubject,Iconparedthefollowingtableofthethreedifferenttypesofmicroprocessorsbycheckinginformation:

8051

MSP430

PIC10F200

Wordlength

128

8

12bit

Speed

32KHz

4MHz

Menoryspace

4KBROM,128RAM

8bitROM

256byteisFLASH,16bitisSRAM

Time/coumters

16bit

3000clockcycles

Thereare8bytesofprogrammableindependentprescaler

i/o

2I/Obitline(P3.0andP3.1)

2I/Obit

4I/O,therearethreewithindependentdirectioncontrolfunction,aninput

Facilites

5interrupt,dividedintotwopriority

No

2

SoIselect8051todesign.

2.Inside8255,itis3paralleldatainput/outputports,twowaysofworkingcontrolcircuit,aread/writecontrollogiccircuitandan8-bitbusbuffer.Therearetwoworkcontrolcircuit:

oneisgroupAcontrolcircuit,andanotherisgroupBcontrolcircuit.ThistwogroupscontrolcircuithaveaControlCommandRegistertoacceptthecontrolwordfromCPUsothattheycandecidetheworkingwayoftwoports.Andtheycanalsoaccordingtothecontrolwordrequirementstoclearexit"0"orbylocation"1"oftheCbitwise.

GroupAcontrolcircuitisusedtocontrolupperpartofAbitwiseandCbitwise(PC7-PC4).GroupBcontrolcircuitisusedtocontrolbottomhalfofBbitwiseandCbitwise(PC3-PC0).

BusDataBufferisa3-statebi-directional8-bitbuffer,asainterfacebetween8255andsystembus,totransferringdata,command,control,command,andexternalstateinformation.

Read/writecontrollogiccircuitacceptthecontrolsignalRD,WR,RESEET,addresssignalAIA0andsoon.ThentheyaccordingtotherequirementsofcontrolsignaltoreadouttheportdataandsendthattoCPU,orreadthedatafromCPUinport.

3.Accordingtothetitle,Iselect8051and8255todesignmytrafficlights.FirstIwilldrawthestatechartunderreality.

Second:

ThecircuitconnectiondiagramIdesigned:

Third:

Accordingtothecircuitdiagramandthestatusflow,IgivetheBinaryoutputstatetable.

Pc0

Pc1

Pc2

Pc3

Pc4

Pc5

Pc6

Pc7

Pb0

Pb1

Pb2

Pb3

Pb4

Pb5

Pb6

Pb7

1

1

0

0

1

0

0

1

0

1

0

0

0

0

0

0

0

2

1

0

0

0

0

1

1

0

0

0

0

1

0

0

0

0

3

1

0

0

0

1

0

1

0

0

0

1

0

0

0

0

0

4

0

0

1

1

0

0

0

0

1

1

0

0

0

0

0

0

5

0

1

0

1

0

0

0

1

0

1

0

0

0

0

0

0

Iputthebinaryintohexadecimal.

1

Pc

49H

PB

42H

2

Pc

61H

PB

08H

3

Pc

51H

PB

04H

4

Pc

0CH

PB

03H

5

Pc

8AH

PB

02H

Fourth,Icanwrotetheprogramofthefirststate.

ORG00H

PORTAEQU7CFFH

PORTBEQU7DFFH

PORTCEQU7EFFH

CADDREQU7FFFH

LVB:

MOVDPTR,#7FFFH

MOVA,#80H

MOVX@DPTR,A

MOVDPTR,#7DFFH

MOVA,#42H

MOVX@DPTR,A

MOVDPTR,#7EFFH

MOVA,#49H

MOVX@DPTR,A

MOVR4,#12

LCALLDELAY

Debugresults:

Theprogramofthesecondstate:

LVB1:

MOVDPTR,#7DFFH

MOVA,#08H

MOVX@DPTR,A

MOVDPTR,#7EFFH

MOVA,#61H

MOVX@DPTR,A

MOVR4,#12

LCALLDELAY

MOVR7,#6

Debugr

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 经管营销

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2