Embedded Systems. Oscillator and I/O Hardware. Eng. Anis Nazer First Semester

Similar documents
4-bit counter circa bit counter circa 1990

Note that none of the above MAY be a VALID ANSWER.

4-bit counter circa bit counter circa 1990

Logic Families. Describes Process used to implement devices Input and output structure of the device. Four general categories.

Electronic Components

Place answers on the supplied BUBBLE SHEET only nothing written here will be graded.

Module-1: Logic Families Characteristics and Types. Table of Content

Elements of Electronics and Circuit Analysis

LSI/CSI LS7560N LS7561N BRUSHLESS DC MOTOR CONTROLLER

Digital Integrated CircuitDesign

Low Voltage, High Current Time Delay Circuit

COLLECTOR DRAIN BASE GATE EMITTER. Applying a voltage to the Gate connection allows current to flow between the Drain and Source connections.

Experiment (1) Principles of Switching

1 Second Time Base From Crystal Oscillator

Semiconductors, ICs and Digital Fundamentals

Hello, and welcome to the TI Precision Labs video series discussing comparator applications. The comparator s job is to compare two analog input

Lecture Summary Module 1 Switching Algebra and CMOS Logic Gates

Laboratory 11. Pulse-Width-Modulation Motor Speed Control with a PIC

Fig 1: The symbol for a comparator

DATASHEET CD4060BMS. Pinout. Features. Functional Diagram. Oscillator Features. Applications. Description

Long Loopstick Antenna

LSI/CSI LS7215 LS7216 PROGRAMMABLE DIGITAL DELAY TIMER

USER MANUAL FOR THE SN74LS04 HEX INVERTER AND THE DM7407 HEX BUFFER FUNCTIONAL MODULE

Chapter 15 Integrated Circuits

High Current MOSFET Toggle Switch with Debounced Push Button

DATASHEET CD14538BMS. Description. Features. Applications. Functional Diagram. Pinout. CMOS Dual Precision Monostable Multivibrator

The Basics Digital Input

APPENDIX C IC INTERFACING AND SYSTEM DESIGN ISSUES

NT7605. Features. General Description

νµθωερτψυιοπασδφγηϕκλζξχϖβνµθωερτ ψυιοπασδφγηϕκλζξχϖβνµθωερτψυιοπα σδφγηϕκλζξχϖβνµθωερτψυιοπασδφγηϕκ χϖβνµθωερτψυιοπασδφγηϕκλζξχϖβνµθ

LS7362 BRUSHLESS DC MOTOR COMMUTATOR / CONTROLLER

DESIGN TIP DT Variable Frequency Drive using IR215x Self-Oscillating IC s. By John Parry

M328 version ESR inductance capacitance meter multifunctional tester DIY

High Voltage CMOS Logic. <Logic Gate> General-purpose CMOS Logic IC Series (BU4S,BU4000B Series)

Microcontroller Systems. ELET 3232 Topic 13: Load Analysis

Test Specification City of Glasgow College HND Electronics Graded Unit Project SARRRO Gavin Hannah N /13

EE 42/100 Lecture 23: CMOS Transistors and Logic Gates. Rev A 4/15/2012 (10:39 AM) Prof. Ali M. Niknejad

Test Specification City of Glasgow College HND Electronics Graded Unit Project SARRRO Gavin Hannah N /13

1 IC Logic Families and Characteristics

Abu Dhabi Men s College, Electronics Department. Logic Families

User s Manual. ACPL-339J Isolated Gate Driver Evaluation Board. Quick-Start. Testing Either Arm of The Half Bridge Inverter Driver (without IGBT)

EM78P159N Errata document Specification Revision History

Module-3: Metal Oxide Semiconductor (MOS) & Emitter coupled logic (ECL) families

ZBasic. Application Note. AN-213 External Device Interfacing. Introduction. I/O Pin Fundamentals. Connecting an LED

DPDT. How many SPDTs and how many DPDTs you think you need to control one light-bulb common to a 10-floor staircase. Total 11 switches.

IC Logic Families and Characteristics. Dr. Mohammad Najim Abdullah

