电子科技大学:《嵌入式系统设计 Embedded Systems Design》课程教学资源(课件讲稿)Chapter 5 ask Management

1 University of Electronic Science Technology of China(UESTC) Model Vehicle Control system design Real-Time Systems Lab
1 Real-Time Systems Lab University of Electronic Science & Technology of China (UESTC) Model Vehicle Control system design

2 1 OUTLINE University of Electronic Science Technology of China(UESTC) There is a model vehicle >4 cartwheels; >2 motors:One is steering engine (130s Brushless motor) that is used to control the front two cartwheels;the other is speed motor (Brushless ESC (Electronic Speed Controller))that is used to drive the rear two cartwheels; >1LCD(LCD1602): >3 ultrasonic sensors (SRF05); >1 freescale 5213 card (MCF 5213); >1 batter. Real-Time Systems Lab
2 Real-Time Systems Lab University of Electronic Science & Technology of China (UESTC) 1 OUTLINE There is a model vehicle 4 cartwheels; 2 motors: One is steering engine (130s Brushless motor) that is used to control the front two cartwheels; the other is speed motor (Brushless ESC (Electronic Speed Controller)) that is used to drive the rear two cartwheels; 1 LCD (LCD 1602); 3 ultrasonic sensors (SRF05); 1 freescale 5213 card (MCF 5213) ; 1 batter

3 1 OUTLINE University of Electronic Science Technology of China(UESTC) Your mission >Drive the model vehicle to go ahead while keeps it at a given distance(50 cm)from a wall. Real-Time Systems Lab
3 Real-Time Systems Lab University of Electronic Science & Technology of China (UESTC) Your mission Drive the model vehicle to go ahead while keeps it at a given distance (50 cm) from a wall. 1 OUTLINE

4 1 OUTLINE University of Electronic Science Technology of China(UESTC) Requirements >Detect the current distance from the wall in real time by the ultrasonic sensors; >Display the detected distance by the LCD; >Your program runs on the top of uC/OS II >Codewarrior,C&Assemble language. How to design? Real-Time Systems Lab
4 Real-Time Systems Lab University of Electronic Science & Technology of China (UESTC) 1 OUTLINE Requirements Detect the current distance from the wall in real time by the ultrasonic sensors; Display the detected distance by the LCD; Your program runs on the top of uC/OS Ⅱ; Codewarrior, C & Assemble language. How to design?

5 2 Problem (P) University of Electronic Science Technology of China(UESTC) P:How to detect the distance in real-time? >Distance=(TimeDuration 340m/s)/2; >How to get the TimeDuration? Real-Time Systems Lab
5 Real-Time Systems Lab University of Electronic Science & Technology of China (UESTC) 2 Problem (P1 ) P1 : How to detect the distance in real-time? Distance=(TimeDuration * 340m/s)/2; How to get the TimeDuration?

