July 18, UCSD - R.A. de Callafon Short Intro to Micro Processors and I/O functions of our Kinetic Sculpture Control Box Raymond de Callafon.

Slides:



Advertisements
Similar presentations
What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
Advertisements

EEE226 MICROPROCESSORBY DR. ZAINI ABDUL HALIM School of Electrical & Electronic Engineering USM.
Presentation by: Serena, Ann & Nicole
Industrial Automation and Control
Data Acquisition Concepts Data Translation, Inc. Basics of Data Acquisition.
Basic Stamp II is kinda cool Bytes of EEPROM(non-volatile) - Clock speed of 20 MHz. - Holds 600 lines of code in EEPROM - executes an average of.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Introduction to Microprocessors Number Systems and Conversions No /6/00 Chapter 1: Introduction to 68HC11 The 68HC11 Microcontroller.
The Solar Tracker. Solar Tracking Project Team Members: –Cristian Ruvalcaba –Ken Seal –David Clark –Mark McKinley –Richard DeJarnatt.
Railway Foundation Electronic, Electrical and Processor Engineering.
Railway Foundation Electronic, Electrical and Processor Engineering.
The 8051 Microcontroller Architecture
Introduction.
ASPPRATECH.
Microcontroller: Introduction
BLDC MOTOR SPEED CONTROL USING EMBEDDED PROCESSOR
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Micro controllers A self-contained system in which a processor, support, memory, and input/output (I/O) are all contained in a single package.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
Dynamics of Moving Objects in Kinetic Sculpture (Ball Drop Physics II)
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
Chapter Introduction to Computers and Programming 1.
1 Sensors and Measurements Penderia & Pengukuran ENT 164 Signal Processing Elements Hema C.R. School of Mechatronics Engineering Northern Malaysia University.
A. computers do everything by adding: – 1. multiplication – 2. subtraction – 3. division B. The device which does the arithmetic is called the ALU – 1.
NetBurner MOD 5282 Network Development Kit MCF 5282 Integrated ColdFire 32 bit Microcontoller 2 DB-9 connectors for serial I/O supports: RS-232, RS-485,
Revised: Aug 1, ECE 263 Embedded System Design Lesson 1 68HC12 Overview.
Programming the CheapBot-14. Start the Editor Set the Mode.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
Chapter 17 Looking “Under the Hood”. 2Practical PC 5 th Edition Chapter 17 Getting Started In this Chapter, you will learn: − How does a computer work.
July 16, UCSD - R.A. de Callafon Dynamics of Moving Objects in Kinetic Sculpture (Ball Drop Physics I) Raymond de Callafon Dynamic Systems.
MICROOCESSORS AND MICROCONTROLLER:
Microcontroller Applications ELEC 421 Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
Presented by Sadhish Prabhu
Lecture 7: Overview Microprocessors / microcontrollers.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Rebecca Bruce and Susan Reiser, May 2015 Analog Input and Output.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Submitted by:.  Project overview  Block diagram  Power supply  Microcontroller  MAX232 & DB9 Connector  Relay  Relay driver  Software requirements.
BLDC Motor Speed Control with RPM Display. Introduction BLDC Motor Speed Control with RPM Display  The main objective of this.
1 Introduction to Haptics Introduction to the Hapkit board Allison M. Okamura Stanford University.
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
BITS Pilani Pilani Campus Pawan Sharma ES C263 Microprocessor Programming and Interfacing.
Modem. Introduction: A modem [Modulator -Demodulator] is a device. Data communication means transmitting digital information form one computer to other.
1. PIC ADC  PIC18F877 has 8 analog input channels i.e. port A pins(RA0 to RA5) and port E pins(RE1 and RE2). These pins are used as Analog input pins.
1 Microcontrollers. 2 Programmers work in the virtual world Machinery works in the physical world Microcontrollers connect the virtual and physical world.
Case Study #1 Microcontroller System. What is a microcontroller? A microcontroller can be considered a self-contained system with a processor, memory.
ENERGY METER TO INDICATE BILLING IN RUPEES FOR LOAD WISE OR DAY WISE
MECH 373 Instrumentation and Measurements
Obstacle avoiding robot { pixel }
Popular Microcontrollers and their Selection by Lachit Dutta
Microprocessor and Microcontroller Fundamentals
Microprocessor and Microcontroller Fundamentals
PROPELLER DISPLAY OF MESSAGE BY VIRTUAL LEDS
ABSTRACT The controller continuously polls the temperature with certain regular time intervals and displays over the 7_segment display The temperature.
Automatic human detector garbage can.
SCADA for Remote Industrial Plant
Microcontroller Applications
PC Mouse operated Electrical Load Control Using VB Application
SUBMITTED BY EDGEFX TEAM
IPCOWALA INSTITUTE OF ENGINEERING & TECHNOLOGY-DHARMAJ
Introduction to Microcontrollers and the Board of Education
Arduino - Introduction
Introduction to Microprocessors and Microcontrollers
EET 2261 Unit 14 INCOMPLETE Analog-to-Digital Conversion (ADC) & Digital-to-Analog Conversion (DAC) Read. Homework #13 and Lab #13 due next week. Quiz.
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE.
ADSP 21065L.
Automotive Technology Principles, Diagnosis, and Service
Presentation transcript:

