Announcements Homework #3 due today. Ports. Outline for Today C8051 SFRs & Port I/O Worksheet #4 - simple I/O code. Using Ports

Size: px
Start display at page:

Download "Announcements Homework #3 due today. Ports. Outline for Today C8051 SFRs & Port I/O Worksheet #4 - simple I/O code. Using Ports"

Transcription

1 Announcements Homework #3 due today Online LMS Assessment Everybody submits their own on LMS You should have a lab notebook by now You should have the Lab Manual by now Outline for Today C8051 SFRs & Port I/O Worksheet #4 - simple I/O code Ports Ports are sets of connections on the microcontroller They are used to communicate with the external circuitry (input/output) The C8051 has 8 ports, P0, P1, P7 We will only use Ports P0, P1, P2, and P3 The C8051 manual lists Ports and the use of their pins 2 3 C8051F020 Block Diagram (pg 18) Using Ports Ports 0 7 These input and output pins can be connected to wires where signals are produced Either a sensor will detect something and send a signal to the microcontroller or the microcontroller will send out a signal to control a hardware feature We will show you where you can make these connections using a prototyping board (commonly called a protoboard or bread board) We need a way to read the signals on these pins, send signals out these pins, and configure the system to know which way the system is wired (input or output) 4 5

2 Special Function Registers Special Function Registers A Special Function Register (SFR) is a microprocessor feature capable of receiving information, holding it, and transferring it. SFRs are used in the C8051 for: Input/Output Control (Configuring pins, A/D, ) C8051 SFRs are listed in the header file: c8051f020.h SFRs have a size of 1 byte (8 bits) The SFRs look like memory locations to the software Counting Timing Bit Identification (One Byte) Arithmetic operations, addressing, Special Function Registers, Ports & Communication Each I/O port has a SFR associated with it Example: P2 is the SFR associated with Port 2 8-bit register where each bit is associated with a specific pin of Port 2 (C8051 manual pg 175) Special Function Registers, Ports & Communication Using Port 2 as an example: The software communicates with the pins of Port 2 by using SFR P2 Input example: the current value (status of all 8 bits) can be used to give a variable, input, a value: input = P2; /* read PORT 2 */ Output example: the 8 pins of Port 2 can be assigned a value: P2 = 0x30; /* write to PORT 2*/ The hardware communicates by connecting wires to the pins of Port 2 8 9

3 More Examples of SFRs Application of SFRs Input/Output Port SFR P0 Configuration P1MDOUT output mode for P1 Control ADC1CN control of analog to digital converter Example: In the case of I/O ports, we need to input settings into some SFRs to determine how we will use the port. I/O Ports can be set to operate in different modes by switching transistors on and off Configuration of Port 3 Output Mode The eight lines of Port 3 can be individually configured as push-pull (output) or open-drain (input). We set the configuration for each line through the special function register P3MDOUT Writing a 0 to a bit sets the corresponding pin of Port 3 to open drain; writing a 1 to a bit sets the corresponding pin of Port 3 to push-pull. Example: P3MDOUT = 0x0F; /* Pins 0-3 push-pull, pins 4-7 open-drain */ Configuring I/O Pins When using P0-P3 for digital output, set the bits in the corresponding output mode SFR for push-pull. Data can then be sent to the pins with the Port SFR When using P0-P3 for digital input, set the bits in the corresponding output mode SFR for open-drain. Additionally, you need to send a high value to those pins using the port SFR. Note: Port 1 can also be used for analog input, so additional settings need to be made in the P1MDIN SFR to set it for digital or analog input (C8051 manual pg 174). Since hardware configuration does not change in a typical application, these settings only need to be done once at the beginning of the code. (C8051 manual pg 176) 12 13