6 3 Problem (P),(P3),(P4) University of Electronic Science Technology of China(UESTC) P2:How to organize and design the software architecture on the top of uc/OS II >DFD(Data Flow Diagram) >Task structure ☐P3:How to( drive t the steering e engine to turn Left/Right? Given a turning a angle,How to implement the "turning"command? P:How to determine the turning angle in each adjustment Real-Time Systems Lab
6 Real-Time Systems Lab University of Electronic Science & Technology of China (UESTC) 3 Problem (P2 ), (P3 ), (P4 ) P2 : How to organize and design the software architecture on the top of uc/OS II ? DFD (Data Flow Diagram) Task structure P3 : How to drive the steering engine to turn Left/Right? Given a turning angle, How to implement the “turning” command? P4 : How to determine the turning angle in each adjustment ?

4 Implement the above design on the top of uC/OSII University of Electronic Science Technology of China(UESTC) APIs provided by the uC/OS II? Task management:OSTaskCreate ( Mail Box: OSMBoxCreate OSMBoxPost OSMBoxPend ( >Synchronize:OSSemCreate() OSSemPost O OSSemPend ( Mutex:OSMutexCreate ( OSMutexPost ( OSMutexPend ( >Interrupt:OSVectSet ( a111 Real-Time Systems Lab
7 Real-Time Systems Lab University of Electronic Science & Technology of China (UESTC) 4 Implement the above design on the top of uC/OSⅡ Task management: OSTaskCreate () Mail Box: OSMBoxCreate () OSMBoxPost () OSMBoxPend () Synchronize: OSSemCreate () OSSemPost () OSSemPend () Mutex: OSMutexCreate () OSMutexPost () OSMutexPend () Interrupt: OSVectSet () ...... ...... APIs provided by the uC/OSⅡ?

8 4 Implement the above design on the top of uC/OS II University of Electronic Science Technology of China(UESTC) Interfaces for ultrasonic MCF_GPIO_PORTDD&=~Trig /produce a 20us pulse >TestTimeSum=Gettime[1]-Gettime[0]//Calculate the distance Interfaces for PWM OSSpeeddown O OSSpeedup ( OSTurnLeft ( OSTurnRight ( ■Interfaces for LCD LCDWcmd ( /Determine the position on the LCD LCDWdata ( /Display the given information LCDShowChar ()/Display the detected distance Real-Time Systems Lab
8 Real-Time Systems Lab University of Electronic Science & Technology of China (UESTC) 4 Implement the above design on the top of uC/OSⅡ MCF_GPIO_PORTDD&=~Trig // produce a 20us pulse TestTimeSum=Gettime[1]-Gettime[0] //Calculate the distance Interfaces for ultrasonic OSSpeeddown () OSSpeedup () OSTurnLeft () OSTurnRight () Interfaces for PWM LCDWcmd () // Determine the position on the LCD LCDWdata () // Display the given information LCDShowChar () // Display the detected distance Interfaces for LCD

9 5 How to design a more perfect control system? University of Electronic Science Technology of China(UESTC) More sensors(A group of photoelectric sensors) More tasks Perfect control algorithm Optimize your program Responsibility,Stability Other control applications ▣Q&A Real-Time Systems Lab
9 Real-Time Systems Lab University of Electronic Science & Technology of China (UESTC) 5 How to design a more perfect control system? More sensors (A group of photoelectric sensors) More tasks Perfect control algorithm Optimize your program Responsibility, Stability Other control applications …… Q & A

10 University of Electronic Science Technology of China(UESTC) 8 Square waves(40 HZ)(Ultrasonic) Utrasonic Sensor GND VCC Echo Trig (20 us pulse) GPIO Capture the Time Duration of high-level voltage GPT MCF 5213 Real-Time Systems Lab
10 Real-Time Systems Lab University of Electronic Science & Technology of China (UESTC) Utrasonic Sensor GND VCC Echo Trig (20 us pulse) GPIO GPT Capture the Time Duration of high-level voltage MCF 5213 8 Square waves (40 HZ) (Ultrasonic)
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 电子科技大学:《嵌入式系统设计 Embedded Systems Design》课程教学资源(课件讲稿)Chapter 4 Task Management.pdf
- 电子科技大学:《嵌入式系统设计 Embedded Systems Design》课程教学资源(课件讲稿)Chapter 3 Software System.pdf
- 电子科技大学:《嵌入式系统设计 Embedded Systems Design》课程教学资源(课件讲稿)Chapter 2 Hardware System.pdf
- 电子科技大学:《嵌入式系统设计 Embedded Systems Design》课程教学资源(课件讲稿)Chapter 1 Overview(廖勇).pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Universal Hashing.pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Random Rounding.pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Moments.pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Mixing.pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Min-Cut.pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Markov Chain.pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Lovász Local Lemma.pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Identity Testing.pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Finger printing.pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Coupling.pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Concentration.pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Chernoff.pdf
- 南京大学:《随机算法 Randomized Algorithms》课程教学资源(课件讲稿)Balls and Bins.pdf
- 南京大学:《组合数学 Combinatorics》课程教学资源(课件讲稿)Ramsey Theory.pdf
- 南京大学:《组合数学 Combinatorics》课程教学资源(课件讲稿)The Probabilistic Method.pdf
- 南京大学:《组合数学 Combinatorics》课程教学资源(课件讲稿)Principle of Inclusion-Exclusion(PIE).pdf
- 电子科技大学:《嵌入式系统设计 Embedded Systems Design》课程教学资源(课件讲稿)Case Analysis - Use DARTS to Design a S/W System of Robot Controller.pdf
- 电子科技大学:《嵌入式系统设计 Embedded Systems Design》课程教学资源(课件讲稿)Case 4.pdf
- 电子科技大学:《嵌入式系统设计 Embedded Systems Design》课程教学资源(课件讲稿)Chapter 3 Hot topics in ES.pdf
- 中国计算机学会学术著作丛书:《对等网络——结构、应用与设计 Peer-to-Peer Network Structure, Application and Design》PDF电子书(正文,共九章).pdf
- 《计算机科学》相关教学资源(参考文献)Dynamic inference in probabilistic graphical models.pdf
- 《计算机科学》相关教学资源(参考文献)Dynamic Sampling from Graphical Models.pdf
- 《计算机科学》相关教学资源(参考文献)On Local Distributed Sampling and Counting.pdf
- 《计算机科学》相关教学资源(参考文献)What can be sampled locally?.pdf
- 《计算机科学》相关教学资源(参考文献)Convergence of MCMC and Loopy BP in the Tree Uniqueness Region for the Hard-Core Model.pdf
- 《计算机科学》相关教学资源(参考文献)Counting hypergraph matchings up to uniqueness threshold.pdf
- 《计算机科学》相关教学资源(参考文献)Simple average-case lower bounds for approximate near-neighbor from isoperimetric inequalities.pdf
- 《计算机科学》相关教学资源(参考文献)Spatial mixing and the connective constant - Optimal bounds.pdf
- 《计算机科学》相关教学资源(参考文献)Spatial Mixing of Coloring Random Graphs.pdf
- 《计算机科学》相关教学资源(参考文献)Approximate Counting via Correlation Decay in Spin Systems.pdf
- 《计算机科学》相关教学资源(参考文献)Approximate Counting via Correlation Decay on Planar Graphs.pdf
- 《计算机科学》相关教学资源(参考文献)Assigning Tasks for Efficiency in Hadoop.pdf
- 《计算机科学》相关教学资源(参考文献)Correlation Decay up to Uniqueness in Spin Systems.pdf
- 《计算机科学》相关教学资源(参考文献)Improved FPTAS for Multi-Spin Systems.pdf
- 《计算机科学》相关教学资源(参考文献)Cell-probe proofs and nondeterministic cell-probe complexity.pdf
- 《计算机科学》相关教学资源(参考文献)Cell-Probe Proofs.pdf