July 18, UCSD - R.A. de Callafon Short Intro to Micro Processors and I/O functions of our Kinetic Sculpture Control Box Raymond de Callafon Dynamic Systems & Control Group Center of Magnetic Recording Research UCSD, Dept. of MAE COSMOS LECTURE

2 July 18, UCSD - R.A. de Callafon Introduction Micro Processor: combination of Processor (for computing) Input/Output functionality RAM (Random Access Memory) ROM (Read Only Memory) (FLASH or EPROM) Mostly “all on one chip”

3 July 18, UCSD - R.A. de Callafon In this COSMOS cluster we are using a micro processor for: Process measurement data Timing events (when a ball passes by) Count how many balls came by Compute what velocity was Display result on LCD screen Make a sound Send out control signals Turn a servo motor Turn of/off a switch or actuator Introduction

4 July 18, UCSD - R.A. de Callafon Functionality of a Micro Processor

5 July 18, UCSD - R.A. de Callafon Functionality of a Micro Processor Functionality depends on “brand” (Intel, HP, MicroChip, Motorolla) Peripheral interface General items in micro processor: Can be programmed! Arithmetic Functionality Timers Interface with Peripherals Digital In and Out signals Analog In signals Pulse Width Modulation Out

6 July 18, UCSD - R.A. de Callafon Functionality of Micro Processor Micro Processor in your Kinetic Sculpture Box: Peripheral Interface Controller Micro Processor Some details: PIC made by MicroChip Reduced Instruction Set Computing (RISC) HARVARD memory (separation between program and variables) (Only) needs power + clock (oscillator) to operate

7 July 18, UCSD - R.A. de Callafon Functionality of Micro Processor Arithmetic Functionality Adding, subtracting and multiplying integer numbers Adding, subtracting and multiplying real numbers via “emulation”: means a lot of computing time In general only fixed point precision, compared to floating point precision Floating point computations: co-processor needed…

8 July 18, UCSD - R.A. de Callafon Functionality of Micro Processor Timers Timers increment and decrement on the basis of clock (oscillator) Use to time events! Oscillator = clock and value can be retrieved and stored in memory Example: speed sensors Measure clock at first passing of sensor Measure clock at second passing of sensor Time = difference in timer Velocity = distance/time

9 July 18, UCSD - R.A. de Callafon Functionality of Micro Processor Interface with Peripherals Write to the LCD screen Turn on/off certain LED’s (digital out signals) Some example code of LCD writing: LCD = variable defined in file VARIABLES serout = command to write to a serial port