4 Configuring I/O Ports Here is an example using pins 2-7 of Port 2 and pins 0-2 of Port 3 for digital input (open-drain, set to 0) and pins 0-1 of Port 2 and 3-7 of Port 3 for digital output (push-pull, set to 1). Put these commands in a function that you will call at the beginning of the program Port 2 config: 0x03 = Port 3 config: 0xF8 = Special Function Registers, Ports & Communication Each I/O port has a SFR associated with it Example: P2 is the SFR associated with Port 2 8-bit register where each bit is associated with a specific pin of Port 2 (C8051 manual pg 175) void Port_Init(void) { P2MDOUT = 0x03; // Pins 0-1 push-pull, pins 2-7 open-drain P2 = 0xFC; // Set pins 2-7 of P2 P3MDOUT = 0xF8; // Pins 3-7 push-pull, pins 0-2 open-drain P3 = 0x07; // Set pins 0-2 of P3 } Bitwise operations, example { P2 = 0x19; // assignment operation P2 = 0xC1; // bitwise OR P2 &= ~0x33; // bitwise AND } P2 = 0x xC1 = P2 = 0xC x33 = ~0x33 = P2 &= ~0x Sample Code, sbit Remember, we can use logic operations to change state of a pin, if P2.2 is connected to LED0 To turn on LED0, force P2.2 to go low P2 &= ~0x04; The C8051 also has the ability to change the state of individual bits on certain ports sbit at 0xA2 LED0; /* LED0 associated with P2.2 */ // the " " is 2 underscore characters together LED0 = 0; /* Light LED0 */ Same can be done with input ports to read state of individual pins 16 17

5 Reading & Writing to Bits & Ports Connections to the Microcontroller When should you use sbit? If you want to read or change the state of one or two individual bits of a port, using the sbit command can be very efficient. If you want to read or change the state of multiple pins, it is recommended that you use the port register. Example: To make bits 3-7 of Port 2 low: P2 = P2 & 0x07; or P2 &= 0x07; Each protoboard has an EVB Port Connector, see back cover of lab manual and pin sheet For example, hardware connects to Port 3 by using pins Review the numbering scheme on the protoboard connector block to EVB. Note the location of pins 1 and 2 to see how they are sequenced Pin-out Form available on LMS Lab Check-Off Before implementing code and setting up the hardware, determine the initialization and EVB pin connections. Example: complete the pin-out form using the following information P2.6 is a pushbutton input with an sbit label PB1 P2.7 is a slide switch input with an sbit label SS P3.2 is an LED output with an sbit label LED0 Indicate Port pins used, sbit labels and Port initialization code When you complete a lab assignment, you will need to demonstrate your lab to a TA NOTE: We NO LONGER require it to be a TA from your section! Check-off procedure All partners should be present (but missing member will lose points) Neatness of the wiring matters Lab Notebook needs to be completed to that point You will be asked questions from the Demonstration and Verification section at end of lab as well as some additional questions All partners need to know lab well Questions will be directed towards each partner If the laboratory does not completely meet the requirements: You will need to correct the problem Request a new check-off and there may be a small penalty 20 21

6 IMPORTANT: Compiler Issues Lab 1, part 1 Pseudo Code Remember Do not use special characters in the file name - and _ are OK, but NOT # Only use a single. in the name Save your program as a.c file (.c files are actually just plain text files) compiler directives declare global variables function prototypes main function declare local variables initialization functions while (TRUE) read sensors set outputs for LED, buzzer and BILED end while end main function Pseudo Code continued Pseudo Code in general function initialize ports() set ports 2 and 3 for input/output Alternative approach (not recommended): can create individual functions for each input bit, but using sbits directly is much simpler function sensor_1() read push button 1 and return appropriate value function sensor_2() read push button 2 and return appropriate value function sensor_3() read slide switch and return appropriate value function set outputs() determine LED, buzzer and BILED states based on the four conditions In general, there is no single best code implementation The pseudo-code should reflect your approach to solving the specified problem 24 25

7 Continue Lab 1, part 1 Complete Pin-out form for Lab 1, part 1 Include it in your notebook If you finish and need to get checked off See Demonstration and Verification at end of Lab 1, part 1 description. At a minimum, start Homework 4 (see due date on course calendar) By this point, you can use open shop hours to complete the lab and get checked off All partners should be present for check-off. Quiz 1 next Class RPILMS BRING YOUR LAPTOP 40 Minutes; open printed book and notes NO old quiz copies, NO other web pages except LMS Calculators OK, but NOT on cellphones Coverage Logic review Worksheet #2 Pseudo Code Indent for loops Must logically work Number conversion review Worksheet #1 Wiring see example problem Next Class Quiz #1 (see sample problem on wiring) Homework #4 due Lab 1, part 1 check-off Before you leave Turn off the power to the car. Return your protoboard to cabinet slot that matches number on protoboard. Parts bags should be left with protoboard. Return your logic probe to the back cabinet. 28

Outline for Today. Lab Equipment & Procedures. Teaching Assistants. Announcements

Outline for Today. Lab Equipment & Procedures. Teaching Assistants. Announcements Announcements Homework #2 (due before class) submit file on LMS. Submit a soft copy using LMS, everybody individually. Log onto the course LMS site Online Assignments Homework 2 Upload your corrected HW2-vn.c

More information

By the end of Class. Outline. Homework 5. C8051F020 Block Diagram (pg 18) Pseudo-code for Lab 1-2 due as part of prelab

By the end of Class. Outline. Homework 5. C8051F020 Block Diagram (pg 18) Pseudo-code for Lab 1-2 due as part of prelab By the end of Class Pseudo-code for Lab 1-2 due as part of prelab Homework #5 on website due before next class Outline Introduce Lab 1-2 Counting Timers on C8051 Interrupts Laboratory Worksheet #05 Copy

More information

Before Class Install SDCC Instructions in Installing_SiLabs-SDCC- Drivers document. Solutions to Number Systems Worksheet. Announcements.

Before Class Install SDCC Instructions in Installing_SiLabs-SDCC- Drivers document. Solutions to Number Systems Worksheet. Announcements. August 15, 2016 Before Class Install SDCC Instructions in Installing_SiLabs-SDCC- Drivers document Install SiLabs Instructions in Installing_SiLabs-SDCC- Drivers document Install SecureCRT On LMS, also

More information

Magic 8 Ball. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

Magic 8 Ball. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name MPS Magic 8 Ball Lab Exercise Magic 8 Ball Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name Notes: You must work on this assignment with your partner. Hand in a printer

More information

MICROPROCESSORS A (17.383) Fall Lecture Outline

MICROPROCESSORS A (17.383) Fall Lecture Outline MICROPROCESSORS A (17.383) Fall 2010 Lecture Outline Class # 04 September 28, 2010 Dohn Bowden 1 Today s Lecture Syllabus review Microcontroller Hardware and/or Interface Programming/Software Lab Homework

More information

ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class)

ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class) ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class) Your homework should be neat and professional looking. You will loose points if your HW is not properly

