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

Size: px
Start display at page:

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

Transcription

1 OREGON INSTITUTE OF TECHNOLOGY Computer Systems Engineering Technology Department CST Introduction to Microcontrollers Introduction to Lab 1 Lab 1 Introduction to MPLAB and MIPS Assembly (Spring 2016) Name Lab 1 is a procedural lab that will walk you through the PIC32 development process using the MPLAB X IDE (Integrated Development Environment). (Note that from herein, MPLAB will be used to mean MPLAB X.) The IDE provides a single look-and-feel that is identical whether you are simulating code or actually running code interactively on the target hardware (debugging). The lab activities in this class will almost exclusively be using the (hardware) debug mode though there is a place for simulation debugging. A few MIPS instructions will be investigated in a simple PIC32 output port application. You will initially use sample code to create and build a project, as well as debug. Then you will modify the code to add application specific functionality. Objectives for Lab 1 1) Create a MPLAB project and add an assembly source file 2) Configure MPLAB for the Explorer 16 target board and ICD 3 debugger 3) Build a project and load executable code on the Explorer 16 target board 4) Debug a project using breakpoints and single stepping 5) Observe PIC32 addressing and Special Function Register (SFR) addressing 6) Distinguish native MIPS instructions from macro instructions 7) Modify an assembly source file to meet a specific function requirements 8) Verify the operation of the modified project Procedure for Lab 1 Getting started 1) Create a z:\cst204\labs folder and a z:\cst204\docs folder. Copy the following files from Blackboard (Course Materials Lab Materials Lab Supplements Books) into the \docs folder. MPLAB X Project and MIPS Assembly Helps.pdf MIPS Quick Ref.pdf PIC32MX3XX-4XX Family Data Sheet.pdf PIC32 Family Reference Manual Book.pdf 2) Create a z:\cst204\labs\lab1 folder. 3) Create a MPLAB X lab1 project according to MPLAB X Project and MIPS Assembly Helps.pdf. 4) Copy the file C:\Program Files\Microchip\xc32\vX.YZ\examples\ assembly_examples\ports_control\source\ports_control.s

2 into a new file lab1.s within the z:\cst204\labs\lab1\source folder. (Note: The file extension MUST be a capital S.) Add this file to the Project. [Note: vx.yz varies with the version.] Formatting workspace by Docking windows 5) While you can Undock windows using the Window pull-down menu, it is recommended that you leave them Docked. You can unpin windows by Minimizing them to the edge. Windows can be focused on and repined. 6) Go to the Window drop-down menu and select PIC Memory Views CPU to display the CPU registers window. Expand it and Minimize it to the bottom edge. 7) Go to the Window drop-down menu and select PIC Memory Views Execution Memory to display the instruction view of the memory. Expand it and Minimize it to the bottom edge. Going forward, you can display and hide, dock and undock windows, to your preference. It is suggested that you dock status windows as docking prevents the source/debug window from covering the status windows. Debugging on Explorer 16 target board 8) Plug in the kit USB cable into ICD 3 debugger. Then, plug the ICD 3 USB cable into the host computer through the USB extension cable that is attached to the lab bench. [Note: The ICD 3 USB driver should already be installed on the lab computer. If an Installation prompt comes up, a lab tech will have to install the driver on the machine you are using. Please notify the instructor if this situation occurs.] 9) Under the File pull-down menu, click Project Properties or the WRENCH icon on the left side of the Dashboard window. Select the SN: xxx shown under the Hardware Tool Hardware Tools ICD 3 configuration. The Serial Number needs to be highlighted. Click OK. 10) Plug in the 9V wall power supply into the Explorer 16 target board. You should see LED D1 turn on. 11) Attach the ICD 3 to the Explorer 16 with the short, gray patch cord. 12) Click the Debug Main Project icon. This will build the code and start a debug session. 13) You can now debug the project (Run, Halt, Step Into, etc.) on the target board hardware. These can be done using the Debugger drop-down menu or the icon menu. You should get a Target reset message in the ICD 3 status window in the Output window that spontaneously opened. 14) In the source window, scroll down to the first instruction (ori) right after the main: label to insert a breakpoint by clicking on the line number. In the Debug pull-down menu, select Reset. Note: You can also use the Reset icon on the icon menu bar. Execution should halt on the ori instruction as noted by a solid green block arrow and green shading on the line. 15) Single step until you reach the la s0, LATACLR instruction. From the Debug pull-down menu, you use Step Into or you can use the icon menu.

3 16) QUESTION: Look at the code disassembly in the Execution Memory window (Window PIC Memory Views Execution Memory). Note that LATACLR is a built-in symbol (label) for the address of the Port A LATCH CLEAR Special Function Register (SFR). Is the la s0, LATACLR instruction present? If not, what instructions appear to be present in its stead? Write your observations here. (Hint: la is a macro instruction recognized by the assembler and is expanded to more than one machine/assembly instruction.) 17) Continue single-stepping. The program should end up in an infinite loop. 18) Notice that there is a nop instruction after the j endless instruction. This is important! The instructor should comment on this. Don t let him/her forget! If not mentioned, ask for an explanation! You re on your own Using your resources 19) In the Execution Memory and Data Memory windows, determine where the following memory regions begin. Find the first A0xxxxxx address in the Data window and the first 9Dxxxxxx address Execution window. Just note the addresses that the debugger lists. The underscore (xxxx_xxxx) is only a visual convenience. Use the C/C++ notation 0xHHHHHHHH to present a hex value. Data Memory Program Memory 20) Ports make input and output signals available from/to the outside world through device pins. Port A pins are wired to the 8 LEDs, D10-D3. In order to affect the LEDs, Port A bits 7-0 must be manipulated. Look at the PIC32 Data Sheet (PIC32MX3XX-4XX Family Data Sheet from Blackboard Lab Materials) and determine the addresses (virtual) for the following registers. Search for the names in the.pdf file. (Hint: You will be looking at TABLE 12-1: PORTA SFR SUMMARY.) LATA LATASET LATACLR TRISA ODCA