10 July 18, UCSD - R.A. de Callafon Functionality of Micro Processor Help on programming: We use an friendly IDE (Integrated Development Environment) Pressing F1 will open help Look for command (serout) Read documentation Many examples on COSMOS website!

11 July 18, UCSD - R.A. de Callafon Functionality of Micro Processor Digital I/O signals PIC microprocessor in box has over 30 connection pins COSMOS controlbox has 3 digital input pins DA, DB and DC Each pin can be programmed to be an Digital Input or Digital Output Digital I/O: Only 2 values: 0 and 1 0 corresponds to low voltage < 0.5 Volt 1 corresponds to high voltage > 3.8 Volt Combining digital I/O data yields numbers!

12 July 18, UCSD - R.A. de Callafon Functionality of Micro Processor Examples of use Digital I/O signals: Digital I/O signal to detect events Position measurement of ball: When ball passes sensor, pin # becomes “low” or “high” Velocity measurement of ball: Measure time (using timer) when ball passes two sensors Digital /IO signal as numbers Consider 8 digital Input channels (on port D) with: Combining them gives what (decimal) number?

13 July 18, UCSD - R.A. de Callafon Functionality of Micro Processor Analog I/O signals COSMOS controlbox has 3 analog input pins AD0, AD1 and AD2 Microprocessor converts analog input signal to a number of bits number This process is called AD conversion (Analog to Digital Conversion) Important parameters in AD conversion: Number of bits or resolution (typically 8 bits) Speed of AD conversion

14 July 18, UCSD - R.A. de Callafon Functionality of Micro Processor Examples of use Analog I/O signals: Analog I/O signal to measure “user input” Position of a potentio meter (variable resistor) Varying voltage signal from a sensor Resolution Consider a AD conversion that will convert a signal between 0 and 5 Volt to an 8 bit number. What will be the resolution?

15 July 18, UCSD - R.A. de Callafon Functionality of Micro Processor Combination of I/O signals + computations: Measurements & Actuation Physics experiments Move a servo motor Detection To see if your kinetic sculpture is working properly Time events Automation (most interesting part) Process certain events automatically! Process user input automatically!

16 July 18, UCSD - R.A. de Callafon Functionality of Micro Processor Automation Principles of Automation are based on Combining Measurement and Actuation Feedback (remember labtour to the control laboratory)! Formats of Feedback On/Off actuation Fuzzy actuation Continuous actuation

17 July 18, UCSD - R.A. de Callafon Functionality of Micro Processor Microprocessor makes this active KS work: measure ball velocity with optical sensor actuate stepper motor

18 July 18, UCSD - R.A. de Callafon Programming a Micro Processor Programming via Assembly code (RISC) Very hard to understand (at first) Code hard to maintain C code (high level) A bit easier to understand Easier for maintenance P basic or Q basic (based on BASIC like language) Easy to understand Not so easy for large projects

19 July 18, UCSD - R.A. de Callafon Programming a Micro Processor Write your code in basic via BasicMicro IDE Compile code and see if there any errors Download (burn flash memory) onto microprocessor Test and debug code (can also be done before downloading)

20 July 18, UCSD - R.A. de Callafon Programming a Micro Processor Main ingredients in code Definition of constants (I/O pins and memory) Definition of variables + type bit 0 to 1 byte 0 to 255 sbyte -127 to 128 word 0 to sword to long to float (*not used in this course*) comments name type

21 July 18, UCSD - R.A. de Callafon Programming a Micro Processor Main ingredients in code If statements: Initializations & computations:

22 July 18, UCSD - R.A. de Callafon Programming a Micro Processor Main ingredients in code Setting up timers with interrupt: Define interrupt function:

23 July 18, UCSD - R.A. de Callafon Simulation of Micro Processor Simulation in Working Model: actuate catching! Change force, depending on measurement of velocity (more in next lecture on dynamics)

24 July 18, UCSD - R.A. de Callafon Programming a Micro Processor example code(s) explained by Alex Simpkins ExampleExample of BAS code TutorialTutorial on how to write a program