ALFRED MAZHINDU
|
|
- Mae Caldwell
- 5 years ago
- Views:
Transcription
1 SENSORS AND ACTUATORS LAB_2 ALFRED MAZHINDU DATA ACQUISITION FROM AN OPTICAL SENSOR LABORATORY STAGE 2_10/11
2 Contents Table of Figures... 2 Lab: Data acquisition from an optical sensor... 3 Introduction... 3 Data acquisition... 3 Test Program... 4 EXERCISE 1: CREATING A SUCCESSIVE-APPROXIMATION ADC... 5 Test program... 5 EXERCISE 2: TIMING THE SUCCESSIVE-APPROXIMATION ADC... 6 Test program... 6 EXERCISE 3: ASSESSING AN OPTICAL SENSOR... 8 Test program... 8 Observations... 9 EXERCISE 4: THOUGHTS ON MODIFYING AN OPTICAL SENSOR REFERENCE Table of Figures Figure 1: Diagram showing the components used to make an ADC and how they are connected together Figure 2: Diagram showing the connections to the source and detector in the optical sensor... 8 Figure 3: Circuit diagram for the optical sensor... 8 Figure 4: Test Results of 255 the maximum voltage displayed and Figure 5: Test Results of 9 the minimum voltage displayed Figure 5: The source and detector in the optical sensor connected to Flash card... 10
3 Lab: Data acquisition from an optical sensor Introduction The session involves creating a data acquisition system that displays the digitised output from a sensor on the development board s seven segment LED display, evaluating the sensor and making some suggestions for a modified sensor design Data acquisition Flight applications card has a terminal block with 5 V and 0 V connectors and a volt-in connector to which a voltage from an external sensor can be applied. A switch on the board can be set to compare this external voltage with the output from a DAC in order to digitise the voltage. The digital input signal for the DAC is provided by port B of the PIC16F84, whose eight lines must be configured as outputs. The output of the comparator is connected to bit 0 of port A of the PIC16F84 and this line must be configured as an input. The arrangement is shown in the figure below. Port A (Input and Output) 4 0 Comparator Analogue voltage to be digitised 7 Port B (Output) DAC Analogue Output 0 Figure 1: Diagram showing the components used to make an ADC and how they are connected together.
4 Test Program The comparator outputs logic 1 when the external voltage is greater than the DAC voltage and outputs logic 0 when the external voltage is less than the DAC voltage. Sensors and Actuators lab2 Data acquisition from an optical sensor Please type your name and your partner's name below Alfred Mazhindu BEng EEE Stage 2 const char pattern[] = /* */ 0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, /* 8 9 A b C d E F */ 0x80, 0x98, 0x88, 0x83, 0xc6, 0xa1, 0x86, 0x8e ; unsigned char segments[4] ; /* storage for values to display in led segments */ void delay(unsigned int) ; void DecNumber(unsigned char) ; void refresh_segments (unsigned char) ; unsigned char adc(void) ; void main( void) unsigned char i ; set_bit (STATUS, RP0) ; TRISB = 0x00 ; /* all o/p */ TRISA = 00001b ; clear_bit (STATUS, RP0) ; while(1) endless loop i = adc() ; DecNumber (i) ; refresh_segments (i) ; end of main void delay(unsigned int n) unsigned int i ; for (i = 0 ; i < n ; i++) ; void DecNumber(unsigned char value) unsigned int temp ; put values to display in array segment segments[2] = value / 100 ; temp = value % 100 ; segments[1] = temp / 10 ; segments[0] = temp % 10 ; void refresh_segments (unsigned char i) if (i < 100) goto miss1 ; PORTB = pattern[segments[2]] ; PORTA = 2 ; miss1: if (i < 10) goto miss2 ; PORTB = pattern[segments[1]] ; PORTA = 4 ; miss2: PORTB = pattern[segments[0]] ; PORTA = 8 ; end of refresh_segments unsigned char adc(void) unsigned char i,bitn0,bitn1,value = 0; /* local variables */
5 bitn1 = b; set bit mask bitn0 = b; value = 0 ; for(i =1;i<=8;i++) value =(value bitn1); PORTB = value; nop () ; nop () ; 2.5 us delay if (PORTA & 1 == 0) value = (value & bitn0); output of the comparator bitn1 = (bitn1>>1); right shift bitn0 = ~bitn1; clear bit return value; end of adc EXERCISE 1: CREATING A SUCCESSIVE-APPROXIMATION ADC The first exercise was to create a new program from test4.c by replacing the ramp-and-compare ADC function with a successive approximation ADC function. The only way was to implement program and to proceed as instructed from lab script. The following program code was edited and displays the converted voltage for values from 0 to 255 using the adjustable voltage source provided on the Flight application card. Test program Sensors and Actuators lab2 Data acquisition from an optical sensor Please type your name and your partner's name below Alfred Mazhindu BEng EEE Stage 2 const char pattern[] = /* */ 0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, /* 8 9 A b C d E F */ 0x80, 0x98, 0x88, 0x83, 0xc6, 0xa1, 0x86, 0x8e ; unsigned char segments[4] ; /* storage for values to display in led segments */ void delay(unsigned int) ; void DecNumber(unsigned char) ; void refresh_segments (unsigned char) ; unsigned char adc(void) ; void main( void) unsigned char i ; set_bit (STATUS, RP0) ; TRISB = 0x00 ; /* all o/p */ TRISA = 00001b ; clear_bit (STATUS, RP0) ; while(1) endless loop i = adc() ; DecNumber (i) ; refresh_segments (i) ; end of main void delay(unsigned int n) unsigned int i ; for (i = 0 ; i < n ; i++) ; void DecNumber(unsigned char value) unsigned int temp ; put values to display in array segment segments[2] = value / 100 ; temp = value % 100 ; segments[1] = temp / 10 ; segments[0] = temp % 10 ; void refresh_segments (unsigned char i) if (i < 100) goto miss1 ; PORTB = pattern[segments[2]] ;
6 PORTA = 2 ; miss1: if (i < 10) goto miss2 ; PORTB = pattern[segments[1]] ; PORTA = 4 ; miss2: PORTB = pattern[segments[0]] ; PORTA = 8 ; end of refresh_segments unsigned char adc(void) unsigned char i,bitn0,bitn1,value = 0; /* local variables */ bitn1 = b; set bit mask bitn0 = b; value = 0 ; for(i =1;i<=8;i++) value =(value bitn1); PORTB = value; nop () ; nop () ; 2.5 us delay if (PORTA & 1 == 0) value = (value & bitn0); output of the comparator bitn1 = (bitn1>>1); right shift bitn0 = ~bitn1; clear bit return value; end of adc EXERCISE 2: TIMING THE SUCCESSIVE-APPROXIMATION ADC Measuring the time it takes this ADC function to perform conversion times using a stopwatch. I have edited the program code from previous exercise 1. The time the ADC while converting input voltages around the low, middle and maximum settings of the voltage control. At low voltage = 10 sec At middle voltage = 9 sec At high voltage = 9 sec The program code below displays and controls the time output as illustrated on lab script. Test program Sensors and Actuators lab2 Data acquisition from an optical sensor Please type your name and your partner's name below Alfred Mazhindu BEng EEE Stage 2 const char pattern[] = /* */ 0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, /* 8 9 A b C d E F */ 0x80, 0x98, 0x88, 0x83, 0xc6, 0xa1, 0x86, 0x8e ; unsigned char segments[4] ; /* storage for values to display in led segments */ void delay(unsigned int) ; void DecNumber(unsigned char) ; void refresh_segments (unsigned char) ; unsigned char adc(void) ; void main( void) unsigned char a; unsigned int i; set_bit (STATUS, RP0) ; TRISB = 0x00 ; /* all o/p */ TRISA = 00001b ; clear_bit (STATUS, RP0) ;
7 PORTA = 4; for (i = 0 ; i < ; i++) endless loop a = adc() ; DecNumber (i) ; refresh_segments (i) ; PORTA = 8; while (1); end of main void delay(unsigned int n) unsigned int i ; for (i = 0 ; i < n ; i++) ; void DecNumber(unsigned char value) unsigned int temp ; put values to display in array segment segments[2] = value / 100 ; temp = value % 100 ; segments[1] = temp / 10 ; segments[0] = temp % 10 ; void refresh_segments (unsigned char i) if (i < 100) goto miss1 ; PORTB = pattern[segments[2]] ; PORTA = 2 ; miss1: if (i < 10) goto miss2 ; PORTB = pattern[segments[1]] ; PORTA = 4 ; miss2: PORTB = pattern[segments[0]] ; PORTA = 8 ; end of refresh_segments unsigned char adc(void) unsigned char i,bitn0,bitn1,value = 0; /* local variables */ bitn1 = b; set bit mask bitn0 = ~bitn1; value = 0 ; for(i =1;i<=8;i++) value =(value bitn1); PORTB = value; nop () ; nop () ; 2.5 us delay if (PORTA & 1 == 0) value = (value & bitn0); output of the comparator bitn1 = (bitn1>>1); right shift bitn0 = ~bitn1; clear bit return value; end of adc
8 EXERCISE 3: ASSESSING AN OPTICAL SENSOR This exercise I was observing the behaviour of the sensor in terms of its digital output from the ADC under different conditions such as nearby objects. The sensor can be used as a limit switch, paper sensor, rotation sensor, coin sensor, position sensor etc. Figure 2: Diagram showing the connections to the source and detector in the optical sensor 5 V 390 IR LED Phototransistor 220 k To ADC 0 V Figure 3: Circuit diagram for the optical sensor The program code below from Exercise 1 was used to operate the proximity sensor. Test program Sensors and Actuators lab2 Data acquisition from an optical sensor Please type your name and your partner's name below Alfred Mazhindu BEng EEE Stage 2 const char pattern[] = /* */ 0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, /* 8 9 A b C d E F */ 0x80, 0x98, 0x88, 0x83, 0xc6, 0xa1, 0x86, 0x8e ; unsigned char segments[4] ; /* storage for values to display in led segments */ void delay(unsigned int) ; void DecNumber(unsigned char) ; void refresh_segments (unsigned char) ; unsigned char adc(void) ; void main( void) unsigned char i ; set_bit (STATUS, RP0) ; TRISB = 0x00 ; /* all o/p */ TRISA = 00001b ; clear_bit (STATUS, RP0) ; while(1) endless loop i = adc() ;
9 end of main DecNumber (i) ; refresh_segments (i) ; void delay(unsigned int n) unsigned int i ; for (i = 0 ; i < n ; i++) ; void DecNumber(unsigned char value) unsigned int temp ; put values to display in array segment segments[2] = value / 100 ; temp = value % 100 ; segments[1] = temp / 10 ; segments[0] = temp % 10 ; void refresh_segments (unsigned char i) if (i < 100) goto miss1 ; PORTB = pattern[segments[2]] ; PORTA = 2 ; miss1: if (i < 10) goto miss2 ; PORTB = pattern[segments[1]] ; PORTA = 4 ; miss2: PORTB = pattern[segments[0]] ; PORTA = 8 ; end of refresh_segments unsigned char adc(void) unsigned char i,bitn0,bitn1,value = 0; /* local variables */ bitn1 = b; set bit mask bitn0 = b; value = 0 ; for(i =1;i<=8;i++) value =(value bitn1); PORTB = value; nop () ; nop () ; 2.5 us delay if (PORTA & 1 == 0) value = (value & bitn0); output of the comparator bitn1 = (bitn1>>1); right shift bitn0 = ~bitn1; clear bit return value; end of adc Observations a) The sensor is sensitive to ambient light, and the sensor output values when it is pointed in different directions towards distant objects is 255 V. High voltage towards an object. b) The minimum output I got is 9V when the sensor is stationary at one position. Low voltages output when not near an object. c) The sensor is useful to detect objects in front of it and the useful range is around 253 V of the device, so it means the sensor has to be closer to an object to detect (short range).
10 Figure 4: Test Results of 255 the maximum voltage displayed and Figure 5: Test Results of 9 the minimum voltage displayed Figure 5: The source and detector in the optical sensor connected to Flash card EXERCISE 4: THOUGHTS ON MODIFYING AN OPTICAL SENSOR Suggestions on how I might modify the sensor construction, in order to increase the effective range, the resistor value has to be reduced and the result in high current and provides enhanced intensity. Suggestions on how I might modify the operation of the sensor, in order to increase its effective range, by modifying the program code. Example a: You could put a tube in front of the detector to screen it from ambient will only see a small fraction of the, surrounding region and so the background illumination will be substantially reduced. A lens placed at the end of a tube of length equal to the focal length of the lens could also be used to increase the amount of light falling on a small detector and simultaneously reduce the background illumination. Example b: Modulate the light signal to make it more sensitive to the emitted light. REFERENCE SEM1 SENSORS AND ACTUATORS (CY-0205M_2010-1_SEM1_A) > DOCUMENTS > RESOURCES - PING JIANG > LABORATORY EXPERIMENTS > C CODE > SaA_C_Lab SEM1 SENSORS AND ACTUATORS (CY-0205M_2010-1_SEM1_A) > DOCUMENTS > RESOURCES - PING JIANG > LECTURES > OPTICAL SENSOR.
Lab Report for Sensor Calibration using a PIC16F84 GROUP MEMBERS ALFRED MAZHINDU SIMBARASHE CHIWESHE
CY-0205M Sensor and Actuators Lab Report for Sensor Calibration using a PIC16F84 GROUP MEMBERS ALFRED MAZHINDU - 09022270 SIMBARASHE CHIWESHE - 09016352 Alfred Mazhindu & Simbarashe Chiweshe Page 1 CONTENTS
More informationQ1 Q2 Q3 Q4 Q5 Q6 Total /7.5 /5 /10 /5 /7.5 /5 /40
Course name: Practical App. CS II Exam number: Final model answer Course Code: CSC20X Exam Date: 03/06/2014 Lecturer: Dr. Ahmed ElShafee Time Allowed: 120 minutes Q1 Q2 Q3 Q4 Q5 Q6 Total /7.5 /5 /10 /5
More informationEmbedded Systems. PIC16F84A Sample Programs. Eng. Anis Nazer First Semester
Embedded Systems PIC16F84A Sample Programs Eng. Anis Nazer First Semester 2017-2018 Development cycle (1) Write code (2) Assemble / compile (3) Simulate (4) Download to MCU (5) Test Inputs / Outputs PIC16F84A
More informationDept. of Computer Engineering Final Exam, First Semester: 2016/2017
Philadelphia University Faculty of Engineering Course Title: Embedded Systems (630414) Instructor: Eng. Anis Nazer Dept. of Computer Engineering Final Exam, First Semester: 2016/2017 Student Name: Student
More informationMICROPROCESSORS 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 informationSRF08 Ultra sonic range finder Technical Specification
SRF08 Ultra sonic range finder Technical Specification Communication with the SRF08 ultrasonic rangefinder is via the I2C bus. This is available on popular controllers such as the OOPic and Stamp BS2p,
More informationReal 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 information1 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 informationChapter 9. Input/Output (I/O) Ports and Interfacing. Updated: 3/13/12
Chapter 9 Input/Output (I/O) Ports and Interfacing Updated: 3/13/12 Basic Concepts in I/O Interfacing and PIC18 I/O Ports (1 of 2) I/O devices (or peripherals) such as LEDs and keyboards are essential
More informationEEE394 Microprocessor and Microcontroller Laboratory Lab #6
Exp. No #6 Date: INTERRUPTS AND ADC IN PIC MICROCONTROLLER OBJECTIVE The purpose of the experiment is to configure external interrupt and the ADC in PIC microcontrollers. (i) To flip the LED connected
More informationUNIVERSITY OF ULSTER UNIVERSITY EXAMINATIONS : 2001/2002 RESIT. Year 2 MICROCONTROLLER SYSTEMS. Module Code: EEE305J1. Time allowed: 3 Hours
UNIVERSITY OF ULSTER UNIVERSITY EXAMINATIONS : 2001/2002 RESIT Year 2 MICROCONTROLLER SYSTEMS Module Code: EEE305J1 Time allowed: 3 Hours Answer as many questions as you can. Not more than TWO questions
More informationLecture (03) PIC16F84 (2)
Lecture (03) PIC16F84 (2) By: Dr. Ahmed ElShafee ١ PIC16F84 has a RISC architecture, or Harvard architecture in another word ٢ PIC16F84 belongs to a class of 8 bit microcontrollers of RISC architecture.
More informationMICROPROCESSORS 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 information1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet Example Application...
Overview of the PIC 16F648A Processor: Part 1 EE 361L Lab 2.1 Last update: August 19, 2011 Abstract: This report is the first of a three part series that discusses the features of the PIC 16F684A processor,
More informationTeam 8: Robert Blake Craig Goliber Alanna Ocampo
Team 8: Robert Blake Craig Goliber Alanna Ocampo Objective of the design CAD Presentation Microcontroller Implementation PCB Design Design Limitations Conclusion Problem: Design a centrifuge which was
More informationThe 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 informationPIC 16F84A programming (II)
Lecture (05) PIC 16F84A programming (II) Dr. Ahmed M. ElShafee ١ Introduction to 16F84 ٣ PIC16F84 belongs to a class of 8-bit microcontrollers of RISC architecture. Program memory (FLASH) EEPROM RAM PORTA
More informationLecture (04) PIC16F84A (3)
Lecture (04) PIC16F84A (3) By: Dr. Ahmed ElShafee ١ Central Processing Unit Central processing unit (CPU) is the brain of a microcontroller responsible for finding and fetching the right instruction which
More informationELE4. ELECTRONICS Unit 4 Electronic Control Systems. General Certificate of Education June 2005 Advanced Level Examination
Surname Centre Number Other Names Candidate Number Leave blank Candidate Signature General Certificate of Education June 2005 Advanced Level Examination ELECTRONICS Unit 4 Electronic Control Systems ELE4
More informationEE 308 Spring A software delay. To enter a software delay, put in a nested loop, just like in assembly.
More on Programming the 9S12 in C Huang Sections 5.2 through 5.4 Introduction to the MC9S12 Hardware Subsystems Huang Sections 8.2-8.6 ECT_16B8C Block User Guide A summary of MC9S12 hardware subsystems
More informationMTRX3700 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 informationMicrocontroller Systems. ELET 3232 Topic 8: Structures, Arrays, & Pointers
Microcontroller Systems ELET 3232 Topic 8: Structures, Arrays, & Pointers 1 Agenda Become familiar with and apply: Arrays Structures Pointers 2 Array Arrays A data set of a particular data type All elements
More informationComputer Organization & Systems Exam I Example Questions
Computer Organization & Systems Exam I Example Questions 1. Pointer Question. Write a function char *circle(char *str) that receives a character pointer (which points to an array that is in standard C
More informationDESIGN AND IMPLEMENTATION OF A SPECTATOR COUNTING SYSTEM
DESIGN AND IMPLEMENTATION OF A SPECTATOR COUNTING SYSTEM 1 Adejumobi, O.K., 2 Sadiq, M.O., 2 Adedibu, O.A., 2 Adeshipo, M.E. 1 Computer Engineering Technology Department, The Polytechnic, Ibadan, P.M.B
More informationModern Robotics Inc. Sensor Documentation
Sensor Documentation Version 1.0.1 September 9, 2016 Contents 1. Document Control... 3 2. Introduction... 4 3. Three-Wire Analog & Digital Sensors... 5 3.1. Program Control Button (45-2002)... 6 3.2. Optical
More informationLecture (04) PIC 16F84A programming I
Lecture (04) PIC 16F84A programming I Dr. Ahmed M. ElShafee ١ Agenda Introduction to PIC16F84A programming using C language Preprocessors and, Compiler directives Constants Variables and data types Pointers
More informationUNIVERSITY OF ULSTER UNIVERSITY EXAMINATIONS : 2001/2002. Semester 2. Year 2 MICROCONTROLLER SYSTEMS. Module Code: EEE305J2. Time allowed: 3 Hours
UNIVERSITY OF ULSTER UNIVERSITY EXAMINATIONS : 2001/2002 Semester 2 Year 2 MICROCONTROLLER SYSTEMS Module Code: EEE305J2 Time allowed: 3 Hours Answer as many questions as you can. Not more than TWO questions
More informationReliable Line Tracking
Reliable Line Tracking William Dubel January 5, 2004 Introduction: A common task for a robot is to follow a predetermined path. One popular way to mark a path is with a high contrast line, such as black
More informationC Language Programming, Interrupts and Timer Hardware
C Language Programming, Interrupts and Timer Hardware In this sequence of three labs, you will learn how to write simple C language programs for the MC9S12 microcontroller, and how to use interrupts and
More informationEXPERIMENT 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 informationECE Test #1: Name
ECE 376 - Test #1: Name Closed Book, Closed Notes. Calculators Permitted. September 23, 2016 20 15 10 5 0
More informationSRF08 Ultra sonic range finder
SRF08 Ultra sonic range finder Technical Specification Communication with the SRF08 ultrasonic rangefinder is via the I2C bus. This is available on popular controllers such as the OOPic and Stamp BS2p,
More informationINTERFACING HARDWARE WITH MICROCONTROLLER
INTERFACING HARDWARE WITH MICROCONTROLLER P.Raghavendra Prasad Final Yr EEE What is a Microcontroller? A microcontroller (or MCU) is acomputer-on-a-chip. It is a type of microprocessor emphasizing self-
More informationTimer0..Timer3. Interrupt Description Input Conditions Enable Flag
Timer0..Timer3 Timers are pretty useful: likewise, Microchip provides four different timers for you to use. Like all interrupts, you have to Enable the interrupt, Set the conditions of the interrupt, and
More informationC and Embedded Systems. So Why Learn Assembly Language? C Compilation. PICC Lite C Compiler. PICC Lite C Optimization Results (Lab #13)
C and Embedded Systems A µp-based system used in a device (i.e, a car engine) performing control and monitoring functions is referred to as an embedded system. The embedded system is invisible to the user
More informationIP-48DAC channel 16-bit Digital/Analog Converter With memory Industry Pack Module PROGRAMMING MANUAL Version 1.
IP-48DAC-16 48-channel 16-bit Digital/Analog Converter With memory Industry Pack Module PROGRAMMING MANUAL 828-10-000-4000 Version 1.0 January 2007 ALPHI TECHNOLOGY CORPORATION 1898 E. Southern Ave Tempe,
More informationSC2004MBS 20x4 Characters MODBUS RTU Slave LCD
SC004MBS 0x4 Characters MODBUS RTU Slave SC004MBS is a MODBUS slave device that receives data from a Master MODBUS device and display them on the panel. The is 0 x 4 characters in size and each character
More informationCSE 351: The Hardware/Software Interface. Section 2 Integer representations, two s complement, and bitwise operators
CSE 351: The Hardware/Software Interface Section 2 Integer representations, two s complement, and bitwise operators Integer representations In addition to decimal notation, it s important to be able to
More informationCS 241 Data Organization Binary
CS 241 Data Organization Binary Brooke Chenoweth University of New Mexico Fall 2017 Combinations and Permutations In English we use the word combination loosely, without thinking if the order of things
More informationConto D2 COMMUNICATION PROTOCOL CONTENTS 1.0 INTRODUCTION
PR 121 rev. 0 11/11/2011 Pagina 1 di 9 ELECTRICITY ENERGY METER FIRMWARE 1.6 Conto D2 COMMUNICATION PROTOCOL CONTENTS 1.0 INTRODUCTION 2.0 DATA MESSAGE DESCRIPTION 2.1 Data field description 2.2 Data format
More informationCHAPTER 1 - World of microcontrollers
CHAPTER 1 - World of microcontrollers One Time Programmable ROM (OTP ROM) One time programmable ROM enables you to download a program into it, but, as its name states, one time only. If an error is detected
More information16.317: Microprocessor Systems Design I Fall 2013 Exam 3 Solution
16.317: Microprocessor Systems Design I Fall 2013 Exam 3 Solution 1. (20 points, 5 points per part) Multiple choice For each of the multiple choice questions below, clearly indicate your response by circling
More informationAssembly Language Instructions
Assembly Language Instructions Content: Assembly language instructions of PIC16F887. Programming by assembly language. Prepared By- Mohammed Abdul kader Assistant Professor, EEE, IIUC Assembly Language
More informationModels LR-F28335DAQ & LR-F28335DAQ8x8. Technical Reference Manual. August 25, Document Number:
Models LR-F28335DAQ & LR-F28335DAQ8x8 Technical Reference Manual August 25, 2008 Document Number: 9-403-60 Copyright 2008-2011 Link Research All Rights Reserved TABLE OF CONTENTS I.INTRODUCTION... 3 II.
More informationNOTICE: 1, the timing for Start, Stop, ACK, NACK, write and read is same as I2C
DPS01 USER GUIDE DPS01 is a module which integrated digital atmospheric pressure altitude Temperature Compass weather forecast. No external components required It is a complete sensing system with on-chip
More informationADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C
Data Sheet 10 Channel Analog to Digital Converter with output via I 2 C Introduction Many microcontroller projects involve the use of sensors like Accelerometers, Gyroscopes, Temperature, Compass, Barometric,
More informationMicroToys Guide: PS/2 Mouse N. Pinckney April 2005
Introduction A computer mouse provides an excellent device to acquire 2D coordinate-based user input, since most users are already familiar with it. Most mice usually come with two or three buttons, though
More informationEmbedded Systems Programming and Architectures
Embedded Systems Programming and Architectures Lecture No 10 : Data acquisition and data transfer Dr John Kalomiros Assis. Professor Department of Post Graduate studies in Communications and Informatics
More informationComparison of C and Assembly How to compile a C program using CodeWarrior
Comparison of C and Assembly How to compile a C program using CodeWarrior o Using pointers to access contents of specific addresses in C o Including and using derivative.h or hcs12.h to use in MC9S12 port
More informationC Language Programming, Interrupts and Timer Hardware
C Language Programming, Interrupts and Timer Hardware In this sequence of three labs, you will learn how to write simple C language programs for the MC9S12 microcontroller, and how to use interrupts and
More informationTSB Software Reference Manual
TSB Software Reference Manual Temperature Sensors Board Commands Description L. Castellani I.N.F.N. sez. PADOVA 10 December 2009 Document Version 1.4 Firmware Version 2.5 Introduction The TSB emulate the
More informationEmbedded systems. Exercise session 3. Microcontroller Programming Lab Preparation
Embedded systems Exercise session 3 Microcontroller Programming Lab Preparation Communications Contact Mail : michael.fonder@ulg.ac.be Office : 1.82a, Montefiore Website for the exercise sessions and the
More informationDigital and Analogue Project Report
EITF 040 Digital and Analogue Project Report Group 6 Fida Saidani Qinghua Liu March, 2013 1 Abstract The aim of this project is to build an electronic device that makes use of the law of light reflection,
More informationMechatronics and Measurement. Lecturer:Dung-An Wang Lecture 6
Mechatronics and Measurement Lecturer:Dung-An Wang Lecture 6 Lecture outline Reading:Ch7 of text Today s lecture: Microcontroller 2 7.1 MICROPROCESSORS Hardware solution: consists of a selection of specific
More informationOEM-ORP ORP. Reads mV mV. Range. 1 reading every 420ms. Response time. Any type & brand. Supported probes. Single point.
V 2.3 Revised /23/18 OEM-ORP Embedded ORP Circuit Reads Range Response time ORP -19.9mV 19.9mV 1 reading every 420ms Supported probes Calibration Temp compensation Data protocol Default I 2 C address Operating
More informationExperiment 10 Fall 2012
10/30/12 Experiment 10 Fall 2012 Experiment 10 Fall 2012 Electronic Multi-Meter - A Voltage, Temperature, and Light Meter Due: Week 11 Lab Sessions (11/06/2012) For the voltage, light and temperature gauges
More informationPIC PROGRAMMING START. The next stage is always the setting up of the PORTS, the symbol used to indicate this and all Processes is a Rectangle.
PIC PROGRAMMING You have been introduced to PIC chips and the assembly language used to program them in the past number of lectures. The following is a revision of the ideas and concepts covered to date.
More informationFlow Charts and Assembler Programs
Flow Charts and Assembler Programs Flow Charts: A flow chart is a graphical way to display how a program works (i.e. the algorithm). The purpose of a flow chart is to make the program easier to understand.
More information17. 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 informationUnit 2: Data Storage CS 101, Fall 2018
Unit 2: Data Storage CS 101, Fall 2018 Learning Objectives After completing this unit, you should be able to: Evaluate digital circuits that use AND, OR, XOR, and NOT. Convert binary integers to/from decimal,
More informationECE 206, Fall 2001: Lab 3
ECE 206, : Lab 3 Data Movement Instructions Learning Objectives This lab will give you practice with a number of LC-2 programming constructs. In particular you will cover the following topics: - Load/store
More informationLecture (09) PIC16F84A LCD interface LCD. Dr. Ahmed M. ElShafee
Lecture (09) PIC16F84A LCD interface PIC16F84A LCD interface Assignment 01, 4 Zones fire controller board Assignment 02, automatic water tank controller Dr. Ahmed M. ElShafee ١ ٢ LCD LCD (Liquid Crystal
More informationBME 4900 Page 1 of 2. Meeting 2: Personal Progress Report 12/2/09 Team 12 with Drew Seils. Semester One Week Two
BME 4900 Page 1 of 2 Semester One Week Two These past two saw a lot of progress with the Revo stationary bike project. During Thanksgiving break Shane spent most of his time doing research for the power
More information/*Algorithm: This code display a centrifuge with five variable speed RPM by increaseing */
/*Algorithm: This code display a centrifuge with five variable speed RPM by increaseing */ /*the speed the cell which are less dense can float and the cell that are denser can sink*/ /*the user has five
More informationCSCI 2212: Intermediate Programming / C Chapter 15
... /34 CSCI 222: Intermediate Programming / C Chapter 5 Alice E. Fischer October 9 and 2, 25 ... 2/34 Outline Integer Representations Binary Integers Integer Types Bit Operations Applying Bit Operations
More informationCalibration of Recorded Digital Counts to Radiance
Graduate Radiometry, 1051-719 Laboratory No. 2 Fall Quarter, 2006 Calibration of Recorded Digital Counts to Radiance INTRODUCTION The goal of this experiment is to calibrate your digital camera, using
More informationADC SCALER METHOD V REF R TOP V ADC R BOT
ADC SCALER METHOD The purpose of this scaler calculation is to eliminate long division in the conversion of raw ADC data into a human readable decimal value using only integer math. This scale factor will
More informationLaboratory 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 informationApplication Note One Wire Digital Output. 1 Introduction. 2 Electrical Parameters for One Wire Interface. 3 Start and Data Transmission
Application Note One Wire Digital Output 1 Introduction The pressure transmitter automatically outputs pressure data, and when appropriate temperature data, in a fixed interval. The host simply waits for
More informationEE445L Fall 2012 Quiz 2B Page 1 of 6
EE445L Fall 2012 Quiz 2B Page 1 of 6 Jonathan W. Valvano First: Last: November 16, 2012, 10:00-10:50am. Open book, open notes, calculator (no laptops, phones, devices with screens larger than a TI-89 calculator,
More informationOverview. Exploration: LED Ramp Light. cs281: Introduction to Computer Systems Lab04 K-Maps and a Sensor/Actuator Circuit
cs281: Introduction to Computer Systems Lab04 K-Maps and a Sensor/Actuator Circuit Overview In this lab, we will use the K-maps from last lab to build a circuit for the three lights based on three bit
More informationTORRIX RS485. Technical Documentation. with MODBUS Protocol. Edition: Version: 3 Art. no.:
Technical Documentation TORRIX RS485 with MODBUS Protocol Edition: 2017-03 Version: 3 Art. no.: 350187 FAFNIR GmbH Schnackenburgallee 149 c 22525 Hamburg Tel.: +49 / 40 / 39 82 07 0 Fax: +49 / 40 / 390
More informationCPEG300 Embedded System Design. Lecture Interface with Peripheral Devices
CPEG300 Embedded System Design Lecture 0 805 Interface with Peripheral Devices Hamad Bin Khalifa University, Spring 208 Typical Devices for an Electronics System Power generation PWM control Input devices
More informationDHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EE Microcontroller Based System Design
DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EE6008 - Microcontroller Based System Design UNIT III PERIPHERALS AND INTERFACING PART A 1. What is an
More informationAFRecorder 4800R Serial Port Programming Interface Description For Software Version 9.5 (Last Revision )
AFRecorder 4800R Serial Port Programming Interface Description For Software Version 9.5 (Last Revision 8-27-08) Changes from Version 9.2 1. The communication baud rate is raised to 9600. 2. Testing with
More informationBeginning C Programming for Engineers
Beginning Programming for Engineers R. Lindsay Todd Lecture 6: Bit Operations R. Lindsay Todd () Beginning Programming for Engineers Beg 6 1 / 32 Outline Outline 1 Place Value Octal Hexadecimal Binary
More informationTORRIX RS485. Technical Documentation. with MODBUS Protocol. Edition: Version: 2 Art. no.:
Technical Documentation TORRIX RS485 with MODBUS Protocol Edition: 2016-05 Version: 2 Art. no.: 350187 FAFNIR GmbH Schnackenburgallee 149 c 22525 Hamburg Tel.: +49 / 40 / 39 82 07 0 Fax: +49 / 40 / 390
More informationWEATHER STATION WITH SERIAL COMMUNICATION
WEATHER STATION WITH SERIAL COMMUNICATION Written by: Wenbo Ye, Xiao Qu, Carl-Wilhelm Igelström FACULTY OF ENGINEERING, LTH Digital and Analogue Projects EITF11 Contents Introduction... 2 Requirements...
More informationICN12. I2C to UART Bridge, ADC,DAC and I/O
Firmware version 1.4 Introduction ICN12 I2C to UART Bridge, ADC,DAC and I/O This is an I2C to UART bridge, designed to give an extra UART to a microcontroller when only I2C is available. It is an I2C device
More informationECE2049: 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 informationC 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 informationSECTION 1 INTRODUCTION. Walt Kester
SECTION 1 INTRODUCTION Walt Kester This book deals with sensors and associated signal conditioning circuits. The topic is broad, but the focus of this book is to concentrate on circuit and signal processing
More informationLab 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 informationSummary of Circuits Team s Activities Fall 2007 Steven Gilson, Jay Dev Mahadevan, Abraham Cantwell
Summary of Circuits Team s Activities Fall 2007 Steven Gilson, Jay Dev Mahadevan, Abraham Cantwell PREPARED BY: Steve Gilson, Abraham Cantwell, Jaydev Mahadevan 1. Design and implement an optical encoder
More informationThere are a number of ways of doing this, and we will examine two of them. Fig1. Circuit 3a Flash two LEDs.
Flashing LEDs We re going to experiment with flashing some LEDs in this chapter. First, we will just flash two alternate LEDs, and then make a simple set of traffic lights, finally a running pattern; you
More informationLAB WORK 2. 1) Debugger-Select Tool-MPLAB SIM View-Program Memory Trace the program by F7 button. Lab Work
LAB WORK 1 We are studying with PIC16F84A Microcontroller. We are responsible for writing assembly codes for the microcontroller. For the code, we are using MPLAB IDE software. After opening the software,
More informationLCD. Configuration and Programming
LCD Configuration and Programming Interfacing and Programming with Input/Output Device: LCD LCD (liquid crystal display) is specifically manufactured to be used with microcontrollers, which means that
More information1 Principal Schematic for HTPA32x32d: Digital
This datasheet is valid for following parts: HTPA32x32dL2.1/0.8HiC[Si] HTPA32x32dL2.1/0.8C[Si] HTPA32x32dL2.1/0.8HiS[Si] HTPA32x32dL2.1/0.8S[Si] 1 Principal Schematic for HTPA32x32d: Digital SCL SDA 32x32
More informationCE4DMID01 COMMUNICATION PROTOCOL CONTENTS 1.0 INTRODUCTION
11/11/2011 Pagina 1 di 11 ELECTRICITY ENERGY METER FIRMWARE 1.3 CE4DMID01 COMMUNICATION PROTOCOL CONTENTS 1.0 INTRODUCTION 2.0 DATA MESSAGE DESCRIPTION 2.1 Data field description 2.2 Data format 2.3 Description
More informationSRF02 Ultrasonic range finder Technical Specification
SRF02 Ultrasonic range finder Technical Specification I2C Mode For Serial mode click here I2C Communication To use the SRF02 in I2C mode, make sure nothing is connected to the mode pin, it must be left
More informationME 6405 Introduction to Mechatronics
ME 6405 Introduction to Mechatronics Fall 2006 Instructor: Professor Charles Ume Microchip PIC Manufacturer Information: Company: Website: http://www.microchip.com Reasons for success: Became the hobbyist's
More informationComparison of C and Assembly How to compile a C program using CodeWarrior
Comparison of C and Assembly How to compile a C program using CodeWarrior o Using pointers to access contents of specific addresses in C o Including and using derivative.h or hcs12.h to use in MC9S12 port
More informationModel Answer Microcontrollers. MCQ Problems Total Q1 Q2
Model Answer Course name: Microcontrollers Exam numer: Midterm - Fall 2017 Course Code: ECE401 Exam Date: Nov 2016 Lecturer: Dr. Ahmed ElShafee Time Allowed: 60 minutes ID:... Name:.... MCQ Prolems Total
More informationUSB-Based 14-Channel Data-Acquisition Module
USB-Based 14-Channel Data-Acquisition Module DLP-IO14 LEAD FREE FEATURES: 14 IO s: 0-5V Analog, Digital In/Out, Temperature Two Bipolar Analog Inputs; ±5V Input Range Max All Analog Inputs: Up to 30Ksps
More informationProtocol of data exchange with modem via USB interface Version
Protocol of data exchange with modem via USB interface Version 2017.12.19 - Modem connects to USB-host as USB device of CDC class (virtual COM port in Windows, ttyusb or ttyacm in Linux) - Because real
More informationIME-100 ECE. Lab 4. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,
IME-100 ECE Lab 4 Electrical and Computer Engineering Department Kettering University 4-1 1. Laboratory Computers Getting Started i. Log-in with User Name: Kettering Student (no password required) ii.
More informationRobotic Systems ECE 401RB Fall 2006
The following notes are from: Robotic Systems ECE 401RB Fall 2006 Lecture 15: Processors Part 3 Chapter 14, G. McComb, and M. Predko, Robot Builder's Bonanza, Third Edition, Mc- Graw Hill, 2006. I. Peripherals
More informationCSCE 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 informationELECTRONIC SYSTEMS. Politecnico di Torino - ICT school. Goup B - goals. System block diagram Sensors and actuators Analog and digital signals
Politecnico di Torino - ICT school Goup B - goals ELECTRONIC SYSTEMS B INFORMATION PROCESSING B.1 Systems, sensors, and actuators» System block diagram» Analog and digital signals» Examples of sensors»
More informationWelcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website:
Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website: https://users.wpi.edu/~sjarvis/ece2049_smj/ece2049_labs.html You do not need to keep
More information