+ All Categories
Home > Documents > Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Date post: 03-Jan-2016
Category:
Upload: keefe-levine
View: 6 times
Download: 0 times
Share this document with a friend
Description:
Anglicky v odborných předmětech "Support of teaching technical subjects in English“. Training program: Mechanic - electrotechnician Program name: Digital processing - microprocessors III. class Microcontrollers Elaborated by: Vlastimil Vlček. - PowerPoint PPT Presentation
11
Training program: Mechanic - electrotechnician Program name: Digital processing - microprocessors III. class Microcontrollers Elaborated by: Vlastimil Vlček Projekt Anglicky v odborných předmětech, CZ.1.07/1.3.09/04.0002 je spolufinancován Evropským sociálním fondem a státním rozpočtem České republiky.
Transcript
Page 1: Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Training program: Mechanic - electrotechnician

Program name: Digital processing - microprocessorsIII. classMicrocontrollers

Elaborated by: Vlastimil Vlček

Projekt Anglicky v odborných předmětech, CZ.1.07/1.3.09/04.0002

je spolufinancován Evropským sociálním fondem a státním rozpočtem

České republiky.

Page 2: Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Practical exercises

Task No. 4: Running light 2

Work procedure:

•Create a new source file and save it to the folder named “BS_2” under the “BS_2.asm” name.

Rewrite the source text from the supplied task printout to the editing window.

Check the finished source text and save it (rewrite the saved empty file).

Rotation of the register Use of the Carry bit during the rotation New instructions: RRF, RLF

Page 3: Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Practical exercises

Create a new project:

Project name: BS_2.mcp, folder BS_2.

Insert the source file BS_2.asm.

Check and confirm the correctness of the assignment.

Save the project.

Task No. 4: Running light 2

Page 4: Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Practical exercises

Connect the MPLAB ICD-2 debugger to the USB port of the computer.

Connect an instruction board (to the ICD-2) and connect the supply voltage of 9V to the instruction board.

Carry out the necessary setups and checks.

Translate the program (Ctrl F10), eliminate possible errors.

Task No. 4: Running light 2

Page 5: Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Practical exercises

Launch the program (F9).

Check the correct function of the program:

The individual LED diodes are switched on gradually from LED 1 to LED 8 (the effect is unidirectional).

The speed of switching on of the LED diodes must be adapted so that the individual phases of switched on/ switched off can be perceptible by vision for certain.

If the program does not work according to predictions, find the error by means of the procedures which were tried before and correct it.

Task No. 4: Running light 2

Page 6: Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Practical exercises

By means of a step-by-step operation (F7, F8), go through the program line after line and watch the behaviour of the program in individual steps.

Focus on the activity of the rotation instruction and on the function of the Carry bit.

Try to change the speed of switching on and switching off of the LED diodes by means the change of the time constant of the delay loop.

Task No. 4: Running light 2

Page 7: Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Practical exercises

Task No. 4: Running light 2

Rotation to the left (RLF)

Rotation to the right (RRF)

Page 8: Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Summary of the subject matter - exercises

Explain the principle of the rotation of a register!

How does the Carry bit participate in the rotation?

Is it possible to use the rotation of the register outside the Carry bit in the PIC16F883 microcontroller?

Which bit enters the Carry register as first during the rotation to the left (RLF)?

What happens to the original contents of the Carry bit during rotation?

Page 9: Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Summary of the subject matter - exercises

Give another use of the rotation of the register!

Do you remember a HW component from digital processing which uses the principle of the rotation of the register? What is its practical use?

Homework:

Propose a procedure for the effect of a bidirectional running light with the use of the rotation instruction.

Modify the BS_2 program in such a way that the previous condition is fulfilled!

Debug the program in the MPLAB-IDE simulation mode with the use of presently known debugging means in such a way that the program can be used in the ICD-2 mode with an instruction board!

Page 10: Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Datasheet Microchip PIC16F882/883/884/886/887 DS41291E (http://www.microchip.com)

References

Page 11: Anglicky v odborných předmětech "Support of teaching technical subjects in English“

Appendices

Appendix No. 4: Source text listing of the “BS_2” program.


Recommended