Frequency Generator and Integrated Buffer for PENTIUM

Lab 1 - Revisited. Oscilloscope demo IAP Lecture 2 1

Interfacing the isppac-powr1208 with Modular DC-to-DC Converters

Lecture Summary Module 1 Switching Algebra and CMOS Logic Gates

Electronics: Design and Build Training Session. Presented By: Dr. Shakti Singh Hazem Elgabra Amna Siddiqui

German- Jordanian University

Embedded Systems. Interfacing PIC with external devices Analog to digital Converter. Eng. Anis Nazer Second Semester

LSI/CSI LS8397 STEPPER MOTOR CONTROLLER. LSI Computer Systems, Inc Walt Whitman Road, Melville, NY (631) FAX (631)

INTERNATIONAL JOURNAL OF ELECTRONICS AND COMMUNICATION ENGINEERING & TECHNOLOGY (IJECET)

PNI Axis Magneto-Inductive Sensor Driver and Controller with SPI Serial Interface. General Description. Features.

CD4028. CMOS BCD-To-Decimal Decoder. Pinout. Features. Functional Diagram. Applications. Description.

3 12 Series of Encoders

NT7605. Single-chip 20C X 2L Dot-Matrix LCD Controller / Driver. Features. General Description 1 V2.1

DATASHEET CD4069UBMS. Features. Pinout. Applications. Functional Diagram. Description. Schematic Diagram. CMOS Hex Inverter

BICMOS Technology and Fabrication

3.3V ZERO DELAY CLOCK BUFFER, SPREAD SPECTRUM COMPATIBLE

Embedded Systems and Software

Why and How Isolated Gate Drivers

Physics 116B TLC555 Timer Circuit

ASTABLE MULTIVIBRATOR

EXAMINATION PAPER EMBEDDED SYSTEMS 6EJ005 UNIVERSITY OF DERBY. School of Computing and Technology DATE: SUMMER 2003 TIME ALLOWED: 2 HOURS

Process Components. Process component

NT7603. Features. General Description

EE 330 Laboratory 8 Discrete Semiconductor Amplifiers

DIGITAL VLSI LAB ASSIGNMENT 1

UNIT-1 Bipolar Junction Transistors. Text Book:, Microelectronic Circuits 6 ed., by Sedra and Smith, Oxford Press

LM555 and LM556 Timer Circuits

3 18 Series of Encoders

LSI/CSI LS7290 STEPPER MOTOR CONTROLLER. LSI Computer Systems, Inc Walt Whitman Road, Melville, NY (631) FAX (631)

PAiA 4780 Twelve Stage Analog Sequencer Design Analysis Originally published 1974

Pre-certification Electronics Questions. Answer the following with the MOST CORRECT answer.

the reactance of the capacitor, 1/2πfC, is equal to the resistance at a frequency of 4 to 5 khz.

CD4063BMS. CMOS 4-Bit Magnitude Comparator. Pinout. Features. Functional Diagram. Applications. Description. December 1992

ENEE307 Lab 7 MOS Transistors 2: Small Signal Amplifiers and Digital Circuits

ET 438B Sequential Digital Control and Data Acquisition Laboratory 4 Analog Measurement and Digital Control Integration Using LabVIEW

SD8000S. 20 bits ADC SOC with RTC. SD8000S Bare Die. Features. Applications. Description. Ordering Information. Pin Diagram and Descriptions

SD bits ADC SOC. Features. Applications. Ordering Information. Description. Pin Diagram and Descriptions

Design cycle for MEMS

Logic Families. A-PDF Split DEMO : Purchase from to remove the watermark. 5.1 Logic Families Significance and Types. 5.1.

IR116 RS1 TM Remote Control IC

Electronics EECE2412 Spring 2017 Exam #2

Device Technologies. Yau - 1

Figure 1. Block diagram of system incorporating power amplification.

o What happens if S1 and S2 or S3 and S4 are closed simultaneously? o Perform Motor Control, H-Bridges LAB 2 H-Bridges with SPST Switches

DATASHEET CD4013BMS. Pinout. Features. Functional Diagram. Applications. Description. CMOS Dual D -Type Flip-Flop. FN3080 Rev 0.

SN54LS373, SN54LS374, SN54S373, SN54S374, SN74LS373, SN74LS374, SN74S373, SN74S374 OCTAL D-TYPE TRANSPARENT LATCHES AND EDGE-TRIGGERED FLIP-FLOPS

CARDINAL COMPONENTS. Operating Conditions: Description Min Max Unit

LABORATORY EXPERIMENT. Infrared Transmitter/Receiver

Microcontrollers and Interfacing

AP1511A / B IR Filter Switch Driver

Autonomous Robot Control Circuit

FILTER_0/Prog. Delay Combination Function Macrocells Pin 3 GPIO RC Oscillator. 2-bit LUT2_0 or DFF0. 3bit LUT3_0 or DFF2

Electrostatic Discharge and Latch-Up

Government Polytechnic Muzaffarpur Name of the Lab: Applied Electronics Lab

Transcription:

Embedded Systems Oscillator and I/O Hardware Eng. Anis Nazer First Semester 2016-2017

Oscillator configurations Three possible configurations for Oscillator (a) using a crystal oscillator (b) using an RC circuit (c) using an external clock

Oscillator configurations (a) using a crystal oscillator: OSC1 and OSC2 are used to generate the clock signal

Oscillator configurations (b) using an RC circuit: OSC1 is used to generate the clock signal OSC2 can be used to drive other circuit components with ¼ the frequency of the clock

Oscillator configurations (c) using an external clock

Logic Values In a digital world, two values: Logic 1 Logic 0 In electrical terms: Logic 1: pin connected to VDD, i.e. power supply Logic 0: pin is connected to ground, i.e. 0 Volts

Input If the input is connected to Vdd, the PIC will treat it as a logic 1 If the input is connected to ground, the PIC will treat it as a logic 0 PIC PIC Logic 1 Logic 0

Input electrical characteristics Some definitions: VIH : minimum acceptable voltage when input is High VIL: maximum acceptable voltage when input is Low IIH: current when input is High IIL: current when input is Low Values for such parameters are found in the Data Sheet To be safe current should not exceed IIH or IIL for an input

Input voltage range V DD VIH } Logic 1 VIL 0 Volts } Logic 0

Output If an output is logic 1, it will be internally connected to power supply through a pull-up pull-up can be a resistor or a transistor PIC pull up Logic 1

Output If an output is logic 0, it will be internally connected to ground through a pull-down pull-down can be a resistor or a transistor PIC pull down Logic 0

Output electrical characteristics Some more definitions: VOH: voltage when the output pin is at Logic 1 VOL: voltage when the output pin is at Logic 0 IOH: current when the output pin is at logic 1 IOL: current when the output pin is at logic 0 The load at an output pin should be chosen such that IOL or IOH is not exceeded

Voltage Ranges, Input/Output V DD } Logic 1 V DD VOH } Logic 1 VIH VIL 0 Volts } Logic 0 VOL 0 Volts } Logic 0

LED LED: light emitting diode It has: Anode (positive) Cathode (negative) For the LED to be ON, the anode must have a higher voltage than the cathode by a certain amount VD

Output connecting an LED Two ways to connect an LED Current source: the current flows out from the PIC logic 1 LED is ON logic 0 LED is OFF PIC LED

Output connecting an LED Current sink: the current flows into the PIC logic 0 LED is ON logic 1 LED is OFF PIC LED

PIC with LED What should be the value of R Example: Calculate the value of R if the LED has a threshold voltage VD = 2.0 V and requires 20mA to light. a) The led is to be connected in the current source mode and VOH is 4.5V R = ( VOH VD ) / I = ( 4.5 2.0 ) / 20m = 125 Ohm

PIC with LED Example: Calculate the value of R if the LED has a threshold voltage VD = 2.0 V and requires 20mA to light. b) The led is to be connected in the current sink mode and VOL is 0.2V R = (VDD VD VOL) / I =( 5 2 0.2 ) / 20m= 140 Ohm

