PIC16F887.  1.Microcontroller introducton  2.MPLAB,Hi-tech compilers  3.LED  4.Switches/push buttons  5.7-Segment Display  6.Keypad  7.LCD  8.Timers.

Slides:



Advertisements
Similar presentations
MICROPROCESSORS AND MICROCONTROLLERS
Advertisements

C Examples 1.
Input/Output (I/O) Ports and Interfacing
Input/Output Ports and Interfacing ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
EEE305 Microcontroller Systems Lecture 5B: Simple I/O Embedded C using PIC microcontrollers Teaching resources on on
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
2.0 EMBEDDED CONTROLLER Engr. Hj. Mohamad Fauzi bin Zakaria Department of Mechatronics and Robotics Engineering Faculty of Electrical and Electronic Engineering.
© AJH 2013, V2.0 Computer Programming Embedded Systems Programming Stand-alone code, system initialisation, operating systems. Low-level operations; port.
Input/Output Ports and Interfacing
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
ROBONICS’ 15 Powered By:. An embedded system is some combination of computer hardware and software, either fixed in capability or programmable, that is.
Embedded System Design Laboratory October 11, 2002Stanford University - EE281 Lecture #4#1 Lecture #4 Outline Announcements Project Proposal AVR Processor.
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
1 Lab 1: Introduction. 2 Configure ATMEL AVR Starter Kit 500 (STK500), a prototyping/development board for Lab1. ATmega16 ( V) is the chip used.
Robotraffic software and programming aids Robotics Laboratory Faculty of Mechanical Engineering Technion Israel Institute of Technology.
1 Lab 5: Controls and feedback. 2 Lab 5: Control and Feedback This embedded system uses the Photo sensor to detect the light intensity of the environment.
Robotics Research Laboratory Louisiana State University.
DTMF BASED MOBILE CONTROLLED ROBOT PROJECT REVIEW TEAM 1-SRISRUTHI.S,SUSMITHA ROS,NITIN BHARATTWAJ, VISHAL KUMAR.P.M.
FREQUENCY COUNTER USING Silicon Labs C8051F020 microcontroller
C Examples 5. Download Links MPLAB IDE dsPIC30F4011/4012 Data Sheet dsPIC30F Family Reference Manual MikroC MikroC Manual MikroC Quick Reference.
EEE305 Microcontroller Systems Lecture : Using Interrupts with Embedded C using PIC microcontrollers Teaching resources on on
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Robotics Research Laboratory Louisiana State University.
Architecture and instruction set. Microcontroller Core Features:  Operating speed: DC - 20 MHz clock input DC ns instruction cycle Up to 8K x.
Saxion University of Applied Sciences Advanced Microcontrollers A practical approach.
C Examples 1. Download Links MPLAB IDE dsPIC30F4011/4012 Data Sheet dsPIC30F Family Reference Manual MikroC MikroC Manual MikroC Quick Reference.
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.
PIC16F887.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Closed Loop Temperature Control Circuit with LCD Display Mike Wooldridge ECE 4330 Embedded Systems.
Components of a typical full-featured microcontroller.
MICROCONTROLLER INTERFACING WITH STEPPER MOTOR MADE BY: Pruthvirajsinh Jadeja ( ) COLLEGE:DIET BRANCH:EC.
Vishwakarma government engineering college Prepare by. Hardik Jolapara( ) LCD Interfacing with ATmega16.
Introduction to Projects using Microcontroller Md. Khalilur Rhaman Credit: Interface Lab.
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
Criteria for choosing a microcontroller A microcontroller must meet the task at hand efficiency and cost effectively. Speed. What is highest speed of.
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),
Microprocessors A practical approach..
 Mini-Computer ◦ Microprocessor  The Brains  Arithmetic Logic Unit (ALU)  Control Unit  Program/ Data Storage  Peripherals (Input/Output)  Low-Cost.
USING TV REMOTE AS A CORDLESS MOUSE FOR THE COMPUTER
CORDLESS MOUSE FEATURES BY TV REMOTE USING PIC MICROCONTROLLER
UP AND DOWN CONTROLLED SPEED OF DC MOTOR IN EMBEDDED SYSTEM
INT. TO EMBEDDED SYSTEMS DEVELOPMENT
Medication Reminder using PIC Microcontroller
LCD Interfacing using Atmega 32
4-Integrating Peripherals in Embedded Systems (cont.)
Input/Output Ports and Interfacing
Networking of Multiple street junction signals for better traffic management Submitted by:
UNIVERSAL COLLEGE OF ENGINEERING & TECHNOLOGY
Project Title EVM IN PIC Under the Guidance of Submitted by.
PWM BASED SPEED CONTROL FOR DC MOTOR
The Arduino Microcontroller: Atmel AVR Atmega 328
Introduction to Microprocessors and Microcontrollers
CENG2400 Revision Q1a A system has an ARM processor with a 32-bit General Purpose Input Output (GPIO) module. Two on/off switches are connected to bit-3.
EE Embedded Systems Fall 2015
Example 6 Hex Keypad Lecture L3.2.
Example 15 Interrupt-Driven Controller
מבוא לשפת C של מיקרו-בקר (PIC16F877)