More information

UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING CMPE13/L: INTRODUCTION TO PROGRAMMING IN C SPRING 2013

UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING CMPE13/L: INTRODUCTION TO PROGRAMMING IN C SPRING 2013 Introduction Reading Concepts UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING CMPE13/L: INTRODUCTION TO PROGRAMMING IN C SPRING 2013 Lab 2 Bouncing LEDs In this lab, you will

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

C Language Programming

C Language Programming C Language Programming for the 8051 Overview C for microcontrollers Review of C basics Compilation flow for SiLabs IDE C extensions In-line assembly Interfacing with C Examples Arrays and Pointers I/O

More information

Pre-Laboratory #Boolean Expressions ECE 332

Pre-Laboratory #Boolean Expressions ECE 332 Name: G Number: Pre-Laboratory #Boolean Expressions ECE 332 1 Introduction This pre-lab is divided into two parts. In part one you will build a circuit for providing inputs to your CPLD board on your breadboard.

More information

CONTENTS BIGAVR2 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6

CONTENTS BIGAVR2 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6 CONTENTS BIGAVR2 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6 Switches 7 Jumpers 8 MCU Sockets 9 Power Supply 11 On-board USB 2.0 Programmer 12 Oscillator 14 LEDs 15 Reset Circuit 17 Push-buttons

More information

C:\Users\Jacob Christ\Documents\MtSAC\ELEC74 Mt SAC - chipkit\homework Sheets.docx

C:\Users\Jacob Christ\Documents\MtSAC\ELEC74 Mt SAC - chipkit\homework Sheets.docx ELEC 74 Worksheet 1 Logic Gate Review 1. Draw the truth table and schematic symbol for: a. An AND gate b. An OR gate c. An XOR gate d. A NOT gate ELEC74 Worksheet 2 (Number Systems) 1. Convert the following

More information

MICROPROCESSORS A (17.383) Fall Lecture Outline

MICROPROCESSORS A (17.383) Fall Lecture Outline MICROPROCESSORS A (17.383) Fall 2010 Lecture Outline Class # 03 September 21, 2010 Dohn Bowden 1 Today s Lecture Syllabus review Microcontroller Hardware and/or Interface Programming/Software Lab Homework

More information

EECE 690/890 Digital Radio Hardware Design. Team 3 Assignment 2. Informal Design Review: Thurs 10/15/98 Deliverables Due: Tues 10/20/98

EECE 690/890 Digital Radio Hardware Design. Team 3 Assignment 2. Informal Design Review: Thurs 10/15/98 Deliverables Due: Tues 10/20/98 EECE 690/890 Digital Radio Hardware Design Team 3 Assignment 2 Informal Design Review: Thurs 10/15/98 Deliverables Due: Tues 10/20/98 Introduction This is the second in a series of assignments designed

More information

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O ECE2049-E17 Lecture 4 1 ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O Administrivia Homework 1: Due today by 7pm o Either place in box in ECE office or give to me o Office hours tonight!

More information

ELEC 3040/3050 Lab Manual Lab 2 Revised 8/20/14. LAB 2: Developing and Debugging C Programs in MDK-ARM for the STM32L100RC Microcontroller

ELEC 3040/3050 Lab Manual Lab 2 Revised 8/20/14. LAB 2: Developing and Debugging C Programs in MDK-ARM for the STM32L100RC Microcontroller LAB 2: Developing and Debugging C Programs in MDK-ARM for the STM32L100RC Microcontroller The objective of this laboratory session is to become more familiar with the process for creating, executing and

More information

Real Time Operating Systems Application Board Details

Real Time Operating Systems Application Board Details Real Time Operating Systems Application Board Details Hardware Interface All labs involve writing a C program to generate an interface between a PC and an external Multi-Applications board. A 40-way ribbon

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

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

CONTENTS. dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6

CONTENTS. dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6 CONTENTS dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6 Switches and Jumpers 7 MCU Sockets 8 Power Supply 10 On-Board USB 2.0 Programmer 11 MikroICD 12 RS-232 Communication Circuit 13

More information

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

ECE 2036 Lab 4 Setup and Test mbed I/O Hardware Check-Off Deadline: Thursday, March 17, Name: ECE 2036 Lab 4 Setup and Test mbed I/O Hardware Check-Off Deadline: Thursday, March 17, 2016 Name: Item Part 1. (40%) Color LCD Hello World Part 2. (10%) Timer display on Color LCD Part 3. (25%) Temperature

More information

REQUIRED MATERIALS Epiphany-DAQ board Wire Jumpers Switch LED Resistors Breadboard Multimeter (if needed)

REQUIRED MATERIALS Epiphany-DAQ board Wire Jumpers Switch LED Resistors Breadboard Multimeter (if needed) Page 1/6 Lab 1: Intro to Microcontroller Development, 06-Jan-16 OBJECTIVES This lab will introduce you to the concept of developing with a microcontroller while focusing on the use of General Purpose Input/Output

