ELEC 4601 Microprocessor Systems - PowerPoint PPT Presentation

About This Presentation
Title:

ELEC 4601 Microprocessor Systems

Description:

ELEC 4601 Microprocessor Systems Lab 5 Tutorial Introduction to PIC Board No more MASM Lab 5 Introduction to MPLAB IDE Create a new project Compile a project Transfer ... – PowerPoint PPT presentation

Number of Views:212
Avg rating:3.0/5.0
Slides: 13
Provided by: Cisco51
Category:

less

Transcript and Presenter's Notes

Title: ELEC 4601 Microprocessor Systems


1
ELEC 4601 Microprocessor Systems
  • Lab 5 Tutorial
  • Introduction to PIC Board

2
No more MASM
  • Lab 5
  • Introduction to MPLAB IDE
  • Create a new project
  • Compile a project
  • Transfer the program to the board
  • This lab will have 3 parts. They will involve
    polling timers and setting up interrupts.

3
PIC Board
4
Wiring up the board
LEDs
5
PIC board with debugger
6
Introduction to MPLAB IDE
  • Start MPLAB IDE v8.15a
  • Select Project
  • Select Project Wizard
  • Click Next
  • Device -gt PIC16F917
  • Click Next
  • Active Toolsuite -gt HI-TECH Universal Toolsuite
  • HI-TECH ANSI C Compiler
  • Click Next

7
Continued
  • Create New Project File
  • Choose an existing folder or create a folder and
    choose a file name and click save
  • Click Next
  • Skip Step Four by clicking next
  • Select Finish
  • Create a new file by selecting File -gt New
  • Save file as .c

8
Compiling your project
  • Type in the following
  • include lthtc.hgt
  • void main(void)
  • In the project window, add the .c file to list of
    source files.
  • Click Project-gtbuild.

9
Programming the PIC board
  • Click Pogrammer
  • Select Programmer
  • Choose MPLAB ICD 2
  • If you do not see MPLAB ICD 2 ready for next
    operation message in the output log window, then
    select Programmer-gtSettings. Ensure that the
    settings are as follows
  • Under communication tab Com Port is set to USB
  • Under power tab Power target circuit from MPLAB
    ICD 2 box is checked

10
Continued
  • Select Program
  • Click Program

11
Program
Bring board out of reset
12
Register Access
  • Table 2-1 to Table 2-4 outline the register map
    for PIC processor.
  • They can be accessed by simply assigning them a
    value.
  • The following statement will clear Timer 0
  • TMR0 0x00
Write a Comment
User Comments (0)
About PowerShow.com