Lecturer: Reza Arjmandi Autumn 2015
Example 7 Liquid Crystal Display
AVR – ATmega103(ATMEL) Architecture & Summary
8051 Micro Controller.
SPI Protocol and Programming
A PROJECT ON PASSWORD BASED CONTROL SYSTEM. A PROJECT ON PASSWORD BASED CONTROL SYSTEM.
Presentation transcript:

PIC16F887

 1.Microcontroller introducton  2.MPLAB,Hi-tech compilers  3.LED  4.Switches/push buttons  5.7-Segment Display  6.Keypad  7.LCD  8.Timers  9.ADC/DAC  10.UART Protocal(RX,TX)  11.SPI Protocal  12.Real time clock(RTC)  13.Pulse width modulation(PWM)  14.Interrupts  15.EEPROM

 Microcontroller is a compact integrated circuit designed to govern a specific operation in an embedded system.  Microcontrollers often operate at very low speed compare to microprocessors, but this is useful for typical applications. MICROCONTROLLER FEATURES: Software selectable frequency range of 8 MHz to 20 MHz Two-Speed Start-up mode Crystal fail detect for critical applications Clock mode switching during operation for power savings Power-Saving Sleep mode Wide Operating Voltage Range (2.0V-5.5V)

 PORTA-RA0 TO RA7  PORTB-RB0 TO RB7  PORTC-RC0 TO RC7  PORTD-RD0 TO RD7  PORTE-RE0 TO RE2  VDD-2(11,32)  VSS-2(12,31)  RESET PIN-1

 PORTA=0x00;  TRISA=0x00;  ANSEL=0x00;  ANSELH=0x00;  Output pin=RA0

 PORTD=0x00;  TRISD=0x01; //for input  Input pin –RD0  Output pin –RD1

 PORTA=0x00;  TRISA=0x01; //for input  PORTB=0x00;  TRISB=0x00;  ANSEL=0x00;  ANSELH=0x00 ;  0X3f=0  0x06=1  0x5b=2  0x4f=3  0x66=4  0x6d=5

 PORTC=0x00; (FOR KEYPAD)  TRISC=0x70;  PORTB=0x00; (FOR 7-SEG)  TRISB=0x00;  ANSEL=0x00;  ANSELH=0x00;

 void pulse()  {  en=1;  __delay_ms(10); delay function  en=0;  __delay_ms(10);  }  Lcd=0x38 //type of lcd 16x2  Lcd=0x0E // cursor on  Lcd=0x0C // cursor off  Lcd=0x80 //starting address

 TOIF=Timer 0 Interrupt Flag  T1CON=0x31;  OPTION_REG=0x07;

 TMR1IF=Timer 1 Interrupt Flag

 TRANSMITTER  void tx(unsigned int Y)  {  TXREG=Y;  while(TXIF==0);---  Transmitter Interrupt Flag  TXIF=0;  }  void rx()---  Receiver Function  {  int k;  for(k=0;k<10;k++)  {  while(RCIF==0);---  Receiver Interrupt Flag  X=RCREG;  tx(X);  RCIF=0;  A[k]=X;  }  A[k]='\0';  }

 TXSTA=0X26;  RCSTA=0x90;  SPBRG=25;  address(0x38);  address(0x0C);  address(0x80);

 void wait()  {  while(SSPIF==0);  SSPIF=0; } void I2C_Start()  {  SEN=1;  wait();  } void I2C_Stop()  {  PEN=1;  wait();  }  unsigned char I2C_Read(unsigned char i)  {  unsigned char read;  if(i==2)  ACKDT=1;  else  ACKDT=0;  while(BF==0);  read=SSPBUF;  SSPOV=0;  SSPIF=0;  ACKEN=1;  return(read);  }

void pwm_duty(unsigned int duty)  {  CCPR1L=duty>>2;  CCP1CON=(((duty<<4)&0x30)|CCP1CON);  CCP1CON=0xCF&CCP1CON;  }  void pwm_init()  {  TRISC=0x00;  TRISD=0x00;  T2CON=0x05;  PR2=0xff;  CCP1CON=0x0D;  CCP2CON=0x0f;  }