 Mini-Computer ◦ Microprocessor  The Brains  Arithmetic Logic Unit (ALU)  Control Unit  Program/ Data Storage  Peripherals (Input/Output)  Low-Cost.

Slides:



Advertisements
Similar presentations
Analog to digital converter
Advertisements

Slides created by: Professor Ian G. Harris PIC Development Environment MPLAB IDE integrates all of the tools that we will use 1.Project Manager -Groups.
Input/Output Ports and Interfacing ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
MICRO-CONTROLLER: A microcontroller is the brain of the robot: These are: 1. Integrated Circuits (ICs) 2. Programmable.
Analog Comparator Positive input chooses bet. PB2 and Bandgap Reference. Negative input chooses bet. PB3 and the 8 inputs of the A/D. ACME= Analog Comparator.
PIC16F bit 8-channel Analog-to-Digital Converter.
Slides created by: Professor Ian G. Harris Inputs and Outputs PIC Vcc RA3 RA4 RA5  Make an LED toggle state when button is pressed  Need to read RA3,
Data acquisition and manipulation
Explain the introduction to ADC, ADC characteristics, Programming ADC using PIC18, Introduction to DAC and DAC interfacing with PIC18.
ECT 357 Ch 10 Analog to Digital COnversion. Today’s Quote: It’s better to die with a good name than to live with a bad one. It’s better to die with a.
S4525A Peripherals & Enhanced FLASH 1 © 1999 Microchip Technology Incorporated. All Rights Reserved. S4525A Peripherals & Enhanced FLASH 1 Peripherals.
Analogue Input/Output
HT46 A/D Type MCU Series Data Memory (Byte) Program Memory HT46R22 (OTP) HT46C22 (Mask) 2Kx Kx16 4Kx HT46R23 (OTP) HT46C23 (Mask) HT46R24.
Railway Foundation Electronic, Electrical and Processor Engineering.
EEE305 Microcontroller Systems Lecture 5B: Simple I/O Embedded C using PIC microcontrollers Teaching resources on on
Microcontroller Architecture PIC18F Family
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Smart-grid Interface with Photovoltaic Installation – Phase 2 PP-01 Team members: Matt Koresh Ivan Mills Matt Martin Advisor: Dr. Aliprantis.
Microcontroller Programming How to make something almost do something else Raffi Krikorian MAS November 2003.
PIC microcontrollers. PIC microcontrollers come in a wide range of packages from small chips with only 8 pins and 512 words of memory all the way up to.
Arduino Josh Villbrandt February 4, Digital Circuits Analog versus digital – What’s the difference? – How to represent an analog signal in a computer?
© AJH 2013, V2.0 Computer Programming Embedded Systems Programming Stand-alone code, system initialisation, operating systems. Low-level operations; port.
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Microcontroller & Embedded System Subject Code : 6871 Semester : 7th Department.
Digital to Analogue Converter
One of the most important feature of the microcontroller is a number of input/output pins used for connection with peripherals. In the case of PIC 167CX,
Microprocessors A practical approach Subjects Goals for this module Results Subjects of the module Plans Questions.
RS232 #use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7
Prepared by Eng. Musa Alyaman1 Chapter Seven Chapter Seven PIC16F87x.
Basic information. * Microcontrollers incorporate the microprocessor, memory and input/output interfaces all on one chip * Microcontrollers have a separate.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
Chapter 2 Introducing the PIC Mid-Range Family and the 16F84A The aims of this chapter are to introduce: The PIC mid-range family, in overview The overall.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
 Mini-Computer  Microprocessor  The Brains  Arithmetic Logic Unit (ALU)  Control Unit  Program/ Data Storage  Peripherals (Input/Output) Low-Cost.
Suleyman Demirel University CSS340 Microprocessor Systems – Lecture 2 ATMEGA328P ARCHITECTURE ANALOG INPUTS.
The Silicon Laboratories C8051F020
Saxion University of Applied Sciences Advanced Microcontrollers A practical approach.
Lecture 11: Liquid Level Control System: A Case Study 1.
Chapter 11 Data Acquisition and Manipulation The aims of this chapter are to introduce: the main features of a data acquisition system; the characteristics.
Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.
Features of the PIC18 microcontroller - 8-bit CPU - 2 MB program memory space (internal 32KB to 128KB) bytes to 1KB of data EEPROM - Up to 4096 bytes.
Lab 1 Summary.
Microcontrollers session. What is Microcontroller? Microcontroller is composed of microprocessor,ram, flash memory,EEPROM and some modules like timers,
Microcontrollers A Practical Approach Ernesto Arroyo
Components of a typical full-featured microcontroller.
Microcontrollers JULES CALELLA. Microcontrollers vs Microprocessors  Microprocessors – do not contain RAM, ROM, I/O  Microcontrollers – The whole package.
Critical Air System Pressure Controller Senior Design Project, 2010 Morgan Hespe, Department of Electrical and Computer Engineering Mentor: Dr. Stanislaw.
A Quick Start Guide to PIC16F877 microcontroller And Microchip Development Environment A Quick Start Guide to PIC16F877 microcontroller And Microchip Development.
Criteria for choosing a microcontroller A microcontroller must meet the task at hand efficiency and cost effectively. Speed. What is highest speed of.
Microprocessors A practical approach..
Interactive LED Staircase Modules Group 38 Mike Udelhofen ECE 445 April 26, 2012.
INTERFACING HARDWARE WITH MICROCONTROLLER GUIDED BY: Prof. ASIF SIR 1. AKSHAY KIRAN 2. DEEP PARIKH 3. JIGAR PATEL 4. TILAK PATEL ,05,D2D06,09.
CEng3361 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2011 Recitation 06.
Microcontrollers Part II BME 201. Overview ADC Serial.
USING TV REMOTE AS A CORDLESS MOUSE FOR THE COMPUTER
CORDLESS MOUSE FEATURES BY TV REMOTE USING PIC MICROCONTROLLER
Application Case Study Christmas Lights Controller
Input/Output Ports and Interfacing
AVR ATMEGA 8 MICRO-CONTROLLER
EECE.3170 Microprocessor Systems Design I
INT. TO EMBEDDED SYSTEMS DEVELOPMENT
Project Title EVM IN PIC Under the Guidance of Submitted by.
EECE.3170 Microprocessor Systems Design I
Introduction to Circuits
PIC18F458 Analog-to-Digital
Introducing the PIC Mid-Range Family and the 16F84A
ADC and DAC Data Converter
PIC Analog Input Tom Igoe, NYU-ITP
ADC and DAC Data Converter
PIC Microcontroller ADC interfacing Prof. Ashvini Kulkarni
Presentation transcript:

 Mini-Computer ◦ Microprocessor  The Brains  Arithmetic Logic Unit (ALU)  Control Unit  Program/ Data Storage  Peripherals (Input/Output)  Low-Cost

 Embedded Inside: ◦ Automotive systems ◦ Airplanes ◦ Toys ◦ Medical Devices ◦ Furniture ◦ Billions of units

AT89C51AT89C52AT89S51AT89S52 ATMEGA-8 AT89C2051 AT89C4051 AT89C55WD AT89S8252 AT90S2313 AT90S8515 AT90S8535 ATMEGA-16 ATMEGA-32 ATMEGA-64 ATMEGA-88 ATTINY-13 ATTINY-15 ATTINY-26 AT89C51ED2 AT89C51RD2AT91RM9200 AT91SAM256 ATMEGA-128 ATMEGA-162W78E052B40DL

PIC16F72 PIC16F73 PIC16F74 PIC16F76 PIC16F77 PIC16F88 PIC10F200 PIC12F508 PIC12F629 PIC12F675 PIC16C54C PIC16C57C PIC16C65B PIC16C923 PIC16F676 PIC16F84A PIC18F452 PIC16C622A PIC16F628A PIC16F648A PIC16F873A PIC16F876A PIC16F877A PIC18F2550 PIC18F4550

Wide operating voltage range (2.0V-5.5V) 33 I/O pins Two 8-bit Timer, One 16-bit Timer 8-channel, 10-bit ADC Programmable Serial USART Internal Calibrated RC Oscillator DC – 20 MHz oscillator/clock input Software selectable frequency range of 8 MHz to 32 kHz 40-Pin Pin Enhanced Flash, 8-Bit CMOS Microcontrollers with Nano Watt Technology

To start C programming language on Microchip PIC Microcontroller you need these following tools:  Down load the latest MikroC and Install it  The PIC16F877A datasheet  Microchip Programmer.  Trainer Board

 For Port A, B, C, D, E there are control bytes TRISx.  Setting a TRISx bit (= 1) will make the corresponding PORTx pin an input  Clearing a TRISx bit (= 0) will make the corresponding PORTx pin an output

#include void main() // main function { TRISA0 = 1; // declare RA0 pin as input TRISC = 0; // declare POART C as output ADCON1=0b ;//declare RA0 pin as digital while (1) // working loop { if(PORTA == 0) { PORTC = 0; } else if (PORTA0 == 1) { PORTC = 1; }

 Ensure that the output current <20mA Maximum output current sunk by any I/O pin mA Maximum output current sourced by any I/O pin mA Maximum current sunk by PORTA, PORTB and PORTC (combined) mA Maximum current sourced PORTA, PORTB and PORTC (combined) mA

 For hardware side, use 1uf-10uf Capacitor across the push button if the input source is a push button.  Solve the de-bouncing problem by programming accordingly.

 Write a program that ◦ takes input from RC0 and RC1 ◦ Output LED at RC2 is light while any of the input is high ◦ Output LED as RC3 is light while both of the inputs are high  Simulate it and run it to the Microcontroller

◦ TRISC0=1; // defined as input ◦ TRISC1=1; // defined as input ◦ TRISC2=0; // defined as output ◦ TRISC3=0; // defined as output While(1){ RC2=RC0 | RC1; RC3= RC0 &RC1; }

 10-bit Resolution  μs Conversion Time  8 Multiplexed Single Ended Input Channels  0 - VCC ADC Input Voltage Range  Selectable 2.56V ADC Reference Voltage

 10-bit Resolution

 8 Multiplexed Single Ended Input Channels

 0 - VCC ADC Input Voltage Range

 Selectable 2.56V ADC Reference Voltage

Enable ADC Analog input channel declaration Channel Selection Clock Selection Start a conversion Wait until the conversion finishes When the conversion is done, read the 8 bit LSB from ADRESL and 2 bit MSB from ADRESH byte. Concatenate them to get 10 bit conversion

There are the registers available to control the functionality of the A/D module:  1. ADON=1  2. ADCS2,1,0  3. CHS2,1,0

 Set the corresponding TRISx bits to ‘1’ to set the pin output driver to its high-impedance state.  Likewise, set the corresponding ANSx bit to disable the digital input buffer.

 The A/D conversion can be supplied in two formats: Left or right justified.  The ADFM bit (ADCON0 ) controls the output format.

 There are two options for the voltage reference to the A/D converter: either VDD is used or an analog voltage applied to VREF is used.  The VCFG bit (ADCON0 )controls the voltage reference selection.  If VCFG is set, then the voltage on the VREF pin is the reference;otherwise, VDD is the reference.

 The source of the conversion clock is software selectable via the ADCS bits (ADCON1 ).

 The A/D conversion is initiated by setting the GO/DONE bit (ADCON0 ).  When the conversion is complete, the A/D module: Clears the GO/DONE bit

 Special Thanks to Md. Ariful Haque