EECS 100/43 Lab 9 PIC Input-Output (I/O)

Similar documents
Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 1.

UNIVERSITY OF CALIFORNIA BERKELEY Department of Electrical Engineering and Computer Sciences. B. E. BOSER Oscilloscopes EECS 100

Experiment 10 Fall 2012

DEMO9S08LG32 Up to 5V MCU with integrated LCD display driver

Getting acquainted with the development tools June 27, 2006 ELE492 Embedded System Design Exercise 1

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

University of Hawaii EE 361L MPLab Quick Tutorial and Project 2.1 Last updated September 1, 2011

Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio

Getting Started in C Programming with Keil MDK-ARM Version 5

LAB #1: The CSM12C32 Module and PBMCUSLK Project Board

Centre for Instrumentation, Control and Automation User s Guide to the MAD 2 Microcontroller Board

ECE 362 Experiment 3: General Purpose I/O

Getting Started in C Programming with Keil MDK-ARM Version 5

Getting Started in C Programming with Keil MDK-ARM Version 5

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science. EECS 150 Spring 2000

Product Overview -A 16 bit Micro Experimenter for Solderless Breadboards

INTRODUCTION TO PICDEM Z DEVELOPMENT

MTRX3700 Mechatronics

CSC 101: Lab #1 Introduction and Setup Due Date: 5:00pm, day after your lab session

CSC 101: Lab #5 Prelab Boolean Logic Practice Due Date: 5:00pm, day after lab session

Manual of Board ET-PIC STAMP 18F8722-K22 ET-PIC STAMP 18F8722-K22

EE 100 DMM and DC Power Supply LabVIEW Experiment Guide

Quick-Start Guide. BNS Solutions. QSK62P Plus

EEE394 Microprocessor and Microcontroller Laboratory Lab #6

Note that FLIP is an Atmel program supplied by Crossware with Atmel s permission.

None. MICROCONTROLLERS III

MPLAB SIM. MPLAB IDE Software Simulation Engine Microchip Technology Incorporated MPLAB SIM Software Simulation Engine

ECE 2036 Lab 4 Setup and Test mbed I/O Hardware Check-Off Deadline: Thursday, March 17, Name:

Lab 8 RS232 October 22, 2015

INSTRUCTIONS FOR SETTING UP ROACH SOFTWARE IN MPLAB-X

Laboratory Exercise 7 - Extended I/O & Parallel Processing

Anadigm FPAA Solutions Training Class III

EE324: Microcontrollers and Interfacing. Office Hours: Mon, Wed, to 11.30am. Microcontrollers and Interfacing

Lab 1 Introduction to MPLAB and MIPS Assembly (Spring 2016)

32 bit Micro Experimenter Board Description and Assembly manual

Using Virtual EEPROM and Flash API for Renesas MCUs RX600 Series

Development Hardware. Target Board and In-circuit Debugger

BASCOM51. Quick Start Guide

Assembly Instructions for 128x64 Graphics Display Unit

ECE383: Microprocessors Lab 9 Analog-to-Digital and Digital-to-Analog Conversion with I 2 C Serial EEPROM Data Storage

Installing and using CW 10.x for TPMS applications. Revision 5

Quick Start Guide for TWR-S08LL64 TOWER SYSTEM MC9S08LL64. S08 ultra-low-power LCD segment MCU

CSCB58 - Lab 0. Intro to The Lab & The DE2 Board. Prelab /4 Part I (in-lab) /1 Part II (in-lab) /1

ESE 150 Lab 07: Digital Logic

Debug Tool Fashion Accessories An showcase of development tool accessories designed to enhance your debug session

INSTRUCTIONS FOR SETTING UP ROACH SOFTWARE IN MPLAB-X

Datasheet for PAS12 Serial Adaptor rev 1.50

The Alarm System: The alarm system to be designed has the following inputs.

IAR EWARM Quick Start for. Holtek s HT32 Series Microcontrollers

