MICROCONTROLLER AND INTERFACING Presented by: Shefali Jethva (140803111008) Shivali Panchal (140803111009) Komal Soni (140803111010) Roll no. :- 14EC308.

Slides:



Advertisements
Similar presentations
IO Interfaces and Bus Standards. Interface circuits Consists of the cktry required to connect an i/o device to a computer. On one side we have data bus.
Advertisements

I2C bus Inter Integrated Circuits bus by Philips Semiconductors
INPUT-OUTPUT ORGANIZATION
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Guest Lecturer Pat Pannuto Lecture 10: Serial buses Oct 6, 2011.
Serial Interfaces, Part Deux -I 2 C and SPI December 4, 2002 Presented by Eugene Ho.
SPI Serial Peripheral Interface. SPI Serial Peripheral Interface is communication between two devices, one bit at a time sequential one bit at time over.
Lecture 8: Serial Interfaces
Serial Communication Buses: I 2 C and SPI By Brody Dunn.
STUDY OF THE ARIZONA MICROCHIP MICRO CONTROLLERS MOSTEFA GHASSOUL DAMMAM TECHNICAL COLLEGE
Guitar Effects Processor Critical Design Review October, 07, 2003 Groups Members: Adam Bernstein Hosam Ghaith Jasenko Alagic Matthew Iyer Yousef Alyousef.
SPISPI Term Dr Abdelhafid Bouhraoua Term Dr Abdelhafid Bouhraoua.
COMP3221: Microprocessors and Embedded Systems Lecture 20: Analog Output Lecturer: Hui Wu Session 2, 2004.
1 ECE 263 Embedded System Design Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System.
I2CI2C CS-423 Dick Steflik. Inter-Integrated Circuit Developed and patented by Philips for connecting low speed peripherals to a motherboard, embedded.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
INPUT-OUTPUT ORGANIZATION
Interfaces A practical approach. Lesson 2 I2C and SPI
SPI By Alexander Maroudis. Outline What is SPI? SPI Configuration SPI Operation Master Slave Setup SPI Transactions SPI Digital Potentiometer Example.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 10: Serial buses Oct 6, 2011.
Microprocessor Block Diagram
Serial Peripheral Interface (SPI) Bus. SPI Bus There is no official specification for the SPI bus. It is necessary to consult the data sheets of the devices.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
4.0 rtos implementation part II
Introduction to Computing: Lecture 4
7/23 Inter-chip Serial Communication: SPI and I 2 C Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee.
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
EGRE 6311 Midsize Microcontrollers and Microprocessors The 8051 is an example of a small inexpensive microcontroller intended for simple applications.
Autonomous Helicopter James LydenEE 496Harris Okazaki.
11/16/2006 WSN Mote- MCU & Sensor Hardware 1 ECET 581 Wireless Sensor Networks Mote – MCU & Sensor Hardware 2 of 3 Fall 2006
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
©2008 R. Gupta, UCSD COSMOS Summer 2008 Peripheral Interfaces Rajesh K. Gupta Computer Science and Engineering University of California, San Diego.
DsPIC30F4011 Fall DIP Switches  The upper four switches of SW1 are used to enable LEDs connected to PORTB/C, PORTA/D, PORTE and PORTF. For example,
OCRP RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
Essentials of Communication This simple model requires many guarantees. Sender Receiver Communication Link Data.
Revised: Aug 1, ECE263 Embedded System Design Lessons 27, 28 Serial Peripheral Interface.
Department of Electronic & Electrical Engineering Serial interfaces Serial Interfaces allow communication between devices sending one bit at a time. In.
Serial Peripheral Interface SPI I2C (i-squared cee)
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
Embedded Communication Protocols Don Heer 10/18/10 1.
PlayStation 2 DualShock 2 Controller Ryan O’Keefe, Kabir Singh and Adrian Padin 1.
Networked Embedded Systems Sachin Katti & Pengyu Zhang EE107 Spring 2016 Lecture 9 Serial Buses – SPI, I2C.
BIRLA VISHVAKARMA MAHAVIDYALAY SUBJECT: SPI PROTOCOL & MAX7221 DISPLAY INTERFACING SUBMITTED BY: KISHAN AVASTHI( ) MANSI CHANDEGARA( )
Module 8 Tutorial  An 8086 system is used for controlling the speed of a motor. The motor can operate at 5 different speeds (1- 5).  The speed.
میکرو کنترلرهای AVR Serial Interfaces, I2C and SPI
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 Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Pros and Cons Uses Serial Peripheral Interface
©F.M. Rietti Communication Lines Fundamentals. ©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 2 Communication Lines Generally used to connect.
Outline Analog to digital conversion (ADC) of NuMaker TRIO
Serial Communication Buses: I2C and SPI
Serial Communication Protocols And Embedded IoT
COMP2121: Microprocessors and Interfacing
SERIAL PERIPHERAL INTERFACE
COMP2121: Microprocessors and Interfacing
I2C PROTOCOL SPECIFICATION
Communication Lines Fundamentals.
BJ Furman ME 106 Fundamentals of Mechatronics 15NOV2012
EEPROM Comparison – Parallel or Serial
Pulse Width Modulation (PWM)
Introduction to Microprocessors and Microcontrollers
Programmable Interval timer 8253 / 8254
Programmable Interval timer 8253 / 8254
Manual Robotics ..
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
Presentation transcript:

MICROCONTROLLER AND INTERFACING Presented by: Shefali Jethva ( ) Shivali Panchal ( ) Komal Soni ( ) Roll no. :- 14EC308 14EC309 14EC310 Discipline: EC 5 th Sem. Guided by: Prof. Isha Gautam prof. Satish Bhati

CONTENTS I2C PROTOCOL SPI PROTOCOL AND DISPLAY INTERFACING PWM PROGRAMMING AND DC MOTOR CONTROL

What is I2C?  Shorthand for an “ Inter-Integrated Circuit” bus.  Developed by Philips Semiconductor for TV sets in the 1980’s.  I2c devices includes EPROMs, thermal Sensors & real time clock.  Used as a control interface to signal processing devices that have separate data interface.  Eg. Rf tuner, video decoder & encoder & audio processor.  Limited to about 10 feet for moderate speed.

I2C PROTOCOL:  Master sends start condition(s) & controls the clock signal.  Controls the clock signal.  Master sends a unique 7-bits slave devices address.  Master sends read/write bit (R/W)-0-slave receive,1-slave transmit.  Slave with matching 7-bit device address always sends acknowledge bit(ACK).  Transmitter (slave or master) transmit 1 byte of the data.

I2C FEATURE:  “ Clock Stretching”-When the receive needs more time to process a bit, it can pull SCl low to keep it from going high a bit longer. This technique is called Clock stretching. On SDL low, the transmitter can send its next data value, but this slave is ready to release SCL to go high.  “General Call” broadcast- address every device on the bus.  10-bit extended addressing for new designs 7-bit address a exhausted.

SPI Configuration: Primarily used for serial communication between a host processor and peripherals. Can also connect 2 processors via SPI SPI works in a master slave configuration with the master being the host microcontroller for example and the slave being the peripheral

SPI Operation: For SPI, there are Serial Clocks (SCLK), Chip Select lines (CS), Serial Data In (SDI) and Serial Data Out( SDO) There is only one master, there number of slaves depends on the number of chip select lines of the master. Synchronous operation, latch on rising or falling edge of clock, SDI on rising edge, SDO on falling edge Operates in 1 to 2 MHz range. Master sends out clocks and chip selects.

Advantages of SPI: It’s faster than asynchronous serial The receive hardware can be a simple shift register It supports multiple slaves Disadvantages of SPI: It requires more signal lines than other communications methods The communications must be well-defined in advance The master must control all communications It usually requires separate SS lines to each slave, which can be problematic if numerous slaves are needed.

PWM PROGRAMMING AND DC MOTOR CONTROL  WHAT IS PWM ? PWM is a way of digitally encoding analog signal levels. Through the use of high-resolution counters, the duty cycle of a square wave is modulated to encode a specific analog signal level. The PWM signal is digital because, at any given instant of time, the full DC supply is either fully on or fully off. The voltage or current source is supplied to the analog load by means of a repeating series of on and off pulses.

INTERFACING OF AVR AND DC MOTOR

PROGRAM: 1 A switch is connected to PA 7. perform following: (a) PA7=0, motor moves clock wise (b) PA7=1, motor moves anti-clock wise.INCLUDE "M32DEF.INC" SBI DDRC,0 // MAKE PC0 AS AN OUTPUT (SW-1) SBI DDRC,1 // MAKE PC1 AS AN OUTPUT (SW-2) SBI DDRC,2 // MAKE PC2 AS AN OUTPUT (SW-3) SBI DDRC,3 // MAKE PC3 AS AN OUTPUT (SW-4) CBI DDRA,7 // MAKE PA7 AS AN INPUT CLOCKWISE: SBIS PINA,7 // SKIP NEXT IF PA7 IS SET RJMP CLOCKWISE // IF PA7=0 GO TO CLOCKWISE CBI DDRC,1 // SW 2=0 CBI DDRC,2 // SW 3=0 SBI DDRC,0 // SW 1=1 SBI DDRC,3 // SW 4=1 JMP MONITOR

ANTI-CLOCKWISE: CBI DDRC,0 // SW 1=0 CBI DDRC,3 // SW 4=0 SBI DDRC,1 // SW 2=1 SBI DDRC,2 // SW 3=1 JMP MONITOR OUTPUT: