EEE305 Microcontroller Systems Lecture 8: Analogue to Digital Conversion using PIC microcontrollers and the C compiler (NB As of 18/04/13 this code uses.

Slides:



Advertisements
Similar presentations
Part 2 1A Building Automation Monthly Course, Can be freely distributed as long as original authorship is acknowledged.
Advertisements

Computer Programming w/ Eng. Applications
What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
CS1010 Programming Methodology
EET 2261 Unit 14 INCOMPLETE Analog-to-Digital Conversion (ADC) & Digital-to-Analog Conversion (DAC)  Read.  Homework #13 and Lab #13 due next week. 
EEE305 Microcontroller Systems Lecture 9B: GPIO on the Arduino Teaching resources are at My office 5B18, telephone.
Software Development Method. Assignments Due – Homework 0, Warmup Reading – Chapter 2 –
System for Engine Location Of a Web Train Paul Wimmer and Adam Weintrop Dr. Irwin and Dr. Schertz 4/3/06.
CS101- Lecture 11 CS101 Fall 2004 Course Introduction Professor Douglas Moody –Monday – 12:00-1:40 – – –Web Site: websupport1.citytech.cuny.edu.
Designing Algorithms Csci 107 Lecture 3. Administrativia Lab access –Searles 128: daily until 4pm unless class in progress –Searles 117: 6-10pm, Sat-Sun.
Railway Foundation Electronic, Electrical and Processor Engineering.
Graph the function y = |4 cos x|
EEE305 Microcontroller Systems Lecture 4: The PIC microprocessor and the Microchip C Compilers Teaching resources on on
ENGR 3 rocks. my account hw1 hw2 ENGR3 hw3 capacitor IntTable.cfindPi.c capacitor.c change.c timestable.c pythagroean.c.
IESE Library. Your Link to Knowledge IESE Library Catalog How do I place a hold on books?
Railway Foundation Electronic, Electrical and Processor Engineering.
EEE305 Microcontroller Systems Lecture 5B: Simple I/O Embedded C using PIC microcontrollers Teaching resources on on
EEE502 Embedded Systems Lecture 5: Embedded C using PIC microcontrollers Simple I/O and XC8 Teaching resources are at My office 5B18,
EEE305 Microcontroller Systems Lecture 7: Embedded C using PIC microcontrollers Serial i/o with the XC8 Teaching resources are at
Basic Circuits – Lab 2 Arduino and Sensors
Chapter 1 The First Flight Creating the first project and saying “Hello to the World”
How to use the CCS compiler with the serial port.
EG280 - CS for Engineers Chapter 2, Introduction to C Part I Topics: Program structure Constants and variables Assignment Statements Standard input and.
Microprocessors A practical approach Subjects Goals for this module Results Subjects of the module Plans Questions.
Given an integer value stored in a variable, develop an algorithm to print the value to the display device. Integer Output Note that the value could be.
Install “ Al-Farahidy “ Step 1 Install from “ Start “ then “ Run “ Click on “ Install.exe “ then “ Ok “
EEE527 Embedded Systems Lecture 10B:Chapter 11 Analogue to Digital Convertors (ADCs) (version 2: 25/11/13, see after slide 20 Ian McCrumRoom 5B18, Tel:
EEE305 Microcontroller Systems Lecture : Using Interrupts with Embedded C using PIC microcontrollers Teaching resources on on
Basic information. * Microcontrollers incorporate the microprocessor, memory and input/output interfaces all on one chip * Microcontrollers have a separate.
Xtreme Robot Olympiad Programming Basics Dr. Peter Laz Associate Professor Department of Engineering University of Denver.
Suleyman Demirel University CSS340 Microprocessor Systems – Lecture 2 ATMEGA328P ARCHITECTURE ANALOG INPUTS.
Introducing C++ Programming Lecture 3 Dr. Hebbat Allah A. Elwishy Computer & IS Assistant Professor
EEE527 Embedded Systems Lecture 2: Chapter 2: C and Using more MPLAB (X) + XC32 Ian McCrumRoom 5B18, Tel: voice mail on 6 th ring
Chapter 3 Input and Output
EEE527 Embedded Systems Lecture 12: Mini-Project Ian McCrumRoom 5B18, Tel: voice mail on 6 th ring Web site:
How to design and code functions Chapter 4 (ctd).
Contacting the Help Desk Core Computing Objectives.
E-1 University of Washington Computer Programming I Lecture 5: Input and Output (I/O) © 2000 UW CSE.
Simulation and Modeling: Predator-Prey Processing Lab IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 23, 2014 Carolyn Seaman Susan.
Water Flow GROUP A. Analogue input voltage results: Motor Input voltage( V) pin 12 Analogue input voltage (V) Display number
Chapter 8 Arrays. A First Book of ANSI C, Fourth Edition2 Introduction Atomic variable: variable whose value cannot be further subdivided into a built-in.
Department of Electronic & Electrical Engineering Further work? Simple Voltmeter. ● Analogue to Digital converter (MCP3001 SPI ) ● Analogue → 10bit binary.
CS 125 Lecture 9 Martin van Bommel. Output printf used to display integers, reals (floats and doubles), and strings printf(” control string ”, exp 1,
Homework 1 (due:April 8th) Deadline : April 8th 11:59pm Where to submit? eClass “ 과제방 ” ( How to submit? Create a folder. The name.
Escape sequence Certain characters, preceded by a backslash ( \ ), are known as escape sequences They are used to display certain characters, or as display.
Lecture 5: Layers of Control. Nested while Loops Problem Multiplying two numbers and outputting the result only if they are both less than 5. (i.e. Start.
Lecture 6: More Decisions & Arrays B Burlingame 9 March 2016.
Graphing Function Charts. X Y I Y = 2X + 1 X Y ½ Y - intercept 0, 1 X - intercept -½, 0.
1 Lab 4: D/A Converter Lab 4: D/A Converter This is a simple resistive network for a D/A converter Port 1, Port 0 are digital inputs ==> 00 (minimum),
Microcontrollers Part II BME 201. Overview ADC Serial.
Arduino Programming. THE ARDUINO IS A MICROCONTROLLER – A LOW COST, LOW PERFORMANCE COMPUTER.
Formatted Input and Output
CIS3931 – Intro to JAVA Lecture Note Set 2 17-May-05.
Completing the Square.
Microcontroller basics
EECE.3170 Microprocessor Systems Design I
Chapter 3: I/O Management
Week 6: Microcontrollers II
CSC 253 Lecture 8.
Another way to solve quadratics!
CSC 253 Lecture 8.
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.
COMS S1007 Object-Oriented Programming and Design in Java
Computers in the Workplace
Изразеното в настоящата презентация мнение обвързва единствено автора и не представлява официално становище на Комисията за финансов надзор Данил Джоргов.
C Programming Pointers
Completing the Square.
Programming Fundamentals Lecture #4 Overview of Computer Programming
4.7A Complete the Square Algebra II.
Presentation transcript:

EEE305 Microcontroller Systems Lecture 8: Analogue to Digital Conversion using PIC microcontrollers and the C compiler (NB As of 18/04/13 this code uses the older HTC compiler, I will change it to the more modern XC8 compiler in class) Teaching resources are at My office 5B18, telephone My 1/

Datasheet Chapter 11

C Code to read ADC and O/p reading

Last week’s code to use USART serial port

Main code to test ADC

Further experiments If the ADC returns a number from 0 to 1024 Scale this to 80 (the width of a PUTTY screen) Use a for loop For(i=0;i<scaled_reading;i++){putchar(‘*’);} Printf(“\r\n”); This will print a “graph” across the screen.

Making a Thermometer Assume the thermistor initially reads 20 degrees After holding for 60 seconds assume it reads 35 degrees Scale the readings to display degrees i.e If you get a reading of XX for 20 degrees and YY for 35 degrees. 20⁰C 35⁰C XXYYZZ ??⁰C Don’t forget to use variables of type float if they are needed