More information

C:\Users\jacob\Documents\MtSAC\ELEC74 Mt SAC - chipkit\homework Sheets.docx

C:\Users\jacob\Documents\MtSAC\ELEC74 Mt SAC - chipkit\homework Sheets.docx ELEC 74 Worksheet 1 Logic Gate Review 1. Draw the truth table and schematic symbol for: a. An AND gate b. An OR gate c. An XOR gate d. A NOT gate ELEC74 Worksheet 2 (Number Systems) 1. Convert the following

More information

Microprocessors B Lab 1 Spring The PIC24HJ32GP202

Microprocessors B Lab 1 Spring The PIC24HJ32GP202 The PIC24HJ32GP202 Lab Report Objectives Materials See separate report form located on the course webpage. This form should be completed during the performance of this lab. 1) To familiarize the student

More information

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #9: Exam Review w/ Solutions

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #9: Exam Review w/ Solutions ECE2049: Embedded Computing in Engineering Design A Term Fall 2018 Lecture #9: Exam Review w/ Solutions Reading for Today: Review all reading and notes, Davies Ch 1, 2, 4,7, MSP430 User's Guide Ch 6.1,

More information

Using peripherals on the MSP430 (if time)

Using peripherals on the MSP430 (if time) Today's Plan: Announcements Review Activities 1&2 Programming in C Using peripherals on the MSP430 (if time) Activity 3 Announcements: Midterm coming on Feb 9. Will need to write simple programs in C and/or

More information

AN127 FLASH PROGRAMMING VIA THE C2 INTERFACE. Relevant Devices. Introduction. C2 Interface

AN127 FLASH PROGRAMMING VIA THE C2 INTERFACE. Relevant Devices. Introduction. C2 Interface FLASH PROGRAMMING VIA THE C2 INTERFACE Relevant Devices This application note applies to the following devices: C8051F300, C8051F301, C8051F302, and C8051F303. Introduction This application note describes

More information

Which LED(s) turn on?

Which LED(s) turn on? Go to www.menti.com and use the code 90 95 79 Which LED(s) turn on? May 4, 2018 E40M Spring 2018 T. Diamandis, J. Plummer, R. Howe, C. Z. Lee 1 Lab 3b, 3c The LED Cube ENGR 40M Theo Diamandis Stanford

More information

Downloaded from Elcodis.com electronic components distributor

Downloaded from Elcodis.com electronic components distributor CONTENTS LV24-33A KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6 Switches and Jumpers 7 MCU Sockets 8 Power Supply 10 On-board USB 2.0 Programmer 11 RS-232 Communication Circuit 12 LEDs 14 Push

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

Programming Assignment 1: Pushbutton and Light

Programming Assignment 1: Pushbutton and Light CSE 30 WINTER 2010 Programming Assignment 1: Pushbutton and Light Associated Cypress Board: CY3214 Associated Part Family: CY8C24894 PSoC Designer Version: 5.0 Revised: 10.5.2009 Summary When the push

More information

University of Texas at El Paso Electrical and Computer Engineering Department

University of Texas at El Paso Electrical and Computer Engineering Department University of Texas at El Paso Electrical and Computer Engineering Department EE 3176 Laboratory for Microprocessors I Fall 2016 LAB 07 Flash Controller Goals: Bonus: Pre Lab Questions: Familiarize yourself

More information

EE251: Thursday November 15

EE251: Thursday November 15 EE251: Thursday November 15 Major new topic: MEMORY A KEY topic HW #7 due today; HW #8 due Thursday, Nov. 29 Lab #8 finishes this week; due week of Nov. 26 All labs MUST be completed/handed-in by Dec.

More information

RFID: Read and Display V2010. Version 1.1. Sept Cytron Technologies Sdn. Bhd.

RFID: Read and Display V2010. Version 1.1. Sept Cytron Technologies Sdn. Bhd. PR8-B RFID: Read and Display V2010 Version 1.1 Sept 2010 Cytron Technologies Sdn. Bhd. Information contained in this publication regarding device applications and the like is intended through suggestion

More information

ECE2049: Embedded Systems in Engineering Design Lab Exercise #3 C Term Making a Time and Temperature Display

ECE2049: Embedded Systems in Engineering Design Lab Exercise #3 C Term Making a Time and Temperature Display ECE2049: Embedded Systems in Engineering Design Lab Exercise #3 C Term 2019 Making a Time and Temperature Display In this laboratory you will use the MSP430 and several of its peripherals to implement

More information

17. I 2 C communication channel

17. I 2 C communication channel 17. I 2 C communication channel Sometimes sensors are distant to the microcontroller. In such case it might be impractical to send analog signal from the sensor to the ADC included in the microcontroller

More information

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

ECE383: Microprocessors Lab 9 Analog-to-Digital and Digital-to-Analog Conversion with I 2 C Serial EEPROM Data Storage ECE383: Microprocessors Lab 9 Analog-to-Digital and Digital-to-Analog Conversion with I 2 C Serial EEPROM Data Storage Goals: The goals of this lab are to introduce students to a PIC24-based hardware system