PIC KIT 2 BASIC-USERS GUIDE FEMTO ELECTRONICS

Once file and folders are added to your Module Content area you will need to link to them using the Item tool.

Part I. "Hello, world"

Introduction to Computation and Problem Solving

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation

Getting Started with SKPIC32

ECE3120: Computer Systems Hardware & Software Development Tools

SKP16C26 Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

Debugging in AVR32 Studio

MIT Nerd Kit. Configurable Application Modules. Switches

ENGG1015: Project Circuits

PIC 28 Pin Board Documentation. Update Version 5.0

PICado Alpha Development Board V1.0

Lab 2 Designing with Verilog

Quick Start Guide TWR-S08DC-PT60. Tower System Daughter Card for the 5-Volt 8-bit MC9S08P Family TOWER SYSTEM

NOTE: This tutorial contains many large illustrations. Page breaks have been added to keep images on the same page as the step that they represent.

Lesson 11. Programming a PIC

Lab 2 Verilog Synthesis & Logic Optimization

ICD Module (P/N ) Instruction Manual

Install MPLAB IDE Software

Codewarrior for ColdFire (Eclipse) 10.0 Setup

Lab4 INTRODUCTION TO DEVELOPMENT ENVIRONMENT

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

R8C/Tiny. StarterKit Plus SKP8CMINI-15, SKP8CMINI-17. Clock Stop Detect

ECE372 CodeWarrior Simulator Andreou/Michaelides

XC866 Getting Started on EasyKit & Toolkits

Usb Universal In-circuit Programmer Pic Avr Arm Msp 8051 Eeprom

Quick Start Guide ATA6563 Click Automotive Networking Development Board (ANDB) & PIC18F66K80 Plug-In Module (PIM) Version 1

Microchip Corporate Applications, Aug 2005 Dennis Lehman, Corporate Applications Engineer

EMBEDDED SYSTEMS COURSE CURRICULUM

How to update the HF DDS software WARNING

Development board for PIC24FJ128GA010. with 262k TFT color LCD module

Microchip WebSeminar

Lab 1: FPGA Physical Layout

Physics 335 Intro to MicroControllers and the PIC Microcontroller

Experiment 0: Introduction to MPLAB and QL200 development kit

ECE383: Microcomputers Lab 6 Basic and Finite State Machine LED and Switch I/O Programming

WHAT TO DO IF THE SERVO SYSTEM REPORTS FAILURES.

To practice combinational logic on Logisim and Xilinx ISE tools. ...

Command-Line Compilers for C

Laboratory: Introduction to Mechatronics

Programmable Logic Design Techniques I

MPLAB X IDE PROJECTS Microchip Technology Incorporated. All Rights Reserved DEV Slide 68

M16C/62P QSK QSK62P Plus Tutorial 1. Software Development Process using HEW4

Programming Assignment 1: Pushbutton and Light

Overview. Multiplexor. cs281: Introduction to Computer Systems Lab02 Basic Combinational Circuits: The Mux and the Adder

EE 357 Lab 1 Some Assembly Required

Quick Start Guide TWR-S08PT60. 5-Volt S08P Family of 8-bit MCUs for Industrial and Appliance Applications TOWER SYSTEM

Design Progress Report: x10 Environmental Control System Brian Kennedy, David Ramsay University of Rhode Island, Department of Biomedical Engineering

ET-PIC 24 WEB-V1. o Central Processing Unit (CPU) o System. o nanowatt Power Managed Modes. o Analog Features

Transcription:

