PERIPHERAL INTERFACE CONTROLLERS. There are many different Peripheral Interface Controllers: examples include the PIC16F873 and the PIC16F876 and the

Similar documents
ETEC Digital Controls PIC Lab 10 Pulse Width Modulation

Conversion Between Analog and Digital Signals

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Digital to Analog and Analog to Digital Conversion

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Chapter 6: From Digital-to-Analog and Back Again

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence :

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

Interfacing Analog to Digital Data Converters

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

Selecting and Implementing H-Bridges in DC Motor Control. Daniel Phan A

CAN bus board. EB018

Decimal Number (base 10) Binary Number (base 2)

Part 1. MAX BIT DAC with an Arduino Board. MIDI to Voltage Converter Part1

Chapter 13. PIC Family Microcontroller

UniPi technical documentation REV 1.1

DAC Digital To Analog Converter

Digital To Analog Converter with Sine Wave Output

APPLICATION NOTE. Atmel AVR443: Sensor-based Control of Three Phase Brushless DC Motor. Atmel AVR 8-bit Microcontrollers. Features.

ADS9850 Signal Generator Module

3-Phase Synchronous PWM Controller IC Provides an Integrated Solution for Intel VRM 9.0 Design Guidelines

DM Segment Decoder/Driver/Latch with Constant Current Source Outputs

KTA-223 Arduino Compatible Relay Controller

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Lecture N -1- PHYS Microcontrollers

AN4646 Application note

SD21-21 Channel Servo Driver Module Power Servo's

A Digital Timer Implementation using 7 Segment Displays

Arduino DUE + DAC MCP4922 (SPI)

SPI. Overview and Use of the PICmicro Serial Peripheral Interface. Getting Started: SPI

Pulse Width Modulation

SAMPLE CHAPTERS UNESCO EOLSS DIGITAL INSTRUMENTS. García J. and García D.F. University of Oviedo, Spain

Tutorial for MPLAB Starter Kit for PIC18F

Single Phase Two-Channel Interleaved PFC Operating in CrM

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs

Microcontroller Programming Beginning with Arduino. Charlie Mooney

PLL frequency synthesizer

2011, The McGraw-Hill Companies, Inc. Chapter 3

Introduction to Electronic Signals

Microcontroller to Sensor Interfacing Techniques

Theory and Practice of Tangible User Interfaces. Thursday Week 2: Digital Input and Output. week. Digital Input and Output. RGB LEDs fade with PWM

Base Conversion written by Cathy Saxton

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

STEPPER MOTOR SPEED AND POSITION CONTROL

Pmod peripheral modules are powered by the host via the interface s power and ground pins.

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

AC/DC Power Supply Reference Design. Advanced SMPS Applications using the dspic DSC SMPS Family

Global Motion Technology Inc Web THCSA200. Capacitive sensor plasma & Oxy-fuel Torch Height Control

Using voltage regulator to convert 5-12V range to 3.3V. Huan Lin

RGB Wall Washer Using ILD4035

Digital to Analog Converter. Raghu Tumati

Atmel Norway XMEGA Introduction

Design and Construction of Variable DC Source for Laboratory Using Solar Energy

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

LEVERAGING FPGA AND CPLD DIGITAL LOGIC TO IMPLEMENT ANALOG TO DIGITAL CONVERTERS

The components. E3: Digital electronics. Goals:

Tamura Closed Loop Hall Effect Current Sensors

INTRODUCTION TO DIGITAL SYSTEMS. IMPLEMENTATION: MODULES (ICs) AND NETWORKS IMPLEMENTATION OF ALGORITHMS IN HARDWARE

SSD1298. Advance Information. 240 RGB x 320 TFT LCD Controller Driver integrated Power Circuit, Gate and Source Driver with built-in RAM

Servo Info and Centering

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

8051 MICROCONTROLLER COURSE

A 5 Degree Feedback Control Robotic Arm (Haptic Arm)

Theory of Operation. Figure 1 illustrates a fan motor circuit used in an automobile application. The TPIC kω AREF.

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Microcontroller-based experiments for a control systems course in electrical engineering technology

Table 1 below is a complete list of MPTH commands with descriptions. Table 1 : MPTH Commands. Command Name Code Setting Value Description

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Wireless Precision Temperature Sensor Powers Itself, Forms Own Network, Enabling Easy Deployment in Industrial Environments

AN2680 Application note

Voltage Measurement with A PIC Microcontroller

1/22/16. You Tube Video. Definitions. Duty Cycle: on-time per period (specified in per cent)

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

Low Cost Pure Sine Wave Solar Inverter Circuit

Single Phase Two-Channel Interleaved PFC Operating in CrM Using the MC56F82xxx Family of Digital Signal Controllers

A Practical Guide to Free Energy Devices

Micro-Step Driving for Stepper Motors: A Case Study

PICNet 1. PICNet 1 PIC18 Network & SD/MMC Development Board. Features. Applications. Description

Display Board Pulse Width Modulation (PWM) Power/Speed Controller Module

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

Pulse Width Modulation Applications

EFC Frequency converters

LAB 7 MOSFET CHARACTERISTICS AND APPLICATIONS

Room Temperature based Fan Speed Control System using Pulse Width Modulation Technique

Analog-to-Digital Converters

Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol

Accurate Measurement of the Mains Electricity Frequency

Timer A (0 and 1) and PWM EE3376

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

Experiment 8 : Pulse Width Modulation

Upon completion of unit 1.1, students will be able to

2.0 Command and Data Handling Subsystem