PIC output current In the PIC, IOL or I OH should not exceed 25mA for each output pin. What to do if you need more than 25mA? for example, if you connect 3 LEDs to the same output. You can connect a transistor at the output, and draw the current from the power supply

Transistor Many types: Bi-polar: NPN, PNP MOSFET: NMOS, PMOS others types

Bipolar transistor Collector Emitter Base Base Emitter Collector NPN PNP

MOS Drain Source Gate Gate NMOS Source Drain PMOS

Transistor as switch Bipolar: ON: Collector and Emitter are short circuit OFF: Collector and Emitter are open circuit Collector Collector Collector Collector Logic 1 ON Logic 0 OFF Emitter Emitter Emitter Emitter Emitter Emitter Emitter Emitter Logic 1 OFF Logic 0 ON Collector Collector Collector Collector

Transistor as switch MOS: ON: Source and Drain are short circuit OFF: Source and Drain are open circuit Drain Drain Drain Drain Logic 1 ON Logic 0 OFF Source Source Source Source Source Source Source Source Logic 1 OFF Logic 0 ON Drain Drain Drain Drain

Connecting an LED VDD PIC LED PIC VDD LED

Connecting an LED The transistor acts as an electrically controlled switch The output of the PIC controls the switch PIC

Connecting a switch to an Input Two modes to connect a switch/push button: switch gives a Logic 1 when pushed switch gives a Logic 0 when pushed In both cases, in all switch states, the input should be connected to Vdd or ground The input pin should never be left floating PIC PIC

Switch debounce All switches/buttons suffer from a bounce problem The switch bounces between states before resting in the final position. Bounce period is usually less than 10ms

Switch debounce Since the microcontroller is fast, it will interpret the oscillations as multiple transitions multiple presses on the switch How to deal with this? Hardware: use a capacitor to filter out the high frequency oscillations Software: use a small delay after detecting the first transition

PORTA Hardware RA0, RA1, RA2, RA3 If pin is output: TRIS = 0 0 NMOS on PMOS off 1 NMOS off PMOS on If pin is input, TRIS = 1 NMOS and PMOS are OFF logic value at pin is transferred to the data bus inside the PIC PIC PORTA TRISA PORTA TRISA GND To data bus

PORTA Hardware RA4 Is an open drain output Can serve as a clock for TMR0 When used as an input, RA4 has a Schmitt trigger buffer PIC PORTA TRISA GND To data bus or TMR0 clock

Open drain output No internal pull up You have to provide an external pull up resistor or transistor Why? you can connect the output to a power supply different than VDD, for example to drive a motor. PIC RA4 V+

Schmitt trigger buffer Used to clean the input signal The buffer has two thresholds high threshold low threshold output is low if input is lower than the low threshold output is high if input is higher than the high threshold

Schmitt trigger Input output characteristics V out High output Low output Low threshold High threshold V in

Example What is the output of a buffer that has a single threshold Voltage threshold time

Example What is the output of a buffer that has a single threshold Voltage threshold time

Example What is the output of a Schmitt trigger buffer Voltage high threshold low threshold time

Example What is the output of a Schmitt trigger buffer Voltage high threshold low threshold time

PORTB Hardware RB0 serves also as an interrupt source through a Schmitt trigger buffer RB4 to RB7, will generate an interrupt if a change occurs at any of the inputs change is detected using an XOR gate XOR gate compares the previous value and the current value, if different the XOR output is logic 1

PORTB Hardware If PORTB is configured as input. All pins of PORTB have an internal pull-up The internal pull-up can be enabled through the OPTION_REG register

PORTB Hardware In this case you can connect a switch to the input without the need for an external resistor Assume RB4 is configured as an input, and the weak pull-up is enabled, a switch can be connected as shown PIC RB4

PORTB Hardware RB0 serves also as an interrupt source through a Schmitt trigger buffer RB4 to RB7, will generate an interrupt if the value changes at any of the inputs change is detected using an XOR gate XOR gate compares the previous value of the pin and the current value, if different the XOR output is logic 1