Smart Car lab 7.21-7.31 plan

Source: Internet
Author: User

I hope that the next session will make up for the new lab member training program ....

Gpio(7.21):

GeneralIoAs an implementation method of the input and output functions, complete the following experiment:

(1) Experiment of flux lamp: use the lab board of the camera group, in the circuitLED0-LED3ConnectPORTB0--PORTB3On the pin, complete the flow lamp experiment, that is, one ofLEDLight, with a delay in the middle, must be implemented in as many ways as possible.

(2) Dial Switch ControlLEDExperiment: There are four dial switches in the lab board that receivePORTB4--PORTB7On the pin, use the four dial switches to control the fourLEDTurn off the light. Integrates the input and output functions of the port.

The first experiment, mainly familiar with howCodewarrior ideProject Creation, editing, compilation, and downloadProgramTo understand the basic online debugging methods. Master Single-Chip MicrocomputerGpioFunctions and programming methods, pay attention to programming details.

Phase-lock multiplier (7.22):

Introduces the significance of Frequency Doubling. Refer to Chapter 8 of the chip manual to explain the method of frequency doubling.16 m,32 m,40 m. Increase the frequency16 mThe speed of the flow of the streaming lamp experiment written last time, and understanding the significance of the rate.

PWMLab (7.22 -- 7.23):

IntroductionPWMIn terms of steering gear steering and motor speed control13ChapterPWMWaveform setting method to complete the experiment:

(1) The frequency of generation is30 kHz, Duty cycle is1/3By the pinPP7Output and observe the waveform under the oscilloscope.

(2) PIN 2 function experiment: related settingsRoutingRegister, Flat the last lab waveform from the pinPT7 is generated.

(3) PWMCascade experiment: understand the role of cascade.Pwm2AndPwm3After cascade, a frequency is2 kHz, Duty cycle is1/2FromPP3Output and observe the waveform under the oscilloscope.

(4) set differentPWMWave to the motor and steering gear, observe the car speed and corner changes.

ECTModule Experiment (7.24 -- 7.25):

Integrated chip16Chapter introduces single-chip microcomputer timing/Counter module to complete the following experiments:

(1) Input capture experiment: CapturePt0Pin level changes, if there is a high level triggerLEDLight up. This section describes how the camera works and how to collect signals.

(2) Output comparison experiment: rewrite the first streaming lamp experiment to achieve precise latency1 sThe lamp flows once. This section focuses on the definition of interrupt and the compilation of interrupt programs.

(3) Pulse Counting experiment: Using Single-Chip MicrocomputerPT7Port for pulse counting, with5 VLevel touchPT7The number of pulses used by the MicrocontrollerLEDDisplayed. This section describes how an encoder measures the speed.

SCIModule (7.26 -- 7.27):

Introduce the concept of serial communication, combined with14Chapter describes how to configure the serial port and complete the following experiment:

(1) Send a data packet from the microcontroller to the host computer at intervals, and use the serial assistant to receive the data sent back.

(2) The upper computer sends a command to the lower computer. If the command is set, the data is sent back. If the upper computer is required to send0x01The lower computer sends the specified data back. Otherwise, the data is not sent.

(3) Use a serial port to control the motor speed and steering wheel angle, such as sending05 + **Control motor speed; send06 + **To control the steering wheel corner.

AdLab (7.28 -- 7.29):

Self-studyAdModule, and can collect the number of a lamp or inductor in the photoelectric group or electromagnetic group. If you have the ability, you can find the location of the black line.

Comprehensive Experiment (7.30 -- 7.31):

(1) try to write a program for the camera to collect images. It does not need to extract the location of the black line and send the data back to the host computer.MATLABObserve the image.

(2) try to write a program for collecting tracks from a photoelectric group or an electromagnetic group, and place the black line in the corresponding MicrocontrollerLED.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.