More information

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter C8051F38X DEVELOPMENT KIT USER S GUIDE 1. Kit Contents The C8051F38x Development Kit contains the following items: C8051F380 Target Board C8051Fxxx Development Kit Quick-start Guide Silicon Laboratories

More information

EECE 2411/2211-Introduction to Electrical and Computer Engineering Lab. Lab 3

EECE 2411/2211-Introduction to Electrical and Computer Engineering Lab. Lab 3 EECE 2411/2211-Introduction to Electrical and Computer Engineering Lab Lab 3 Building Multi-Gate Logic Circuits Introduction: In this lab we will look at combining the simple logic gates we used in the

More information

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

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad Objectives To be familiar with microcontrollers, PIC18F4550 microcontroller. Tools PIC18F4550 Microcontroller, MPLAB software,

More information

} Evaluate the following expressions: 1. int x = 5 / 2 + 2; 2. int x = / 2; 3. int x = 5 / ; 4. double x = 5 / 2.

} Evaluate the following expressions: 1. int x = 5 / 2 + 2; 2. int x = / 2; 3. int x = 5 / ; 4. double x = 5 / 2. Class #10: Understanding Primitives and Assignments Software Design I (CS 120): M. Allen, 19 Sep. 18 Java Arithmetic } Evaluate the following expressions: 1. int x = 5 / 2 + 2; 2. int x = 2 + 5 / 2; 3.

More information

Analog Conversion and MAC. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

Analog Conversion and MAC. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name MPS ADC Lab Exercise Analog Conversion and MAC Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name Notes: You must work on this assignment with your partner. Hand in a printed

More information

Lab #12: ArithmeticLogic Unit

Lab #12: ArithmeticLogic Unit Lab #12: ArithmeticLogic Unit Zack Mattis Lab: 3/27/17 Report: 4/8/17 Partner: Brendan Schuster Purpose In this lab, a fully functioning 4-bit Arithmetic Logic Unit (ALU) was designed and fully implemented

More information

1.3 Check for solder bridges, flux or other contaminants, or any evidence of cracked or damaged components.

1.3 Check for solder bridges, flux or other contaminants, or any evidence of cracked or damaged components. SAT0050 FPD-Link III to I2C Analyzer Board test procedure 1 Visual inspection 1.1 Verify that R47 is not installed. 1.2 Verify that all other components are installed. 1.3 Check for solder bridges, flux

More information

Asynchronous & Synchronous Serial Communications Interface. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

Asynchronous & Synchronous Serial Communications Interface. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name MPS Serial Communication Lab Exercise Asynchronous & Synchronous Serial Communications Interface Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name Notes: You must work on

More information

Laboratory of Sensors Engineering Sciences 9 CFU

Laboratory of Sensors Engineering Sciences 9 CFU Laboratory of Sensors Engineering Sciences 9 CFU Contacts Alexandro Catini catini@ing.uniroma2.it Phone: +39 06 7259 7347 Department of Electronic Engineering First Floor - Room B1-07b Course Outline THEORY

More information

Arduino Uno. Power & Interface. Arduino Part 1. Introductory Medical Device Prototyping. Digital I/O Pins. Reset Button. USB Interface.

Arduino Uno. Power & Interface. Arduino Part 1. Introductory Medical Device Prototyping. Digital I/O Pins. Reset Button. USB Interface. Introductory Medical Device Prototyping Arduino Part 1, http://saliterman.umn.edu/ Department of Biomedical Engineering, University of Minnesota Arduino Uno Power & Interface Reset Button USB Interface

More information

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

CSCB58 - Lab 0. Intro to The Lab & The DE2 Board. Prelab /4 Part I (in-lab) /1 Part II (in-lab) /1 CSCB58 - Lab 0 Intro to The Lab & The DE2 Board Learning Objectives This week we will be getting you familiar with the lab and the boards that we will be using in later labs. You will also learn how to

More information

Programming with Arrays Intro to Pointers CS 16: Solving Problems with Computers I Lecture #11

Programming with Arrays Intro to Pointers CS 16: Solving Problems with Computers I Lecture #11 Programming with Arrays Intro to Pointers CS 16: Solving Problems with Computers I Lecture #11 Ziad Matni Dept. of Computer Science, UCSB Thursday, 5/17 in this classroom Starts at 2:00 PM **SHARP** Please

More information

Lab #2: Building the System

Lab #2: Building the System Lab #: Building the System Goal: In this second lab exercise, you will design and build a minimal microprocessor system, consisting of the processor, an EPROM chip for the program, necessary logic chips

More information

MTRX3700 Mechatronics

MTRX3700 Mechatronics MTRX3700 Mechatronics 3 2015 PIC18F452 Software Exercises David Rye You are to work in a group of two students to write, debug and demonstrate a series of small assembly language and C programs that meet

More information

Lab 4: Determining temperature from a temperature sensor

Lab 4: Determining temperature from a temperature sensor Start on a fresh page and write your name and your partners names on the top right corner of the page. Write the title of the lab clearly. You may copy the objectives, introduction, equipment, safety and