Building an Auto-Ranging DMM with the ICL7103A/ICL8052A A/D Converter Pair

MX PIC24F Educational Module User Manual

Microcontroller Code Example Explanation and Words of Wisdom For Senior Design

Using the HT46R46 I/O Ports to Implement Half-Duplex SPI Communication

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

Transcription:

PERIPHERAL INTERFACE CONTROLLERS There are many different Peripheral Interface Controllers: examples include the PIC16F873 and the PIC16F876 and the PIC16F877. The PIC16F873 and PIC16F876 have the same number of Pins and Ports. The only difference is the 876 has more memory than the 873. The PIC16F877 has more Pins and Ports than the other two PICs. In addition, it has more memory. Schematics of these PICS are given on the next two pages. Port A on each of the PICs can be used for Analog Input. It can also be used for Digital Input or Output. Certain Pins on the other Ports have special uses. All other Pins can be used for Digital Input or Digital Output. Consider the schematic of the PIC16F877. The pins labelled CLKIN and CLKOUT are clock or oscillator pins. The pins labeled CCP1 and CCP2 are PWM pins. The pins labeled SCL and SDA are I2C communication pins. The pins labeled SCK and SDI and SDO are SPI communication pins. The I2C pins allow the PIC to communicate with digital devices such as DACs. The SPI pins can be used to form MASTER/SLAVE PIC networks.

H BRIDGE DRIVERS PICs cannot run drives directly because they can generate only a small amount of current. To run devices, they must be connected to drivers. The most common type of driver is known as an H Bridge. It is basically a set of 4 switches arranged in a pattern that looks like the letter H. Schematics of 2 common H Bridges are given on the next two pages. The SN754410 bridge can supply 1 amp while the L298N bridge can supply 4 amps. Bridges can be constructed from MOS FETS for higher amps. Most bridges have what are called ENABLE Pins. These can be used to control the amount of power that a device receives. By sending a PWM signal to these pins, the bridge can be turned ON or OFF. When the bridge is ON, a current loop is completed: when it is OFF, the loop is broken. The power level depends on the PWM duty cycle. Most bridges also have input pins known as DIRECTION Pins. These can be used to make a device such as a DC motor go clockwise or counterclockwise. Another type of driver is known as a RELAY. It can be used to complete or break a current loop, which turns a device ON or OFF.

VOLTAGE GROUND H BRIDGE SCHEMATIC

DIGITAL TO ANALOG CONVERTORS The purpose of a Digital to Analog Convertor or DAC is to take a digital signal generated within a computer control loop and convert it into an analog form so that it can operate some device. There are several different types of DACs. The sketch on the next page shows a BINARY RESISTOR LADDER DAC. The digital signal as a series of ones and zeros controls the switches in the ladder. These in turn control the current which flows through the OP AMP bypass resistor. Circuit analysis shows that the voltage across this resistor is proportional to the digital signal. Another type of DAC known as an R-2R LADDER DAC is shown on the page after next. It is made up of a number of R and 2R resistor circuits in parallel. Again the digital signal as a series of ones and zeros controls the switches in the 2R leg of the DAC. These in turn control the current which flows through the OP AMP bypass resistor. Circuit analysis shows that this is proportional to the digital signal.

Another type of DAC makes use of something called Pulse Width Modulation or PWM. The duty cycle of the PWM signal is a measure of the digital signal. An illustration of a PWM signal is given on the next page. ANALOG TO DIGITAL CONVERTORS The purpose of an Analog to Digital Convertor or ADC is to convert an analog signal from a sensor into a digital form within a computer control loop so it can be used for control. There are several different types of ADCs. The sketch on the page after next shows a RAMP ADC. The analog signal to be sampled is compared with a signal which ramps upward in time. When the ramp signal becomes greater than the analog signal, a counter is stopped. The number of counts is a measure of the analog voltage level. Another ADC uses a DAC to create a comparison voltage.

DATA REPRESENTATION The decimal system uses the number 10 as a base and numbers from 0 to 9 to represent data. One can write for integers: + 10 +3 + 10 +2 + 10 +1 + 10 +0 In this system one can write the number 99 as 9 10 +1 + 9 10 +0 = 90 + 9 = 99 The binary system uses the number 2 as a base and numbers 0 and 1 to represent data. One can write for integers: 2 +7 + 2 +6 + 2 +5 + 2 +4 + 2 +3 + 2 +2 + 2 +1 + 2 +0 In this system one can write the number 99 as 0 2 +7 + 1 2 +6 + 1 2 +5 + 0 2 +4 + 0 2 +3 + 0 2 +2 + 1 2 +1 + 1 2 +0 = 0 + 64 + 32 + 0 + 0 + 0 + 2 + 1 = 99 = 01100011 The maximum number one can get is 111111111 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

There are 8 bits to this number: so it is generally referred to as 8 bit. If we add 2 +9 and 2 +8 we get 10 bit. The maximum number in this case is 1023. Computers use the binary system to perform calculations. Because of its low base the binary system is not the most compact way to represent data. A more compact way is the hexadecimal system. This system uses the numbers 0 to 9 and the letters A to F. The letters A to F represent the numbers 10 to 15. The base of the hexadecimal system is 16. The binary number for 16 is 1111. One can break binary numbers up into bytes each 4 bits long. For example consider the binary number: 0100 1010 1100 The hexadecimal equivalent is 4AC. The decimal number is 684. For a number with a decimal point one considers the numbers either side of the decimal point separately. For example the hexadecimal equivalent of the binary number [ 0100 1010. 1100 ] is [ 4 A. C ]. The decimal number is [ 74.12 ].