1 / 10

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“. Training program: Mechanic - electrotechnician Program name: Digital processing - microprocessors III. class Microcontrollers Elaborated by: Vlastimil Vlček.

aderes
Download Presentation

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

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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 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.

  2. Project setup for Microchip ICD-2 This setup is valid for all tasks and exercises stated hereinafter. • Create a new project (use Project Wizard) with the following setup: • PIC16F883 microcontroller. • Microchip MPASM Toolsuit (check the correctness of paths to the files). • Enter the project name and the path to the place of saving. • Insert the source file. • Check and confirm the correctness of the assignment. • Save the project.

  3. Project setup for Microchip ICD-2 • Connect the MPLAB ICD-2 debugger to the USB port of the computer • Check (in the PC device manager) whether the device was installed correctly. • Connect an instruction board to the ICD-2 and connect the supply voltage of 9V to the instruction board. • In the MPLAB-IDE program, select the MPLAB ICD-2 mode.

  4. Project setup for Microchip ICD-2 • In the Debugger/Settings menu, check: • Connect Status (Connected) • Self Test (PASS) • Power (presence of supply voltages) • Item “Power target circuit from MPLAB-ICD2” (Power) = inactive • Item “Program after successful build” (Program 2) = active • Item “Run after successful program” (Program 2) = inactive

  5. Project setup for Microchip ICD-2 • Set up the configuration bits in this way: • Oscillator Selection bits - XT oscillator • Watchdog Timer Enable bit - WDT disabled • Power-up Timer Enable bit - PWRT enabled • RE3/MCLR pin function select bit - RE3/MCLR pin function is MCLR • Program memory code protection - disabled • Data memory code protection - disabled • Brown Out Reset Selection bits - disabled • Fail-Safe Clock Monitor Enabled bit - disabled • Low Voltage Programming Enable bit RB3 - digital I/O • Brown-out Reset Selection bit = 2.1V • Flash Program Memory Self Write Enable bits - off

  6. Project setup for Microchip ICD-2 • TheMPLAB-IDE enables the setup of the configuration bits in two ways: • By inserting the configuration word into the source text by means of the __CONFIG (e.g. _CONFIG 0xC1E0) directive • By setting up the individual configuration bits in the table (Configure Configuration bits) • It is necessary to indicate/ not to indicate the selected method in the left upper corner of the table of configuration bits

  7. Project setup for Microchip ICD-2 • Display the source text • Activate the “Output” window • Activate the “Watch” window • Arrange all windows suitably on the desktop • Save the desktop setup • Save the project

  8. Summary of the subject matter - exercises • How do you find out whether the USB device of the ICD-2 was installed correctly? • Can an instruction board be supplied from the ICD-2? • During the work with the ICD-2, is it necessary for theoscillator of the microcontroller to work on the instruction board? • What is the principle of the activity of the “In Circuit Debugger (ICD)” mode? Whereis its advantage?

  9. Summary of the subject matter - exercises • What is the use of so-called “configuration bits”? Is it always necessary to use them, or can we, in some cases, do without them? • Where do we find the meaning and function of individual configuration bits? • What purpose does the “Code protection” function serve? • What is the function of the “Watchdog timer” in a microcontroller?

  10. References • DatasheetMicrochip PIC16F882/883/884/886/887 DS41291E (http://www.microchip.com) • Microchip.com: GettingStartedwithPICmicroMCUs • Microchip.com: MPLAB IDE User’s Guide • Microchip.com: QuickGuide to MicrochipDevelopmentTools

More Related