1、单片机8255扩展交通灯设计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:
2、 Sunny Yao Internal Verifier: Ricky Zhang Student: Hong Guo Students Reg. No: A233172 NOTES TO STUDENTS Check carefully the submission date and the instructions given with the assignment. Late assignments will not be accepted. Ensure that you give yourself enough time to complete the assignment by t
3、he due date. 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. You must take responsibility for managing your own time effectively. If you are unable to hand in your assignment on time and have valid reasons s
4、uch as illness, you may apply (in writing) for an extension. When you refer to the work of other authors in your assignment, you must practice citation by following Harvard System for Referencing. If you are caught plagiarizing, you could have your grade reduced to zero, or at worst, you could be ex
5、cluded 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
6、(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 p
7、articular 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
8、 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
9、 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
10、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 evalu
11、ation 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 wit
12、hout 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 si
13、gnature: 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
14、 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 rain
15、ing. 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 ar
16、e 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
17、 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 a
18、side 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 i
19、n 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 t
20、ype 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
21、 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, b
22、uilt 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 s
23、hould 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 b
24、it 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
25、.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
26、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
27、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. Re
28、ad / 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 des
29、ign 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.Pc0Pc1Pc2Pc3Pc4Pc5Pc6Pc7Pb0Pb1Pb2Pb3Pb4Pb5Pb6Pb7110010010100000002100001100001000
30、0310001010001000004001100001100000050101000101000000I 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 r
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1