1. Objective EECS 100/43 Lab 9 PIC Input-Output (I/O) In this lab, you will simply hook up the output from the strain gauge circuit you designed the previous week to the PIC microcontroller. 2. Equipment a. Breadboard b. Wire cutters c. Wires d. Oscilloscope e. Function Generator f. Power supply g. PICDEM 2 Plus demo board h. MPLAB ICD 2 (Incircuit Debugger) i. MPLAB IDE installed on lab computer 1 j. Various connectors for power supply, function generator and oscilloscope. k. YOUR STRAIN GAUGE CIRCUIT 3. Theory a. Downloading the sample project In this section, you download the digital code to your microcontroller board. Since you did not cover digital systems in lecture, all the code is already done for you. All you need to do is uncomment the A/D code for interfacing the strain gauge. 1. Download the StrainGauge project folder from the EE100 labs homepage (the same project you used for lab 8). Save this to your U: (network) drive. DO NOT SAVE THIS ONTO YOUR DESKTOP. FILES SAVED ONTO YOUR DESKTOP ARE AUTOMATICALLY DELETED WHEN YOU LOG OFF!! 2. Navigate to your folder and double-click on icon. A window similar to figure 1 will pop up. 1 Note: The microcontroller programming tools are installed in 140 Cory ONLY for ease of maintenance

Figure 1. MPLAB IDE has opened your Strain Gauge project 3. Now, double click on main.c in the StrainGaugeInterface.mcw window. The main program should pop up. Look through it. Find the line that displays VOLTMETER. Replace this with STRAIN READING: 4. Next, you need to comment out the voltmeter reading code. These are the first two lines after void main( void ) line. The default code is shown below. You should be able to use this code to figure out how to comment out those lines. void main( void ) { TRISA=0xFF; // Configure AN0 as input. This is default ADCON0=0x41; // configure ADC to receive signal from AN0.. 5. Uncomment the lines for interfacing an external signal (in this case your sensor reading) to your PIC board. These are the lines immediately after the lines you commented out in 4. above. //TRISE= 0x02; //ADCON0 = 0x59; //configure ADC to receive signal from // AN6 (RE1).. 6. You should debug the program before downloading it to the board. To do this: Click on Debugger Select Tool. Make sure MPLAB ICD 2 is selected. Refer to figure 2.

Figure 2. Make sure MPLAB ICD 2 is selected as the debugger 7. The debugger should ask you to download an operating system to the board. Defaults are OK for everything. Before you connect to the board, MAKE SURE THE BOARD IS POWERED ON AND CONNECTED TO THE ICD2 DEBUGGER. MAKE SURE THE DEBUGGER IS CONNECTED TO THE COMPUTER (check with a TA). Next, connect to the board: Debugger Connect. 8. Build your program. Select Project Build All 9. Program the board with your code: Debugger Program. 10. Run the program: Debugger Run. 11. If all goes well you should see the LCD screen display your strain gauge reading. 12. If you are satisfied that your program is working, you can permanently download code to EEPROM 2. First, halt debug mode: Debugger Halt. 13. Select Debugger Select Tool None. You cannot use the programmer and the debugger at the same time. 14. You pretty much repeat the same process for programming as debugging: Select Programmer Select Tool MPLAB ICD 2. 15. Select Programmer Connect 16. Select Programmer Program 2 EEPROM: Electrically Erasable Programmable Read Only Memory

17. Select Programmer Release from Reset. 18. Power off the board and power-on again. Your code will start running again.

4. PRELAB NAME: /SECTION Please turn in INDIVIDUAL COPIES of the prelab. They are due 10 MINUTES after start of lab, NO EXCEPTIONS! a. TASK 1: THOROUGHLY READ THIS DOCUMENT! (YES, THIS PRELAB IS A GIMME) PRELAB COMPLETE: (TA CHECKOFF)

5. REPORT NAME(S): /SECTION a. TASK 1: PROJECT COMPLETE. TA Checkoff: TURN IN ONE REPORT PER GROUP AT THE END OF YOUR LAB SESSION. THERE IS NO TAKE HOME REPORT. 6. REVISION HISTORY Date/Author Summer 2007/Bharathwaj Muthuswamy Revision Comments Typed up source documentation, organized lab report, typed up solutions.