4 21) Determine the 32-bit hex values (e.g. 0xHHHHHHHH with hex digits or X for don t care.) for the TRISA bits and the ODCA bits in order to configure all of the usable Port A pins to be normal, non-open drain, digital logic outputs. Do this by looking at the TRISx and ODCx definitions. TRISx configures a pin to be input or output. ODCx configures an output to be open drain or non-open drain. The x means to use the definition for any Port, e.g. PORTA, PORTB, etc. (Hint: Search for the definitions for REGISTER 12-1 TRISx and REGISTER 12-4 ODCx. Read the Legend to interpret the bit meanings. Scroll down below each REGISTER block to see the bit configuration settings.) TRISA ODCA 22) Modify the lab1.s code to create an infinite loop that does the following. Do this by modifying the code of the main function. It s best if you do not make any function calls. So, strip out the mportaclearbits function; only use a main function with an infinite loop. You will need to use the MIPS Assembly Language Programming online text (Book 1) as a reference. You can also use the MIPS Instruction quick reference for mnemonic descriptions. Use la to load address values using LANLES into registers and li to load IMMEDIATE data values into registers. As with any assembly language program, simpler is usually better and less is more. The top of the file before main should contain: #include <xc.h>.global main.text.set noreorder Configuring an SFR is done as a three instruction sequence: la t0,sfr_label li t1,data_value sw t1,0(t0) // reg t0 gets the address value, e.g. LATACLR // reg t1 gets the data value, e.g. 0xFF // Store t1 into address pointed to // by t0 + 0 displacement Port pin configurations: a. Configure ODCA for non-open drain by writing 0xFF to ODCACLR (ODCASET would make outputs open drain.) b. Configure TRISA for output by writing 0xFF to TRISACLR. (TRISASET would make inputs.) [a and b done one time as a configuration.] Infinite loop: c. Write 0xFF to LATACLR d. Write 0xA5 to LATASET e. For loop delay of (Use Book 1 pp ,.pdf pp You will remove the add a0, a0, t0 loop guts and just use the loop control instructions.) f. Write 0xFF to LATACLR g. Write 0x5A to LATASET h. For loop delay of (Use Book 1 pp ,.pdf pp You will remove the add a0, a0, t0 loop guts and just use the loop control instructions.) i. Jump back to step c (You MUST have a nop after each jump or branch type instruction. Note that Book 1 omits this and not placing the nop WILL cause PROBLEMS.)

5 23) Demonstrate function to instructor. Instructor Initials: 24) Determine if step a in part 22 above was necessary by examining the contents of ODCA in a watch window before and after the sw to ODCA is executed. Explain why or why it is not needed. 25) QUESTION: What does macro instruction mnemonic la stand for? Explain its function or purpose. (Hint: Refer to the Appendix D for the Macro Instruction descriptions.) 26) QUESTION: What does macro instruction mnemonic li stand for? Explain its function or purpose. (Hint: Refer to the Appendix D for the Macro Instruction descriptions.) 27) QUESTION: Explain the similarities and differences between la and li. If necessary, interchange these in your code and test to see what happens. 28) QUESTION: Replace all LATAxxx names with PORTAxxx. Test and explain what changes, if anything. (This is seemingly a trick question but it will soon become apparent that it is not.) 29) QUESTION: Replace the original with Test and explain what happens. 30) QUESTION: Replace the original with Test and explain what happens. Insert breakpoints at the top of each loop for clarification. 31) QUESTION: Replace the original with 100. Test and explain what happens. Insert breakpoints at the top of each loop for clarification.

6 32) QUESTION: Comment out Steps (c) and (f) actions from the algorithm. Test and explain what happens. 33) Restore (uncomment) Steps (c) and (f). Another way to carry out the function of steps (c) and (d) would be to read LATA into a register and then modify the 8 LSBs to have the value 0xA5, then write the modified value to LATA. Implement this functionality for steps (c) and (d) only and demonstrate it to the instructor. Instructor Initials: 34) How many instructions, including macro expansions are needed to implement the functionality that replaced steps (c) and (d) and how many instructions, including macro expansions are needed to implement the original steps (f) and (g)? 35) Configuring an SFR was presented in step 22 using the following three instruction sequence: la t0,sfr_label li t1,data_value sw t1,0(t0) // reg t0 gets the address value, e.g. LATACLR // reg t1 gets the data value, e.g. 0xFF // Store t1 into address pointed to // by t0 + 0 displacement This could be replaced with a two instruction sequence li t1,data_value sw t1,sfr_label // reg t1 gets the data value, e.g. 0xFF // Store t1 into address pointed to Change one of you SFR configurations to use the two instruction sequence approach. How many instructions, including macro expansions are needed to implement each approach? Why does the second approach need fewer instructions?

ME 333: Introduction to Mechatronics

ME 333: Introduction to Mechatronics ME 333: Introduction to Mechatronics Assignment 3: Investigating the PIC C32 Tool Suite Electronic submission due before 11:00 AM on Thursday February 2nd All questions asked in this problem set must be

More information

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

University of Hawaii EE 361L MPLab Quick Tutorial and Project 2.1 Last updated September 1, 2011 University of Hawaii EE 361L MPLab Quick Tutorial and Project 2.1 Last updated September 1, 2011 This is a quick tutorial of programming the PIC 16F684A processor using the MPLab Integrated Development

More information

Software Setup and Introductory Assembly programs for the MSP430 *

Software Setup and Introductory Assembly programs for the MSP430 * OpenStax-CNX module: m15976 1 Software Setup and Introductory Assembly programs for the MSP430 * Texas Instruments This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution

More information

ME 333: Introduction to Mechatronics

ME 333: Introduction to Mechatronics ME 333: Introduction to Mechatronics Assignment 3: Investigating the PIC C32 Tool Suite Electronic submission due before 11:00 AM on Thursday February 2nd All questions asked in this problem set must be

More information

Project Debugging with MDK-ARM

Project Debugging with MDK-ARM Project Debugging with MDK-ARM Notes: This document assumes MDK-ARM Version 5.xx (µvision5 ) is installed with the required ST-Link USB driver, device family pack (STM32F4xx for STM32F4-Discovery board;

More information

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

MPLAB SIM. MPLAB IDE Software Simulation Engine Microchip Technology Incorporated MPLAB SIM Software Simulation Engine MPLAB SIM MPLAB IDE Software Simulation Engine 2004 Microchip Technology Incorporated MPLAB SIM Software Simulation Engine Slide 1 Welcome to this web seminar on MPLAB SIM, the software simulator that

More information

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

M16C/62P QSK QSK62P Plus Tutorial 1. Software Development Process using HEW4 M16C/62P QSK QSK62P Plus Tutorial 1 Software Development Process using HEW4 Overview The following tutorial is a brief introduction on how to develop and debug programs using HEW4 (Highperformance Embedded

More information

Quick-Start Guide. BNS Solutions. QSK62P Plus

Quick-Start Guide. BNS Solutions. QSK62P Plus BNS Solutions Quick-Start Guide QSK62P Plus RS-232 Port Link LED 8-character x 2-line LCD Expansion Port (2) Reset Switch Power LED Thermistor I/O Ring (4) M16C MCU Analog Adjust Pot MCU Crystal Expansion

More information

Lab 2: Basic Assembly Programming and Debugging using AVR Studio. Due: December 13, 2011

Lab 2: Basic Assembly Programming and Debugging using AVR Studio. Due: December 13, 2011 Lab 2: Basic Assembly Programming and Debugging using AVR Studio 1 Outcomes Due: December 13, 2011 Familiarize yourself with the capabilities of the ATMEGA32 embedded microcontroller and AVR Studio Develop

More information

ToolStick-EK TOOLSTICK USER S GUIDE. 1. Kit Contents. 2. ToolStick Overview. Green and Red LEDs. C8051F321 provides USB debug interface.

ToolStick-EK TOOLSTICK USER S GUIDE. 1. Kit Contents. 2. ToolStick Overview. Green and Red LEDs. C8051F321 provides USB debug interface. TOOLSTICK USER S GUIDE 1. Kit Contents The ToolStick kit contains the following items: ToolStick Silicon Laboratories Evaluation Kit IDE and Product Information CD-ROM. CD content includes: Silicon Laboratories

More information

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

SKP16C26 Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc. SKP16C26 Tutorial 1 Software Development Process using HEW Renesas Technology America Inc. 1 Overview The following tutorial is a brief introduction on how to develop and debug programs using HEW (Highperformance

More information

STM32L100C-Discovery Board Projects

STM32L100C-Discovery Board Projects STM32L100C-Discovery Board Projects Keil Microcontroller Development Kit for ARM (MDK-ARM) Version 5.xx As illustrated in Figure 1, MDK-ARM Version 5.xx (µvision5) comprises a set of core functions: Integrated

More information

IAR EWARM Quick Start for. Holtek s HT32 Series Microcontrollers

IAR EWARM Quick Start for. Holtek s HT32 Series Microcontrollers IAR EWARM Quick Start for Holtek s Microcontrollers Revision: V1.10 Date: August 25, 2011 Table of Contents 1 Introduction... 5 About the Quick Start Guide... 5 About the IAR EWARM... 6 2 System Requirements...

More information

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

Note that FLIP is an Atmel program supplied by Crossware with Atmel s permission. INTRODUCTION This manual will guide you through the first steps of getting the SE-8051ICD running with the Crossware 8051 Development Suite and the Atmel Flexible In-System Programming system (FLIP). The

More information

MPLAB X Debugging Techniques

MPLAB X Debugging Techniques TLS0102-002 MPLAB X Debugging Techniques Breakpoints Author: Rob Ostapiuk, Stu Chandler Microchip Technology Objectives! Describe the four fundamental types of breakpoints! Describe the differences between

More information

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick TOOLSTICK LIN DAUGHTER CARD USER S GUIDE 1. Handling Recommendations To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective plastics. To prevent damage

More information

None. MICROCONTROLLERS III

None. MICROCONTROLLERS III MICROCONTROLLERS III PREREQUISITES: MODULE 10: MICROCONTROLLERS II. OUTLINE OF MODULE 11: What you will learn about in this Module: Use of a much more powerful microcontroller: the PIC16F877 In-circuit

More information

EUROScope lite 16FX Reference Manual

EUROScope lite 16FX Reference Manual lite 16FX Reference Manual June 2007 EUROS Embedded Systems GmbH Campestraße 12 D-90419 Nuremberg Germany Fon: +49-911-300328-0 Fax: +49-911-300328-9 Web: www.euros-embedded.com email: support@euros-embedded.com

More information

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick TOOLSTICK UNIVERSITY DAUGHTER CARD USER S GUIDE 1. Handling Recommendations To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective plastics. To prevent

More information

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 2. PIC and Programming

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 2. PIC and Programming Laboratory: Introduction to Mechatronics Instructor TA: Edgar Martinez Soberanes (eem370@mail.usask.ca) 2015-01-12 Lab 2. PIC and Programming Lab Sessions Lab 1. Introduction Read manual and become familiar

More information

Laboratory 10. Programming a PIC Microcontroller - Part II

Laboratory 10. Programming a PIC Microcontroller - Part II Laboratory 10 Programming a PIC Microcontroller - Part II Required Components: 1 PIC16F88 18P-DIP microcontroller 1 0.1 F capacitor 3 SPST microswitches or NO buttons 4 1k resistors 1 MAN 6910 or LTD-482EC

More information

NEW CEIBO DEBUGGER. Menus and Commands

NEW CEIBO DEBUGGER. Menus and Commands NEW CEIBO DEBUGGER Menus and Commands Ceibo Debugger Menus and Commands D.1. Introduction CEIBO DEBUGGER is the latest software available from Ceibo and can be used with most of Ceibo emulators. You will

More information

ECE372 CodeWarrior Simulator Andreou/Michaelides

ECE372 CodeWarrior Simulator Andreou/Michaelides CodeWarrior simulator demo The code can be written in C language (higher level) as well as in Assembly language (lower level). General C commands are applied across microcontroller families as opposed

More information

EXPERIMENT 4: Parallel Input/Output. Objectives Introduction to the Parallel Input/Output (I/O) Familiarization to Interfacing

EXPERIMENT 4: Parallel Input/Output. Objectives Introduction to the Parallel Input/Output (I/O) Familiarization to Interfacing EXPERIMENT 4: Parallel Input/Output Objectives Introduction to the Parallel Input/Output (I/O) Familiarization to Interfacing Components' List: 1. Protoboard 2. 4 x pushbutton 3. 4 x 330Ω resistor 4. 4

More information

Laboratory Exercise 1: Machine Language Instructions

Laboratory Exercise 1: Machine Language Instructions Laboratory Exercise 1: Machine Language Instructions Jan Eric Larsson / janeric@eit.lth.se Department of Electrical and Information Technology Lund University November 26, 2012 Goals After this laboratory

More information

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

Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio ECE2049 Embedded Computing in Engineering Design Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio In this lab, you will be introduced to the Code Composer Studio

More information

Hi-TECH C and XC8 Creating, Compiling, and Simulating a C Program Step by Step

Hi-TECH C and XC8 Creating, Compiling, and Simulating a C Program Step by Step Hi-TECH C and XC8 Creating, Compiling, and Simulating a C Program Step by Step 1. Install the MPLAB IDE that was downloaded from www.microchip.com. See detail installation instructions in handout How to

More information

Laboratory: Introduction to Mechatronics

Laboratory: Introduction to Mechatronics Laboratory: Introduction to Mechatronics Instructor TA: Edgar Martinez Soberanes (eem370@mail.usask.ca) 2017-02-9 Lab 3. LED Control and Interruptions. Lab Sessions Lab 1. Introduction to the equipment

More information

Getting Started with STK200 Dragon

Getting Started with STK200 Dragon Getting Started with STK200 Dragon Introduction This guide is designed to get you up and running with main software and hardware. As you work through it, there could be lots of details you do not understand,

More information

Keil TM MDK-ARM Quick Start for. Holtek s HT32 Series Microcontrollers

Keil TM MDK-ARM Quick Start for. Holtek s HT32 Series Microcontrollers Keil TM MDK-ARM Quick Start for Holtek s Microcontrollers Revision: V1.10 Date: August 25, 2011 Table of Contents 1 Introduction... 5 About the Quick Start Guide... 5 About the Keil MDK-ARM... 6 2 System

More information

C Programming in Atmel Studio 7 Step by Step Tutorial

C Programming in Atmel Studio 7 Step by Step Tutorial C Programming in Atmel Studio 7 Step by Step Tutorial Sepehr Naimi NicerLand.com 1/1/017 Contents Introduction... Downloading and Installing Atmel Studio... 3 Opening Atmel Studio... 3 Creating the first

More information

The University of Texas at Arlington Lecture 5

The University of Texas at Arlington Lecture 5 The University of Texas at Arlington Lecture 5 CSE 3442/5442 LCD Discussed in Chapter 12 RS, R/W, E Signals Are Used to Send/Receive Data on D0-D7 2 PIC PROGRAMMING IN C CHAPTER 7 Chapter 7 discusses the

More information

ECE383: Microcomputers Lab 4 MPLAB Introduction and PIC24 Assembly Language

ECE383: Microcomputers Lab 4 MPLAB Introduction and PIC24 Assembly Language ECE383: Microcomputers Lab 4 MPLAB Introduction and PIC24 Assembly Language Goals: The goals of this lab are to introduce students to basic PIC24 assembly language, usage of the MPLAB Integrated Development

More information

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

EECS 100/43 Lab 9 PIC Input-Output (I/O) 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

More information

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

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 1. Laboratory: Introduction to Mechatronics Instructor TA: Edgar Martinez Soberanes (eem370@mail.usask.ca) 2017-01-12 Lab 1. Introduction Lab Sessions Lab 1. Introduction to the equipment and tools to be

More information

Megawin 8051 OCD ICE

Megawin 8051 OCD ICE Megawin User Manual This document information is the intellectual property of Megawin Technology Co., Ltd. 1 Contents 1 Introduction... 3 Features... 3 Description... 3 2 Hardware Setup... 4 3 Software

More information

2 TUTORIAL. Overview. VisualDSP Getting Started Guide 2-1 for SHARC DSPs

2 TUTORIAL. Overview. VisualDSP Getting Started Guide 2-1 for SHARC DSPs 2 TUTORIAL This chapter contains the following topics. Overview on page 2-1 Exercise One: Building and Running a C Program on page 2-3 Exercise Two: Calling an Assembly Routine and Creating an LDF on page

More information

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick TOOLSTICK C8051F560 DAUGHTER CARD USER S GUIDE 1. Handling Recommendations To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective plastics. To prevent

More information

AGH University of Science and Technology Cracow Department of Electronics

AGH University of Science and Technology Cracow Department of Electronics AGH University of Science and Technology Cracow Department of Electronics Microcontrollers Lab Tutorial 2 GPIO programming Author: Paweł Russek http://www.fpga.agh.edu.pl/upt2 ver. 26.10.16 1/12 1. Objectives

More information

Tools Basics. Getting Started with Renesas Development Tools R8C/3LX Family

Tools Basics. Getting Started with Renesas Development Tools R8C/3LX Family Getting Started with Renesas Development Tools R8C/3LX Family Description: The purpose of this lab is to allow a user new to the Renesas development environment to quickly come up to speed on the basic

More information

3 TUTORIAL. In This Chapter. Figure 1-0. Table 1-0. Listing 1-0.

3 TUTORIAL. In This Chapter. Figure 1-0. Table 1-0. Listing 1-0. 3 TUTORIAL Figure 1-0. Table 1-0. Listing 1-0. In This Chapter This chapter contains the following topics: Overview on page 3-2 Exercise One: Building and Running a C Program on page 3-4 Exercise Two:

More information

Introduction to the SX Microcontroller

Introduction to the SX Microcontroller CSUS EEE174 Lab Introduction to the SX Microcontroller 599 Menlo Drive, Suite 100 Rocklin, California 95765, USA Office/Tech Support: (916) 624-8333 Fax: (916) 624-8003 Author: Andrew Lindsay / Dennis

More information

Changing the Embedded World TM. Module 3: Getting Started Debugging

Changing the Embedded World TM. Module 3: Getting Started Debugging Changing the Embedded World TM Module 3: Getting Started Debugging Module Objectives: Section 1: Introduce Debugging Techniques Section 2: PSoC In-Circuit Emulator (ICE) Section 3: Hands on Debugging a

More information

ActiveBPEL Fundamentals

ActiveBPEL Fundamentals Unit 22: Simulation ActiveBPEL Fundamentals This is Unit #22 of the BPEL Fundamentals course. In past Units we ve looked at ActiveBPEL Designer, Workspaces and Projects, created the Process itself and

More information

LAB #1: The CSM12C32 Module and PBMCUSLK Project Board

LAB #1: The CSM12C32 Module and PBMCUSLK Project Board CS/EE 5780/6780 Handout #1 Spring 2007 Myers LAB #1: The CSM12C32 Module and PBMCUSLK Project Board Lab writeup is due to your TA at the beginning of your next scheduled lab. Don t put this off to the

More information

Register-Level Programming

Register-Level Programming Introduction Register-Level Programming Programming can be considered a set a instructions that are executed in a precise order. A programming simulator can evaluate how instructions store, move and calculate

More information

Embedded Systems Module. 6EJ505. C Tutorial 3: using the ICD3 rev tjw

Embedded Systems Module. 6EJ505. C Tutorial 3: using the ICD3 rev tjw Embedded Systems Module. 6EJ505 C Tutorial 3: using the ICD3 rev. 27.9.16 tjw Images are reproduced from Reference 1. Microchip permits the use of its images for educational purposes. Main Learning Points

More information

CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench

CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench by Alex Milenkovich, milenkovic@computer.org Objectives: This tutorial will help you get started with the MSP30

More information

Command-Line Compilers for C

Command-Line Compilers for C Getting Started Guide For the PIC MCU Command-Line Compilers for C January 2008 Includes device programming with the Mach X and ICD plus MPLAB integration instructions. Custom Computer Services, Inc. Brookfield,

More information

PIC KIT 2 BASIC-USERS GUIDE FEMTO ELECTRONICS

PIC KIT 2 BASIC-USERS GUIDE FEMTO ELECTRONICS PIC KIT 2 BASIC-USERS GUIDE FEMTO ELECTRONICS SPECIFICATIONS: ICSP (In Circuit Serial Programmer). Compatible with PIC Microcontrollers (5V chips only). Compatible with MPLAB, MPLAB X and PIC KIT 2 software.

More information

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick TOOLSTICK C8051F330 DAUGHTER CARD USER S GUIDE 1. Handling Recommendations To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective plastics. To prevent

More information

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet... 4

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet... 4 Overview of the PIC 16F648A Processor: Part 1 EE 361L Lab 2.1 Last update: August 1, 2016 Abstract: This report is the first of a three part series that discusses the features of the PIC 16F648A processor,

More information

INTRODUCTION TO PICDEM Z DEVELOPMENT

INTRODUCTION TO PICDEM Z DEVELOPMENT Lab5 INTRODUCTION TO PICDEM Z DEVELOPMENT ENVIRONMENT EET 4730 By 1 Test set up ZigBee wireless network setup demonstration. A major component needed for this exercise is the Microchip ZigBee Stack. ZigBee

More information

Figure 1. Simplicity Studio

Figure 1. Simplicity Studio SIMPLICITY STUDIO USER S GUIDE 1. Introduction Simplicity Studio greatly reduces development time and complexity with Silicon Labs EFM32 and 8051 MCU products by providing a high-powered IDE, tools for

More information

P&E Microcomputer Systems, Inc. PKGPPCNEXUS

P&E Microcomputer Systems, Inc. PKGPPCNEXUS P&E Microcomputer Systems, Inc. PKGPPCNEXUS Quick Start Guide for the PHYTEC phycore-mpc5554 Rapid Development Kit Visit us on the web: www.pemicro.com 2006 P&E Microcomputer Systems, Inc. All Rights Reserved

More information

An Introduction to Komodo

An Introduction to Komodo An Introduction to Komodo The Komodo debugger and simulator is the low-level debugger used in the Digital Systems Laboratory. Like all debuggers, Komodo allows you to run your programs under controlled

More information

Cortex -M3 Hands-On LAB featuring Serial Wire Viewer

Cortex -M3 Hands-On LAB featuring Serial Wire Viewer Cortex -M3 Hands-On LAB featuring Serial Wire Viewer RealView MDK Microcontroller Development Kit featuring Keil µvision 3 Luminary Evaluation Board with ULINK2 USB to JTAG Adapter with the Luminary LM3S1968

More information

indart -HC08 In-Circuit Debugger/Programmer for Freescale HC08 Family FLASH Devices User s Manual Rev. 2.0 Copyright 2006 SofTec Microsystems DC01027

indart -HC08 In-Circuit Debugger/Programmer for Freescale HC08 Family FLASH Devices User s Manual Rev. 2.0 Copyright 2006 SofTec Microsystems DC01027 indart -HC08 In-Circuit Debugger/Programmer for Freescale HC08 Family FLASH Devices User s Manual Rev. 2.0 Copyright 2006 SofTec Microsystems DC01027 SofTec Microsystems E-mail (general information): info@softecmicro.com

More information

The board contains the connector for SWD bus to implement SWD method of programming. Fig. K190 VDD 2 GND 4

The board contains the connector for SWD bus to implement SWD method of programming. Fig. K190 VDD 2 GND 4 3. Programming Once the machine code containing the user program is prepared on a personal computer, the user must load the code into the memory of the processor. Several methods for loading are available.

More information

As CCS starts up, a splash screen similar to one shown below will appear.

As CCS starts up, a splash screen similar to one shown below will appear. APPENDIX A. CODE COMPOSER STUDIO (CCS) v6.1: A BRIEF TUTORIAL FOR THE DSK6713 A.1 Introduction Code Composer Studio (CCS) is Texas Instruments Eclipse-based integrated development environment (IDE) for

More information

Lab 1 : An Introduction to SPIM, the MIPS architecture simulator

Lab 1 : An Introduction to SPIM, the MIPS architecture simulator Lab 1 : An Introduction to SPIM, the MIPS architecture simulator Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work 1

More information

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

Development board for PIC24FJ128GA010. with 262k TFT color LCD module Development board for PIC24FJ128GA010 with 262k TFT color LCD module Picture shown with optional 3.2 TFT LCD with touch panel 1 INTRODUCTION Development board for PIC24FJ128GA010 provides a low cost platform

More information

8051 Instruction Opcodes In Hexadecimal Order

8051 Instruction Opcodes In Hexadecimal Order 8051 Instruction Opcodes In Hexadecimal Order x86 opcode cheatsheet Opcode 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 8051 Microcontroller Instruction Set Table 1-4. Instruction Opcodes

More information

A Quick Introduction to MPLAB SIM

A Quick Introduction to MPLAB SIM A Quick Introduction to MPLAB SIM Welcome to this web seminar, A Quick Introduction to MPLAB SIM. My name is Darrel Johansen and I m a manager in the Development Tools group at Microchip. Page 1 What Is

More information

F28069 ControlCard Lab1

F28069 ControlCard Lab1 F28069 ControlCard Lab1 Toggle LED LD2 (GPIO31) and LD3 (GPIO34) 1. Project Dependencies The project expects the following support files: Support files of controlsuite installed in: C:\TI\controlSUITE\device_support\f28069\v135

More information

ECE 5655/4655 Laboratory Problems

ECE 5655/4655 Laboratory Problems Assignment #1 ECE 5655/4655 Laboratory Problems Make note of the following: Due Monday February 10, 2014 Each team of two will turn in documentation for the assigned problem(s), that is, assembly or C

More information

Pre-Lab: Part 1 Using The Development Environment. Purpose: Minimum Parts Required: References: Handouts:

Pre-Lab: Part 1 Using The Development Environment. Purpose: Minimum Parts Required: References: Handouts: Purpose: Minimum Parts Required: References: Handouts: Laboratory Assignment Number 1 for Mech 143/ELEN123 Due by 5:00pm in lab box on Friday, April 19, 2002 Pre-Lab due by 5:00pm in lab box on Tuesday,

More information

NonStop Development Environment for Eclipse 4.0 Debugging Supplement

NonStop Development Environment for Eclipse 4.0 Debugging Supplement NonStop Development Environment for Eclipse 4.0 Debugging Supplement HP Part Number: 732675-001 Published: October 2013 Edition: NSDEE 4.0, J06.03 and subsequent J-series RVUs, H06.08 and subsequent H-series

More information

IAR C-SPY Hardware Debugger Systems User Guide

IAR C-SPY Hardware Debugger Systems User Guide IAR C-SPY Hardware Debugger Systems User Guide for the Renesas SH Microcomputer Family CSSHHW-1 COPYRIGHT NOTICE Copyright 2010 IAR Systems AB. No part of this document may be reproduced without the prior

More information

MIT Nerd Kit. Configurable Application Modules. Switches

MIT Nerd Kit. Configurable Application Modules. Switches MIT 6.004 Nerd Kit MIT 6.004 Nerd Kit comes with an array of 16 computational blocks. You can configure these blocks to do anything from computing just ANDs and ORs to being a Beta microprocessor. In addition

More information

P A R T 1 Exploring PART-1-H8709.indd 1 PART-1-H8709.indd 1 3/4/ :37:37 AM 3/4/ :37:37 AM

P A R T 1 Exploring PART-1-H8709.indd 1 PART-1-H8709.indd 1 3/4/ :37:37 AM 3/4/ :37:37 AM PART 1 Exploring DAY 1 The Adventure Begins The Plan This will be our first experience with the PIC32 32-bit microcontroller and, for some of you, the first project with the MPLAB IDE Integrated Development

More information

ICD Module (P/N ) Instruction Manual

ICD Module (P/N ) Instruction Manual ICD Module (P/N 905501) Instruction Manual 283 Indian River Road Orange, CT 06477 USA Tel 203-799-7875 Fax 203-799-7892 www.diversifiedengineering.net Table of Contents Section Description Page 1 Overview

More information

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

Quick Start Guide TWR-S08PT60. 5-Volt S08P Family of 8-bit MCUs for Industrial and Appliance Applications TOWER SYSTEM TWR-S08PT60 5-Volt S08P Family of 8-bit MCUs for Industrial and Appliance Applications TOWER SYSTEM Get to Know the TWR-S08PT60 Primary Connector Force BDM Infrared Port Reset Switch Motor Control Daughter

More information

HI-TIDE Release Notes for Version 3.13

HI-TIDE Release Notes for Version 3.13 HI-TIDE Release Notes for Version 3.13 Copyright (C) 2007 HI-TECH Software. All Rights Reserved. Printed in Australia. Produced on: September 24, 2007 HI-TECH Software Pty. Ltd. ACN 002 724 549 45 Colebard

More information

CodeWarrior Development Studio for Freescale 68HC12/HCS12/HCS12X/XGATE Microcontrollers Quick Start SYSTEM REQUIREMENTS Hardware Operating System 200

CodeWarrior Development Studio for Freescale 68HC12/HCS12/HCS12X/XGATE Microcontrollers Quick Start SYSTEM REQUIREMENTS Hardware Operating System 200 CodeWarrior Development Studio for Freescale 68HC12/HCS12/HCS12X/XGATE Microcontrollers Quick Start SYSTEM REQUIREMENTS Hardware Operating System 200 MHz Pentium II processor or AMD-K6 class processor,

More information

QWIKBUG MONITOR PROGRAM

QWIKBUG MONITOR PROGRAM Appendix A4 QWIKBUG MONITOR PROGRAM Burt Sims A4.1 INTRODUCTION QwikBug is a resident monitor program for the Microchip PIC18F452 microcontroller with its flash program memory and its built-in background

More information

ECE 362 Experiment 3: General Purpose I/O

ECE 362 Experiment 3: General Purpose I/O ECE 362 Experiment 3: General Purpose I/O 1.0 Introduction In this experiment, you will learn how to attach simple input devices (pushbuttons) and simple output devices (LEDs) to an STM32 development board.

More information

Barracuda I and II Chips (I mask is OK36N and II mask is OK79X) PC9S12DP256

Barracuda I and II Chips (I mask is OK36N and II mask is OK79X) PC9S12DP256 How To See the COP Watchdog Fire in the Nohau Trace Buffer with Motorola HCS12 Microcontrollers Application Note by Doron Fael & Robert Boys V2.6 January 16, 2002 Purpose This note demonstrates the Nohau

More information

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

R8C/Tiny. StarterKit Plus SKP8CMINI-15, SKP8CMINI-17. Clock Stop Detect QuickStart Guide R8C/Tiny StarterKit Plus SKP8CMINI-15, SKP8CMINI-17 Target/Bus Power Mode Selector Clock Stop Detect R8C/Tiny CdS Cell Thermistor Slide Switch S1 Pushbutton Switch S2 RTA-FoUSB-MON In-Circuit

More information

FR Family MB Emulator System Getting Started Guide

FR Family MB Emulator System Getting Started Guide FR Family MB2198-01 Emulator System Getting Started Guide Doc. No. 002-05222 Rev. *A Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 http://www.cypress.com Copyrights Copyrights Cypress

More information

TRACE32 Debugger Getting Started... ICD Tutorial About the Tutorial... 2

TRACE32 Debugger Getting Started... ICD Tutorial About the Tutorial... 2 ICD Tutorial TRACE32 Online Help TRACE32 Directory TRACE32 Index TRACE32 Debugger Getting Started... ICD Tutorial... 1 About the Tutorial... 2 Working with the Debugger... 3 Set up the Program Environment

More information

DOWNLOAD PDF EXCEL MACRO TO PRINT WORKSHEET TO

DOWNLOAD PDF EXCEL MACRO TO PRINT WORKSHEET TO Chapter 1 : All about printing sheets, workbook, charts etc. from Excel VBA - blog.quintoapp.com Hello Friends, Hope you are doing well!! Thought of sharing a small VBA code to help you writing a code

More information

Getting Started with the Microcontroller Student Learning Kit (MCUSLK) Using the MC9S12C32 MCU Application Module (CSM-12C32)

Getting Started with the Microcontroller Student Learning Kit (MCUSLK) Using the MC9S12C32 MCU Application Module (CSM-12C32) Freescale Semiconductor User Guide MCUSLK_CSM12C32 Rev. 0, 6/2005 Getting Started with the Microcontroller Student Learning Kit (MCUSLK) Using the MC9S12C32 MCU Application Module (CSM-12C32) By Eduardo

More information

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

Quick Start Guide TWR-S08DC-PT60. Tower System Daughter Card for the 5-Volt 8-bit MC9S08P Family TOWER SYSTEM Quick Start Guide TWR-S08DC-PT60 Tower System Daughter Card for the 5-Volt 8-bit MC9S08P Family TOWER SYSTEM Quick Start Guide Get to Know the TWR-S08DC-PT60 OSBDM USB Connector Potentiometer Reset Switch

More information

Using Code Composer Studio IDE with MSP432

Using Code Composer Studio IDE with MSP432 Using Code Composer Studio IDE with MSP432 Quick Start Guide Embedded System Course LAP IC EPFL 2010-2018 Version 1.2 René Beuchat Alex Jourdan 1 Installation and documentation Main information in this

More information

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick TOOLSTICK UNIVERSITY DAUGHTER CARD USER S GUIDE 1. Handling Recommendations To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective plastics. To prevent

More information

SKP16C62P Tutorial 2 Creating A New Project Using TM. Renesas Technology America Inc.

SKP16C62P Tutorial 2 Creating A New Project Using TM. Renesas Technology America Inc. SKP16C62P Tutorial 2 Creating A New Project Using TM Renesas Technology America Inc. 1 Overview This tutorial describes the steps in creating new programs. To get the most out of the SKP including the

More information

Figure 26 CC Debugger Interface

Figure 26 CC Debugger Interface Figure 26 CC Debugger Interface Once the CC Debugger is set up with the status indicator LED showing green, you are ready to either read or write a hex file from the board, or to start debugging a project

More information

DOMAIN TECHNOLOGIES. Getting Started Guide Version 1.1. BoxView IDE. Integrated Development Environment

DOMAIN TECHNOLOGIES. Getting Started Guide Version 1.1. BoxView IDE. Integrated Development Environment Getting Started Guide Version 1.1 BoxView IDE Integrated Development Environment Table of Contents INTRODUCTION...3 System Requirements...3 INSTALLATION...4 License Server...4 Registration...5 Node Locked

More information

IT Essentials v6.0 Windows 10 Software Labs

IT Essentials v6.0 Windows 10 Software Labs IT Essentials v6.0 Windows 10 Software Labs 5.2.1.7 Install Windows 10... 1 5.2.1.10 Check for Updates in Windows 10... 10 5.2.4.7 Create a Partition in Windows 10... 16 6.1.1.5 Task Manager in Windows

More information

F28335 ControlCard Lab1

F28335 ControlCard Lab1 F28335 ControlCard Lab1 Toggle LED LD2 (GPIO31) and LD3 (GPIO34) 1. Project Dependencies The project expects the following support files: Support files of controlsuite installed in: C:\TI\controlSUITE\device_support\f2833x\v132

More information

Resource 2 Embedded computer and development environment

Resource 2 Embedded computer and development environment Resource 2 Embedded computer and development environment subsystem The development system is a powerful and convenient tool for embedded computing applications. As shown below, the development system consists

More information

3 Getting Started with Objects

3 Getting Started with Objects 3 Getting Started with Objects If you are an experienced IDE user, you may be able to do this tutorial without having done the previous tutorial, Getting Started. However, at some point you should read

More information

Physics 335 Intro to MicroControllers and the PIC Microcontroller

Physics 335 Intro to MicroControllers and the PIC Microcontroller Physics 335 Intro to MicroControllers and the PIC Microcontroller May 4, 2009 1 The Pic Microcontroller Family Here s a diagram of the Pic 16F84A, taken from Microchip s data sheet. Note that things are

More information

All messages are color-coded to display messages as New, Seen, Answered, Flagged or Deleted.

All messages are color-coded to display messages as New, Seen, Answered, Flagged or Deleted. Using Academic Email STUDENTS: are automatically provided with a Student Academic Email account, whenever you receive your NetID network account at CCAC. Your email address will be NetIDusername@acd.ccac.edu.

More information

Embedded programming, AVR intro

Embedded programming, AVR intro Applied mechatronics, Lab project Embedded programming, AVR intro Sven Gestegård Robertz Department of Computer Science, Lund University 2017 Outline 1 Low-level programming Bitwise operators Masking and

More information

1 INTRODUCTION. Purpose. Audience. Figure 1-0. Table 1-0. Listing 1-0.

1 INTRODUCTION. Purpose. Audience. Figure 1-0. Table 1-0. Listing 1-0. 1 INTRODUCTION Figure 1-0. Table 1-0. Listing 1-0. Purpose The ADSP-21160 SHARC DSP Instruction Set Reference provides assembly syntax information for the ADSP-21160 Super Harvard Architecture (SHARC)

More information

1.2 - Introduction to the IAR Workbench IDE *

1.2 - Introduction to the IAR Workbench IDE * OpenStax-CNX module: m13621 1 1.2 - Introduction to the IAR Workbench IDE * Naren Anand Based on Introduction to CrossStudio MSP430 IDE by Kileen Cheng This work is produced by OpenStax-CNX and licensed

More information

Storing Your Exercise Files

Storing Your Exercise Files Storing Your Exercise Files This appendix contains an overview for using this book with various file storage media, such as a USB flash drive or hard drive. Detailed instructions for downloading and unzipping

More information

PIC32&Overview& E155&

PIC32&Overview& E155& PIC32&Overview& E155& Outline PIC 32 Architecture MIPS M4K Core PIC 32 Peripherals PIC 32 Basic Operations Clock 2 Microcontroller Approximately $16B of microcontrollers were sold in 2011, and the market

More information