More information

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING MSC SYSTEMS ENGINEERING AND ENGINEERING MANAGEMENT SEMESTER 2 EXAMINATION 2016/2017

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING MSC SYSTEMS ENGINEERING AND ENGINEERING MANAGEMENT SEMESTER 2 EXAMINATION 2016/2017 TW30 UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING MSC SYSTEMS ENGINEERING AND ENGINEERING MANAGEMENT SEMESTER 2 EXAMINATION 2016/2017 MICROPROCESSOR BASED SYSTEMS MODULE NO: EEM7016 Date: Wednesday 17 May

More information

EE251: Thursday September 20

EE251: Thursday September 20 EE251: Thursday September 20 Parallel I/O aka General Purpose I/O aka GPIO Common Devices: Switches, LEDs, Keypads Read Lab 4 carefully, and Chapter 14 in text Think about what you would like to review

More information

Which LED(s) turn on? May 4, 2018 E40M Spring 2018 T. Diamandis, J. Plummer, R. Howe, C. Z. Lee 1

Which LED(s) turn on? May 4, 2018 E40M Spring 2018 T. Diamandis, J. Plummer, R. Howe, C. Z. Lee 1 Which LED(s) turn on? May 4, 2018 E40M Spring 2018 T. Diamandis, J. Plummer, R. Howe, C. Z. Lee 1 Lab 3b, 3c The LED Cube ENGR 40M Theo Diamandis Stanford University 04 May 2018 Overview Goal: To write

More information

Embedded World Television, Radio, CD player, Washing Machine Microwave Oven Card readers, Palm devices

Embedded World Television, Radio, CD player, Washing Machine Microwave Oven Card readers, Palm devices A presentation on INTRODUCTION We are living in the Embedded World. We are surrounded with many embedded products and our daily life largely depends on the proper functioning of these gadgets. Television,

More information

Lecture 2. Silicon Labs C8051F020 System Overview

Lecture 2. Silicon Labs C8051F020 System Overview Lecture 2 Silicon Labs C8051F020 System Overview 2 C8051F020 System Overview Introduction to CIP-51 C8051F020 system overview Memory organization Program and internal data memories Special function registers

More information

PRELAB! Read the entire lab, and complete the prelab questions (Q1- Q3) on the answer sheet before coming to the laboratory.

PRELAB! Read the entire lab, and complete the prelab questions (Q1- Q3) on the answer sheet before coming to the laboratory. PRELAB! Read the entire lab, and complete the prelab questions (Q1- Q3) on the answer sheet before coming to the laboratory. 1.0 Objectives In this lab you will get familiar with the concept of using the

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

EE445M/EE380L.6 Quiz 2 Spring 2017 Solution Page 1 of 5

