anglicky v odborných předmětech " support of teaching technical subjects in english“

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

Upload: aderes

Post on 08-Jan-2016

22 views

Category:

Documents


0 download

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

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“

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.

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

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.

Project setup for Microchip ICD-2

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

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

Project setup for Microchip ICD-2

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

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 MCLRProgram memory code protection - disabled Data memory code protection - disabledBrown Out Reset Selection bits - disabled Fail-Safe Clock Monitor Enabled bit - disabledLow Voltage Programming Enable bit RB3 - digital I/O Brown-out Reset Selection bit = 2.1VFlash Program Memory Self Write Enable bits - off

Project setup for Microchip ICD-2

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

Project setup for Microchip ICD-2

The MPLAB-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

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

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

Project setup for Microchip ICD-2

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

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 the oscillator of the microcontroller to work on the instruction board?

What is the principle of the activity of the “In Circuit Debugger (ICD)” mode? Where is its advantage?

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

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?

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)

Microchip.com: Getting Started with PICmicro MCUs Microchip.com: MPLAB IDE User’s Guide Microchip.com: Quick Guide to Microchip Development Tools

References