单片机8255扩展交通灯设计.doc_第1页
单片机8255扩展交通灯设计.doc_第2页
单片机8255扩展交通灯设计.doc_第3页
单片机8255扩展交通灯设计.doc_第4页
单片机8255扩展交通灯设计.doc_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Guangdong Institute of EducationBTEC CenterProgram: Electrical/Electronic Engineering (Electronic) Unit Title: Microprocessor Systems Unit No: 10 Assignment Title: Design of traffic lights on public roads Assignment No.: 1002 Issue Date: 10.19 Submission Deadline: 12.13 Assessor/Tutor: Sunny Yao Internal Verifier: Ricky Zhang Student: Hong Guo Students Reg. No: A233172 NOTES TO STUDENTSl Check carefully the submission date and the instructions given with the assignment. Late assignments will not be accepted.l Ensure that you give yourself enough time to complete the assignment by the due date.l Do not leave things such as printing to the last minute excuses of this nature will not be accepted for failure to hand-in the work on time. l You must take responsibility for managing your own time effectively.l If you are unable to hand in your assignment on time and have valid reasons such as illness, you may apply (in writing) for an extension. l When you refer to the work of other authors in your assignment, you must practice citation by following Harvard System for Referencing.l If you are caught plagiarizing, you could have your grade reduced to zero, or at worst, you could be excluded from the course.STUDENTS DECLARATION:I confirm that this is all my own work.Students Signature: Hong Guo ASSESSMENT for Part 1GradeCriteria/DescriptorsEvidenceFeedbackAssessPass Assessment 1. Investigate microprocessor-based systems1.1 Compare types of microprocessor device familiesParameters(speed, cost, i/o facilities, instruction set, physical size )of no less then three types of microprocessor device families is described.three types of microprocessor device families is described.V3. Interface microprocessor-based systems3.1 Evaluate and choose programmable interface devices for a particular situationEvaluate simply no less than three typical applications of microprocessor-based systemsAll requirements met.V3.2 Design, build program and test an interface for an external device to a microprocessor-based systemDesign a schematic circuit, built a program and test an interface for an external device to a microprocessor-based systemThe documents are well done.VGrading AssessmentM1 identify and apply strategies to find appropriate solutionsApply strategies to find an appropriate solution of the given problemEvidences are shown that you have looked up many reading materials and worked out a good solution for the given problem You manage your work well.VM2 select and apply appropriate methods/techniquesApply appropriate techniques to design softwareA structured design technique is used very well.very well.VM3 present and communicate appropriate findingsDocument is written in fluent language and correctly cites the relevant referencesDocument is written in very few mistakes and report forms is various.This has been successfully done.VD1 use critical reflection to evaluate own work and justify valid conclusionsUse critical reflection to evaluate own work There is evaluation in your assignment that explains programs advantages and disadvantages.There is evidence for this.VD2 take responsibility for managing and organizing activitiesManage your work according to a time schedule and implement the application independently.Hand in the assignment on time and do it without other person help.You manage your work well.VD3 demonstrate convergent/lateral/ creative thinkingCreative thinking is shown in your designPropose a creative thinking in solutions or methods/techniquesThere is evidence for this.VAssessors additional commentsYou manage your work well. Assessors signature: Xiangdong YiStudents FeedbackThank you Students signature: Hong GuoNotes:Assignment DescriptionScenarioOn the bustling road of heavy traffic and endless stream of people, Safety guidelines for public roads are very important to ensure people against traffic injury. The traditional way is to equip traffic police or coordination and management personnel for the public roads. But this method is not only a waste of human and financial resources. Besides while the traffic police or the coordination and management personnel are working they usually have to withstand sunning, winding or raining. In addition, they must still face to security threats bringing from traffic accidents in every minute. Nowadays science and technology are in rapid development, this traditional practice can completely be replaced by advanced electronic products. The public road safety indicator lights which are design based on microprocessors are rightly such products. Not only these products can be designed flexibly and adjusted easily but also they are cost-effective in using and maintenance. In addition, they are really a beautiful landscape in city life.Now suppose you are an Electrical Engineer. You are assigned to design a type of traffic lights on public roads for Municipal Authority. The specific requirements are as follows:1. The product can absolutely guarantee the safe of traffic.2. Product should have no less than two guidelines so as to fit for different road conditions.3. Please set aside a certain number of ports so that they can be upgraded in some day.As an electronics design engineer, you must complete the task as following:Task:1. (Pass Criterion 1.1) Compare types of microprocessor device families. Please compare no less then three types of microprocessor device families in parameters(word length, speed, memory space, timer/counters, i/o facilities, interrupt)in table and then select one type to do your design.2. (Pass Criterion 3.1) Evaluate and choose programmable interface devices for a particular situation. Generally speaking, programmable interface device is a type of multi-purpose LSI chip. For example, 8279 is a common programmable interface device which can conveniently accomplish a design including microprocessor-based systems, keyboard and monitors. For another example, 8255 and 8155 are also programmable interface devices which are generally used for expanding ports of microprocessor-based systems. Please evaluate and choose appropriate programmable interface devices to accomplish your design.3. (Pass Criterion 3.2) Design, build program and test an interface for an external device to a microprocessor-based system. Design a schematic circuit, built an algorithm block flow diagram, write a program and test an interface for an external device to a microprocessor-based system. Please pay attention to their consistency and provide detail design steps. In addition, a detailed state description of the implementation phenomenon of your program should be given in text and graphics or tables.Solution:1. According to the subject, I conpared the following table of the three different types of microprocessors by checking information:8051MSP430PIC10F200Word length128812 bitSpeed 32KHz4MHzMenory space4KB ROM,128 RAM8 bit ROM256 byte is FLASH,16 bit is SRAMTime/coumters16 bit3000 clock cyclesThere are 8 bytes of programmable independent prescaleri/o2 I / O bit line (P3.0 and P3.1)2 I/O bit4 I / O, there are three with independent direction control function, an inputFacilites 5 interrupt, divided into two priorityNo2So I select 8051 to design.2. Inside 8255, it is 3 parallel data input / output ports, two ways of working control circuit, a read / write control logic circuit and an 8-bit bus buffer. There are two work control circuit: one is group A control circuit, and another is group B control circuit. This two groups control circuit have a Control Command Register to accept the control word from CPU so that they can decide the working way of two ports. And they can also according to the control word requirements to clear exit 0 or by location 1 of the C bitwise.Group A control circuit is used to control upper part of A bitwise and C bitwise(PC7-PC4). Group B control circuit is used to control bottom half of B bitwise and C bitwise(PC3-PC0).Bus Data Buffer is a 3-state bi-directional 8-bit buffer, as a interface between 8255 and system bus, to transferring data, command, control, command, and external state information. Read / write control logic circuit accept the control signal RD,WR,RESEET, address signal AIA0 and so on. Then they according to the requirements of control signal to read out the port data and send that to CPU, or read the data from CPU in port.3. According to the title, I select 8051 and 8255 to design my traffic lights. First I will draw the statechart under reality.Second : The circuit connection diagram I designed:Third: According to the circuit diagram and the status flow, I give the Binary output state table.Pc0Pc1Pc2Pc3Pc4Pc5Pc6Pc7Pb0Pb1Pb2Pb3Pb4Pb5Pb6Pb71100100101000000021000011000010000310001010001000004001100001100000050101000101000000I put the binary into hexadecimal.1Pc49HPB42H2Pc61HPB08H3Pc51HPB04H4Pc0CHPB03H5Pc8AHPB02HFourth,I can wrote the program of the first state.ORG 00HPORTA EQU 7CFFHPORTB EQU 7DFFHPORTC EQU 7EFFHCADDR EQU 7FFFHLVB: MOV DPTR,#7FFFH MOV A,#80H MOVX DPTR,A MOV DPTR,#7DFFH MOV A,#42H MOVX DPTR,A MOV DPTR,#7EFFH MOV A,#49H MOVX DPTR,A MOV R4,#12 LCALL DELAYDebug results:The program of the second state:LVB1:MOV DPTR,#7DFFH MOV A,#08H MOVX DPTR,A MOV DPTR,#7EFFH MOV A,#61H MOVX DPTR,A MOV R4,#12 LCALL DELAY MOV R7,#6Debug results:So the whole program is:ORG 00HPORTA EQU 7CFFHPORTB EQU 7DFFHPORTC EQU 7EFFHCADDR EQU 7FFFHLVB: MOV DPTR,#7FFFH MOV A,#80H MOVX DPTR,A MOV DPTR,#7DFFH MOV A,#42H MOVX DPTR,A MOV DPTR,#7EFFH MOV A,#49H MOVX DPTR,A MOV R4,#12 LCALL DELAYLVB1:MOV DPTR,#7DFFH MOV A,#08H MOVX DPTR,A MOV DPTR,#7EFFH MOV

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论