EE445M/EE380L.6 Quiz 2 Spring 2017 Solution Page 1 of 5 EE445M/EE380L.6 Quiz 2 Spring 2017 Solution Page 1 of 5 First Name: Last Name: April 21, 2017, 10:00 to 10:50am Open book, open notes, calculator (no laptops, phones, devices with screens larger than a

More information

BIG8051. Development system. User manual

BIG8051. Development system. User manual BIG8051 User manual All s development systems represent irreplaceable tools for programming and developing microcontroller-based devices. Carefully chosen components and the use of machines of the last

More information

Using the IDE and ANSI Display Commands. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

Using the IDE and ANSI Display Commands. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name MPS IDE & ANSI Display Lab Exercise Using the IDE and ANSI Display Commands Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name Notes: You must work on this assignment with

More information

More on Arrays CS 16: Solving Problems with Computers I Lecture #13

More on Arrays CS 16: Solving Problems with Computers I Lecture #13 More on Arrays CS 16: Solving Problems with Computers I Lecture #13 Ziad Matni Dept. of Computer Science, UCSB Announcements Homework #12 due today No homework assigned today!! Lab #7 is due on Monday,

More information

ECE 103 In-Class Exercise L1 Guide

ECE 103 In-Class Exercise L1 Guide ECE 10 In-Class Exercise L1 Guide Hardware and software needed to complete this lab exercise LabJack U, USB cable, and screwdriver (Qty 1) Red LED (Light Emitting Diode) Short lead is cathode (negative)

More information

Course Outline Introduction to C-Programming

Course Outline Introduction to C-Programming ECE3411 Fall 2015 Lecture 1a. Course Outline Introduction to C-Programming Marten van Dijk, Syed Kamran Haider Department of Electrical & Computer Engineering University of Connecticut Email: {vandijk,

More information

CSCE 312 Lab manual. Lab 4 - Computer Organization and Data Path Design. Instructor: Dr. Yum. Fall 2016

CSCE 312 Lab manual. Lab 4 - Computer Organization and Data Path Design. Instructor: Dr. Yum. Fall 2016 CSCE 312 Lab manual Lab 4 - Computer Organization and Data Path Design Instructor: Dr. Yum Fall 2016 Department of Computer Science & Engineering Texas A&M University Chapter 5: Computer Organization and

More information

Lecture 5. Defining Functions

Lecture 5. Defining Functions Lecture 5 Defining Functions Announcements for this Lecture Last Call Quiz: About the Course Take it by tomorrow Also remember the survey Readings Sections 3.5 3.3 today Also 6.-6.4 See online readings

More information

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE, IME-100 ECE Lab 3 Electrical and Computer Engineering Department Kettering University 3-1 1. Laboratory Computers Getting Started i. Log-in with User Name: Kettering Student (no password required) ii.

More information

Which LED(s) turn on? May 12, 2017 ENGR 40M Spring 2017 C.Z. Lee, J. Plummer, R. Howe 1

Which LED(s) turn on? May 12, 2017 ENGR 40M Spring 2017 C.Z. Lee, J. Plummer, R. Howe 1 Which LED(s) turn on? May 12, 2017 ENGR 40M Spring 2017 C.Z. Lee, J. Plummer, R. Howe 1 Lab 3b Programming the LED cube ENGR 40M Chuan-Zheng Lee Stanford University 12 May 2017 Overview Goal: To write

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

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

Computer Science II Lecture 1 Introduction and Background

Computer Science II Lecture 1 Introduction and Background Computer Science II Lecture 1 Introduction and Background Discussion of Syllabus Instructor, TAs, office hours Course web site, http://www.cs.rpi.edu/courses/fall04/cs2, will be up soon Course emphasis,

More information

Parallel I/O and Keyboard Scanning

Parallel I/O and Keyboard Scanning 4 4.1 Objectives: Microprocessors can monitor the outside world using input ports. They can also control it using output ports. The TM4C123G (Tiva) performs I/O using 6 ports. Computer keyboards are typically

More information

Engr 123 Spring 2018 Notes on Visual Studio

Engr 123 Spring 2018 Notes on Visual Studio Engr 123 Spring 2018 Notes on Visual Studio We will be using Microsoft Visual Studio 2017 for all of the programming assignments in this class. Visual Studio is available on the campus network. For your

More information

Introduction to Microcontrollers

Introduction to Microcontrollers Introduction to Microcontrollers Embedded Controller Simply an embedded controller is a controller that is embedded in a greater system. One can define an embedded controller as a controller (or computer)

More information

CEIBO FE-51RD2 Development System

CEIBO FE-51RD2 Development System CEIBO FE-51RD2 Development System Development System for Atmel AT89C51RD2 Microcontrollers FEATURES Emulates Atmel AT89C51RD2 60K Code Memory Real-Time Emulation Frequency up to 40MHz / 3V, 5V ISP and

More information

QUIZ. 1. Explain the meaning of the angle brackets in the declaration of v below:

QUIZ. 1. Explain the meaning of the angle brackets in the declaration of v below: QUIZ 1. Explain the meaning of the angle brackets in the declaration of v below: This is a template, used for generic programming! QUIZ 2. Why is the vector class called a container? 3. Explain how the

More information

Calendar Description

Calendar Description ECE212 B1: Introduction to Microprocessors Lecture 1 Calendar Description Microcomputer architecture, assembly language programming, memory and input/output system, interrupts All the instructions are

More information

Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits

Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits Equipment and Components Quartus software and Altera DE2-115 board PART 1: Number Representation in Microsoft Calculator. First, let s

More information

Procedure: Determine the polarity of the LED. Use the following image to help:

Procedure: Determine the polarity of the LED. Use the following image to help: Section 2: Lab Activity Section 2.1 Getting started: LED Blink Purpose: To understand how to upload a program to the Arduino and to understand the function of each line of code in a simple program. This

More information

Introduction to Internet of Things Prof. Sudip Misra Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Introduction to Internet of Things Prof. Sudip Misra Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Introduction to Internet of Things Prof. Sudip Misra Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 23 Introduction to Arduino- II Hi. Now, we will continue

More information

Lab 5: LCD and A/D: Digital Voltmeter

Lab 5: LCD and A/D: Digital Voltmeter Page 1/5 OBJECTIVES Learn how to use C (as an alternative to Assembly) in your programs. Learn how to control and interface an LCD panel to a microprocessor. Learn how to use analog-to-digital conversion

More information

agenda 10 MIN Go over benchmark 30 MIN Unit 2 Day 1 Notes 5 MIN Mastery Work

agenda 10 MIN Go over benchmark 30 MIN Unit 2 Day 1 Notes 5 MIN Mastery Work Welcome! Today you will need: *a graphing calculator *a new packet *your name tag *a chrome book for HW (later) agenda 10 MIN Go over benchmark 30 MIN Unit 2 Day 1 Notes 5 MIN Mastery Work remember Smart

More information

Technical documentation NLS-3000 NAVIGATION LIGHT CONTROL PANEL

Technical documentation NLS-3000 NAVIGATION LIGHT CONTROL PANEL Technical documentation LIGHT CONTROL PANEL For use on seagoing vessels Change status Version Date Author Checked Remark 0.1 07.08.2008 STO HN 1. Edition Page 1 of 26 Table of contents 1. Application and

More information

ME456: Mechatronics. Prof. Clark Radcliffe. Do you have the knack? Joonho Lee, TA. What s Mechatronics? Mechatronics

ME456: Mechatronics. Prof. Clark Radcliffe. Do you have the knack? Joonho Lee, TA. What s Mechatronics? Mechatronics ME456: Mechatronics Prof. Clark J. Radcliffe Mechanical Engineering Michigan State University Prof. Clark Radcliffe Office: 2445 Engineering Phone: 355-5198 Email: radcliff@egr.msu.edu Web: http://www.egr.msu.edu/classes/me456/radcliff/

More information

Programming Microcontroller Assembly and C

Programming Microcontroller Assembly and C Programming Microcontroller Assembly and C Course Number CLO : 2 Week : 5-7 : TTH2D3 CLO#2 Student have the knowledge to create basic programming for microcontroller [C3] Understand how to program in Assembly

More information

ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives:

ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives: ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives: This lab will introduce basic embedded systems programming concepts by familiarizing the user with an embedded programming

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

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.111 -- Introductory Digital Systems Laboratory NUBUS LABORATORY KIT For your pleasure and convenience,

More information

B.V. Patel Institute of Business Management, Computer & Information Technology, Uka Tarsadia University

B.V. Patel Institute of Business Management, Computer & Information Technology, Uka Tarsadia University Unit 1 Programming Language and Overview of C 1. State whether the following statements are true or false. a. Every line in a C program should end with a semicolon. b. In C language lowercase letters are

More information

GEORGIA INSTITUTE OF TECHNOLOGY School of Electrical and Computer Engineering ECE 2020 Fall 2017 Lab #1: Digital Logic Module

GEORGIA INSTITUTE OF TECHNOLOGY School of Electrical and Computer Engineering ECE 2020 Fall 2017 Lab #1: Digital Logic Module GEORGIA INSTITUTE OF TECHNOLOGY School of Electrical and Computer Engineering ECE 2020 Fall 2017 Lab #1: Digital Logic Module GOAL To introduce the physical implementation of digital logic circuits including

More information

Proto-DB (#28310): Prototyping Daughterboard

Proto-DB (#28310): Prototyping Daughterboard Web Site: www.parallax.com Forums: forums.parallax.com Sales: sales@parallax.com Technical: support@parallax.com Office: (916) 624-8333 Fax: (916) 624-8003 Sales: (888) 512-1024 Tech Support: (888) 997-8267

More information

7 8 9 C. PRELAB REQUIREMENTS You must adhere to the Lab Rules and Policies document for every lab.

7 8 9 C. PRELAB REQUIREMENTS You must adhere to the Lab Rules and Policies document for every lab. Page 1/ Revision 1 OBJECTIVES To understand how a keypad functions as a raster scan input device and to learn how to interface a keypad to a microprocessor. Further explore and understand the implementation

More information

PRELAB! Read the entire lab, and complete the prelab questions (Q1-Q3) on the answer sheet before coming to the laboratory.

PRELAB! Read the entire lab, and complete the prelab questions (Q1-Q3) on the answer sheet before coming to the laboratory. PRELAB! Read the entire lab, and complete the prelab questions (Q1-Q3) on the answer sheet before coming to the laboratory. 1.0 Objectives In the last lab we learned that Verilog is a fast and easy way

More information

Instruction and Operation Manual

Instruction and Operation Manual SEC IR PC LINK Instruction and Operation Manual Sensor Electronics Corporation 5500 Lincoln Drive Minneapolis, Minnesota 55436 USA (952) 938-9486 Fax (952) 938-9617 email sensor@minn.net or www.sensorelectronics.com

More information

The Atmel ATmega328P Microcontroller

The Atmel ATmega328P Microcontroller Ming Hsieh Department of Electrical Engineering EE 459Lx - Embedded Systems Design Laboratory 1 Introduction The Atmel ATmega328P Microcontroller by Allan G. Weber This document is a short introduction

More information

ECE2049 HW #1-- C programming and Binary Number Representations (DUE 1/19/2018 At the BEGINNING of class)

ECE2049 HW #1-- C programming and Binary Number Representations (DUE 1/19/2018 At the BEGINNING of class) ECE2049 HW #1-- C programming and Binary Number Representations (DUE 1/19/2018 At the BEGINNING of class) Your homework should be neat and professional looking. You will loose points if your HW is not

More information

CMPSC 111 Introduction to Computer Science I Fall 2016 Lab 2 Assigned: September 7, 2016 Due: Wednesday, September 14, 2016 by 2:30 pm

CMPSC 111 Introduction to Computer Science I Fall 2016 Lab 2 Assigned: September 7, 2016 Due: Wednesday, September 14, 2016 by 2:30 pm 1 Objectives CMPSC 111 Introduction to Computer Science I Fall 2016 Lab 2 Assigned: September 7, 2016 Due: Wednesday, September 14, 2016 by 2:30 pm To develop a template for a Java program to use during

More information

CSE3215 Embedded Systems Laboratory

CSE3215 Embedded Systems Laboratory CSE3215 Embedded Systems Laboratory Lab3 Reaction Time Measurement Introduction Human reaction time is a parameter of interest in many psychological and physiological studies of the effects of drugs, stress,

More information

ECE 2036: Lab #3 mbed Hardware Starter Lab Category: Getting Started with MBED ~ 1 week to complete

ECE 2036: Lab #3 mbed Hardware Starter Lab Category: Getting Started with MBED ~ 1 week to complete ECE 2036: Lab #3 mbed Hardware Starter Lab Category: Getting Started with MBED ~ 1 week to complete ECE2036a - Due Date: Monday September 28 @ 11:59 PM ECE2036b Due Date: Tuesday September 29 @ 11:59 PM

More information