This document is a project report submitted by students of Central Polytechnic College for their diploma in electronics and communication engineering. It details the development of a computer vision system to assist visually impaired people. The system uses a camera to detect and identify objects and people, and an audio playback IC to audibly describe the detections to the user. It has a PIC microcontroller at its core, and includes other components like an LCD, power supply, and serial communication chips. The report includes sections on the system design with block diagrams, detailed descriptions of each hardware component, and the software used to program the microcontroller. The aim of the project is to help blind or visually impaired people navigate and identify objects independently without assistance.
Project report on embedded system using 8051 microcontrollerVandna Sambyal
The document describes a home security prototype project that was developed using an 8051 microcontroller to control various devices like LEDs, DC motors, relays and sensors. It provides details on the circuit diagram and working of the home security system, which uses components like a microcontroller, motion sensor, door sensor and siren to detect intrusion and alert users. The document also includes information on microcontrollers, their architecture, programming and how to interface them with external devices.
This document summarizes a student project to create disco lights using an 8051 microcontroller. It includes an introduction describing the project, a list of components used including an 8051 microcontroller, LEDs, capacitors, crystal oscillator, button switch, and power supply. It provides the circuit architecture and programming code to display a light pattern on the LEDs when the button is pressed using delays. The students observed how to glow the disco lights using a microcontroller interfaced with LEDs. In conclusion, the project was successfully designed, developed, and tested using advanced microcontroller technology.
The document discusses the 8051 microcontroller family. It provides an overview of microcontrollers compared to general purpose microprocessors, noting that microcontrollers have CPU, RAM, ROM, I/O ports, timers and other peripherals integrated into a single chip. It then outlines the 8051 microcontroller and its variants, describing features like memory sizes, I/O pins, and timers. Selection criteria for choosing a microcontroller like speed, packaging, and cost are also summarized.
This document provides an overview of embedded systems and interfacing with the ATmega8 microcontroller. It discusses the characteristics of embedded systems and gives examples such as appliances, medical devices, vehicles, and more. It also covers the 8051 and AVR microcontrollers, focusing on the ATmega8's architecture, programming, and interfacing with various components like LEDs, LCDs, seven segment displays, motors, and sensors. The goal is to provide knowledge about embedded systems and practical experience interfacing the ATmega8 microcontroller.
This presentation provides an overview of microcontrollers. It defines a microcontroller as an integrated chip that includes a microprocessor, memory, and input/output ports. It discusses the evolution of microcontrollers from early models using EPROM memory to modern ones using flash memory. The presentation contrasts RISC and CISC architectures and describes the programming, interfacing, and interrupt features of microcontrollers. Popular microcontrollers including AVR, PIC, and Intel/Motorola models are highlighted. The presentation concludes by discussing potential future aspects like using MRAM and migrating to 32-bit microcontrollers.
This document provides an introduction to microcontrollers and embedded systems. It defines embedded systems as specialized electronic devices that perform dedicated functions. Microcontrollers are described as computer systems on a single chip that contain a processor, memory, and input/output peripherals. Popular microcontroller examples include the 8051, PIC, and 68HC05. The document outlines the differences between microprocessors and microcontrollers, noting that microcontrollers have integrated memory and peripherals, require less external hardware, and have specialized instruction sets.
Project report on embedded system using 8051 microcontrollerVandna Sambyal
The document describes a home security prototype project that was developed using an 8051 microcontroller to control various devices like LEDs, DC motors, relays and sensors. It provides details on the circuit diagram and working of the home security system, which uses components like a microcontroller, motion sensor, door sensor and siren to detect intrusion and alert users. The document also includes information on microcontrollers, their architecture, programming and how to interface them with external devices.
This document summarizes a student project to create disco lights using an 8051 microcontroller. It includes an introduction describing the project, a list of components used including an 8051 microcontroller, LEDs, capacitors, crystal oscillator, button switch, and power supply. It provides the circuit architecture and programming code to display a light pattern on the LEDs when the button is pressed using delays. The students observed how to glow the disco lights using a microcontroller interfaced with LEDs. In conclusion, the project was successfully designed, developed, and tested using advanced microcontroller technology.
The document discusses the 8051 microcontroller family. It provides an overview of microcontrollers compared to general purpose microprocessors, noting that microcontrollers have CPU, RAM, ROM, I/O ports, timers and other peripherals integrated into a single chip. It then outlines the 8051 microcontroller and its variants, describing features like memory sizes, I/O pins, and timers. Selection criteria for choosing a microcontroller like speed, packaging, and cost are also summarized.
This document provides an overview of embedded systems and interfacing with the ATmega8 microcontroller. It discusses the characteristics of embedded systems and gives examples such as appliances, medical devices, vehicles, and more. It also covers the 8051 and AVR microcontrollers, focusing on the ATmega8's architecture, programming, and interfacing with various components like LEDs, LCDs, seven segment displays, motors, and sensors. The goal is to provide knowledge about embedded systems and practical experience interfacing the ATmega8 microcontroller.
This presentation provides an overview of microcontrollers. It defines a microcontroller as an integrated chip that includes a microprocessor, memory, and input/output ports. It discusses the evolution of microcontrollers from early models using EPROM memory to modern ones using flash memory. The presentation contrasts RISC and CISC architectures and describes the programming, interfacing, and interrupt features of microcontrollers. Popular microcontrollers including AVR, PIC, and Intel/Motorola models are highlighted. The presentation concludes by discussing potential future aspects like using MRAM and migrating to 32-bit microcontrollers.
This document provides an introduction to microcontrollers and embedded systems. It defines embedded systems as specialized electronic devices that perform dedicated functions. Microcontrollers are described as computer systems on a single chip that contain a processor, memory, and input/output peripherals. Popular microcontroller examples include the 8051, PIC, and 68HC05. The document outlines the differences between microprocessors and microcontrollers, noting that microcontrollers have integrated memory and peripherals, require less external hardware, and have specialized instruction sets.
This document contains a two mark question bank for the subject EE 6602 - Embedded Systems. It includes 15 questions related to introduction to embedded systems, embedded networking, and embedded firmware development environment. The questions cover topics such as defining embedded systems, challenges in designing embedded systems, ROM image, RAM role, watchdog timer, target system, real time clock, system clock, embedded system components, classifications, examples, DMA, device drivers, communication protocols and standards, and embedded product development life cycle phases.
This document provides an introduction to embedded systems and microcontrollers. It defines an embedded system as a computer system designed to perform a specific task and is contained within a larger system. Microcontrollers are described as the "brain" or central processing unit of an embedded system. Key points include:
- Microcontrollers integrate a processor, memory and input/output ports on a single chip, making embedded systems more compact and energy efficient than those using general purpose microprocessors.
- Embedded systems have a diverse range of applications from consumer electronics to industrial equipment to automobiles. Nearly every electronic device today contains one or more embedded systems.
- Microcontrollers are cheaper and better suited than microprocessors for many embedded applications as they require
Project Report On Micro-controller Embedded SystemRkrishna Mishra
The document provides an overview of embedded systems and the 8051 microcontroller architecture. It discusses how embedded systems perform predefined tasks to control devices and can be optimized for size and cost. The 8051 is then introduced as a popular 8-bit microcontroller used in embedded systems. Its features include 4KB program memory, 128B data memory, 32 general purpose registers, timers, and I/O ports. Application areas of the 8051 like energy management, automobiles, and medical devices are outlined. Finally, the document describes the 8051 architecture in detail, including the pinout, programming model, and accumulator register.
This presentation provides an overview of microcontrollers. It defines microcontrollers as functional computer systems on a single chip that contain a processor core, memory, and programmable input/output peripherals. The presentation discusses the key components of microcontrollers, how they differ from microprocessors in having integrated RAM, ROM, I/O and timers on a single chip, how they are programmed similarly to C, their advantages over microprocessors in cost, size and reliability, criteria for choosing a microcontroller for an application, examples of applications, popular microcontroller brands, and major market players.
A microcontroller is an integrated circuit that can be programmed to control electronic devices. It contains a processor, memory, and input/output ports on a single chip. Microcontrollers come in various sizes based on their word length and internal bus width, from 4-bit to 32-bit. They also differ based on their memory architecture and instruction set. A microcontroller allows easy programming to control devices in embedded systems and provides advantages like low cost, small size, and flexibility.
An embedded system is a special purpose computer system that performs predefined tasks. It consists of hardware and software components. The document discusses the various hardware components of an embedded system like CPU, memory, sensors, ADC, DAC, actuators etc. It also explains microprocessor and microcontroller based embedded systems with examples like 8085, 8051 etc. Their architecture, pin diagrams and functionalities are described.
This document defines embedded systems and describes their typical hardware components. It provides examples of embedded systems including PDAs, cell phones, automobiles, medical imaging devices, and more. The main hardware units of an embedded system are then outlined, including the power source, clock oscillator, timers and real-time clocks, reset circuit, memory, input/output ports and interfaces, analog-to-digital converters, input and output devices, and networking components. Interrupt handlers are also noted as an important hardware unit.
An embedded system is a computer system designed to do one or a few dedicated and/or specific functions often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs. Embedded systems control many devices in common use today.
Physically, embedded systems range from portable devices such as digital watches and MP3 players, to large stationary installations like traffic lights, factory controllers, or the systems controlling nuclear power plants. Complexity varies from low, with a single microcontroller chip, to very high with multiple units, peripherals and networks mounted inside a large chassis or enclosure.
This document provides an introduction and overview of microcontrollers. It begins by defining a microcontroller as a single-chip computer containing a CPU, RAM, ROM, I/O ports, and other peripherals. It then discusses the 8051 microcontroller in more detail, outlining its addressing modes, block diagram, operation, features, applications, and advantages over microprocessors. Finally, it provides a pin description and diagram of the 8051 microcontroller.
www.jwjobs.net
1. An embedded system is a dedicated computer system that performs specific tasks and is embedded as part of a complete device including hardware and software.
2. Main components of an embedded system include a microprocessor or microcontroller, memory, and input/output components. Common microprocessors include general purpose microprocessors, microcontrollers, digital signal processors, and application-specific integrated circuits.
3. Embedded software is programmed on read-only memory (ROM) or flash memory and provides the core functionality of the embedded system. Real-time operating systems also help manage tasks and system resources.
This document provides an introduction to embedded systems. It defines embedded systems as electronic systems that perform dedicated tasks and include microcontrollers. Characteristics of embedded systems include high speed, low power consumption, small size, accuracy, adaptability, and reliability. Embedded systems are classified based on their functionality and performance requirements. The document also discusses the hardware architecture of embedded systems including the CPU, memory, I/O ports, communication interfaces, and application-specific circuitry. Recent trends in embedded systems include faster processors, lower power consumption, improved communication interfaces, new operating systems, and programming languages.
The document describes the PIC16F818/819 microcontrollers. It provides an overview of their features such as different oscillator configurations, I/O ports, timers, analog-to-digital converter, and synchronous serial port. The devices differ in memory sizes, with the PIC16F819 having more program flash and data memory. The document contains detailed specifications and electrical characteristics of the microcontrollers.
The document provides information about embedded systems and the MC68HC11 microcontroller. It discusses the characteristics of embedded systems including speed, power, size, accuracy, and adaptability. It then describes the MC68HC11 microcontroller including its architecture, registers, addressing modes, and operating modes. Examples are provided to illustrate direct, extended, and indexed addressing modes. The document is an educational material about embedded systems and the MC68HC11 microcontroller.
Training Report on embedded Systems and RoboticsNIT Raipur
Deepak Kumar completed a training report on embedded systems and robotics at I3indya Technologies in Delhi for his vocational project in the 2012-2013 academic year. He studied topics including an overview of embedded systems, microcontrollers like the Atmega16, analog to digital conversion, timers, interfacing various components like 7-segment displays, LCDs, DC motors, sensors, and more. The 3-page report was submitted to his college, the National Institute of Technology Raipur, to fulfill requirements for his Bachelor of Technology degree.
The document discusses the architecture of PIC18 microcontrollers. It begins by introducing the PIC microcontroller family and noting their popularity. It then explains key aspects of the PIC18 architecture, including that it uses a Harvard architecture with separate memory spaces for instructions and data. The document outlines the main components of the PIC18 architecture, including the CPU, program ROM, data memory, I/O ports, and special function registers. It provides details on the registers used in the PIC18, including the working register WREG, general purpose registers, and special function registers.
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSVISHNU KP
PIC microcontroller programming based on micro c IDE.Those who really want to build a base in microcontroller programming,just keep going through this. ;) :)
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxMeghdeepSingh
This document provides an overview of embedded systems and microcontrollers. It defines a microcontroller as a single-chip computer containing memory, input/output circuitry, and other components to function without additional support. The document describes the features and components of a typical microcontroller, including registers, instruction sets, addressing modes, and peripherals. It compares microcontrollers to microprocessors and provides examples of using LEDs and 7-segment displays with microcontrollers.
This document contains a two mark question bank for the subject EE 6602 - Embedded Systems. It includes 15 questions related to introduction to embedded systems, embedded networking, and embedded firmware development environment. The questions cover topics such as defining embedded systems, challenges in designing embedded systems, ROM image, RAM role, watchdog timer, target system, real time clock, system clock, embedded system components, classifications, examples, DMA, device drivers, communication protocols and standards, and embedded product development life cycle phases.
This document provides an introduction to embedded systems and microcontrollers. It defines an embedded system as a computer system designed to perform a specific task and is contained within a larger system. Microcontrollers are described as the "brain" or central processing unit of an embedded system. Key points include:
- Microcontrollers integrate a processor, memory and input/output ports on a single chip, making embedded systems more compact and energy efficient than those using general purpose microprocessors.
- Embedded systems have a diverse range of applications from consumer electronics to industrial equipment to automobiles. Nearly every electronic device today contains one or more embedded systems.
- Microcontrollers are cheaper and better suited than microprocessors for many embedded applications as they require
Project Report On Micro-controller Embedded SystemRkrishna Mishra
The document provides an overview of embedded systems and the 8051 microcontroller architecture. It discusses how embedded systems perform predefined tasks to control devices and can be optimized for size and cost. The 8051 is then introduced as a popular 8-bit microcontroller used in embedded systems. Its features include 4KB program memory, 128B data memory, 32 general purpose registers, timers, and I/O ports. Application areas of the 8051 like energy management, automobiles, and medical devices are outlined. Finally, the document describes the 8051 architecture in detail, including the pinout, programming model, and accumulator register.
This presentation provides an overview of microcontrollers. It defines microcontrollers as functional computer systems on a single chip that contain a processor core, memory, and programmable input/output peripherals. The presentation discusses the key components of microcontrollers, how they differ from microprocessors in having integrated RAM, ROM, I/O and timers on a single chip, how they are programmed similarly to C, their advantages over microprocessors in cost, size and reliability, criteria for choosing a microcontroller for an application, examples of applications, popular microcontroller brands, and major market players.
A microcontroller is an integrated circuit that can be programmed to control electronic devices. It contains a processor, memory, and input/output ports on a single chip. Microcontrollers come in various sizes based on their word length and internal bus width, from 4-bit to 32-bit. They also differ based on their memory architecture and instruction set. A microcontroller allows easy programming to control devices in embedded systems and provides advantages like low cost, small size, and flexibility.
An embedded system is a special purpose computer system that performs predefined tasks. It consists of hardware and software components. The document discusses the various hardware components of an embedded system like CPU, memory, sensors, ADC, DAC, actuators etc. It also explains microprocessor and microcontroller based embedded systems with examples like 8085, 8051 etc. Their architecture, pin diagrams and functionalities are described.
This document defines embedded systems and describes their typical hardware components. It provides examples of embedded systems including PDAs, cell phones, automobiles, medical imaging devices, and more. The main hardware units of an embedded system are then outlined, including the power source, clock oscillator, timers and real-time clocks, reset circuit, memory, input/output ports and interfaces, analog-to-digital converters, input and output devices, and networking components. Interrupt handlers are also noted as an important hardware unit.
An embedded system is a computer system designed to do one or a few dedicated and/or specific functions often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs. Embedded systems control many devices in common use today.
Physically, embedded systems range from portable devices such as digital watches and MP3 players, to large stationary installations like traffic lights, factory controllers, or the systems controlling nuclear power plants. Complexity varies from low, with a single microcontroller chip, to very high with multiple units, peripherals and networks mounted inside a large chassis or enclosure.
This document provides an introduction and overview of microcontrollers. It begins by defining a microcontroller as a single-chip computer containing a CPU, RAM, ROM, I/O ports, and other peripherals. It then discusses the 8051 microcontroller in more detail, outlining its addressing modes, block diagram, operation, features, applications, and advantages over microprocessors. Finally, it provides a pin description and diagram of the 8051 microcontroller.
www.jwjobs.net
1. An embedded system is a dedicated computer system that performs specific tasks and is embedded as part of a complete device including hardware and software.
2. Main components of an embedded system include a microprocessor or microcontroller, memory, and input/output components. Common microprocessors include general purpose microprocessors, microcontrollers, digital signal processors, and application-specific integrated circuits.
3. Embedded software is programmed on read-only memory (ROM) or flash memory and provides the core functionality of the embedded system. Real-time operating systems also help manage tasks and system resources.
This document provides an introduction to embedded systems. It defines embedded systems as electronic systems that perform dedicated tasks and include microcontrollers. Characteristics of embedded systems include high speed, low power consumption, small size, accuracy, adaptability, and reliability. Embedded systems are classified based on their functionality and performance requirements. The document also discusses the hardware architecture of embedded systems including the CPU, memory, I/O ports, communication interfaces, and application-specific circuitry. Recent trends in embedded systems include faster processors, lower power consumption, improved communication interfaces, new operating systems, and programming languages.
The document describes the PIC16F818/819 microcontrollers. It provides an overview of their features such as different oscillator configurations, I/O ports, timers, analog-to-digital converter, and synchronous serial port. The devices differ in memory sizes, with the PIC16F819 having more program flash and data memory. The document contains detailed specifications and electrical characteristics of the microcontrollers.
The document provides information about embedded systems and the MC68HC11 microcontroller. It discusses the characteristics of embedded systems including speed, power, size, accuracy, and adaptability. It then describes the MC68HC11 microcontroller including its architecture, registers, addressing modes, and operating modes. Examples are provided to illustrate direct, extended, and indexed addressing modes. The document is an educational material about embedded systems and the MC68HC11 microcontroller.
Training Report on embedded Systems and RoboticsNIT Raipur
Deepak Kumar completed a training report on embedded systems and robotics at I3indya Technologies in Delhi for his vocational project in the 2012-2013 academic year. He studied topics including an overview of embedded systems, microcontrollers like the Atmega16, analog to digital conversion, timers, interfacing various components like 7-segment displays, LCDs, DC motors, sensors, and more. The 3-page report was submitted to his college, the National Institute of Technology Raipur, to fulfill requirements for his Bachelor of Technology degree.
The document discusses the architecture of PIC18 microcontrollers. It begins by introducing the PIC microcontroller family and noting their popularity. It then explains key aspects of the PIC18 architecture, including that it uses a Harvard architecture with separate memory spaces for instructions and data. The document outlines the main components of the PIC18 architecture, including the CPU, program ROM, data memory, I/O ports, and special function registers. It provides details on the registers used in the PIC18, including the working register WREG, general purpose registers, and special function registers.
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSVISHNU KP
PIC microcontroller programming based on micro c IDE.Those who really want to build a base in microcontroller programming,just keep going through this. ;) :)
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxMeghdeepSingh
This document provides an overview of embedded systems and microcontrollers. It defines a microcontroller as a single-chip computer containing memory, input/output circuitry, and other components to function without additional support. The document describes the features and components of a typical microcontroller, including registers, instruction sets, addressing modes, and peripherals. It compares microcontrollers to microprocessors and provides examples of using LEDs and 7-segment displays with microcontrollers.
This document summarizes a report submitted by Amiyodyuti ganguly for their 5th semester diploma in electronics and communication from Dayananda Sagar Institute of Technology in Bangalore. The report discusses the history and development of microprocessors from early specialized designs like the CADC from 1968 used in aircraft, to early general purpose microprocessors like the Intel 4004 introduced in 1971. It covers the evolution of microprocessor designs from 4-bit to 8-bit to 16-bit and beyond, as well as the integration of additional components like floating point units and cache memory.
The document provides an introduction to microcontrollers, specifically the PIC16F877A microcontroller. It defines what a microcontroller is, compares microcontroller and microcomputer systems, and lists examples of embedded systems. It then describes the features and internal structure of the PIC16F877A microcontroller, including its program memory, data memory, I/O ports, and instruction set. The summary concludes by stating the PIC16F877A is a popular microcontroller due to its low cost, wide availability, and extensive support resources.
Microcontroller based digital code lock report 2Lachamo Best
The document is a project report on a microcontroller based digital code lock. It describes the design and implementation of an access control system using an AT89C2051 microcontroller. The system uses a keypad to enter a password, which is checked by the microcontroller against a stored password. If the passwords match, a relay is activated to open the door. If an incorrect password is entered more than three times, an alarm is activated. The microcontroller can also automatically open the door when the user returns based on laser sensor detection.
Presentation for EEE engineers on Microcontroller by Dilip Kumar RoyDilip Kumar Ckt
This presentation provides an overview of microcontrollers for electrical and electronics engineers. It defines microcontrollers and why they are important for modern automation. It then discusses the PIC16F877A microcontroller in particular, outlining its features, peripherals, programming procedures, pin layout, and applications. Advantages of microcontrollers include their low cost, small size, and ability to virtually test programs. Disadvantages include more complex architecture and increased development time compared to microprocessors. In conclusion, microcontrollers have become essential for modern life and it is important for engineers to learn about them.
This document outlines the course content for EEE226 Microprocessor course taught by Dr. Zaini Abdul Halim. The course aims to help students understand microprocessor architecture, assembly language programming, and interfacing microprocessors to external devices. It will be evaluated based on hands-on tests, theoretical tests, lab reports, and a final project. Topics covered include the 8085 microprocessor architecture, programming, and applications. The syllabus lists weekly labs and activities covering concepts like I/O devices, ADCs, DACs, and interrupts.
Final Year Projects, Final Year Projects in Chennai, Software Projects, Embedded Projects, Microcontrollers Projects, DSP Projects, VLSI Projects, Matlab Projects, Java Projects, .NET Projects, IEEE Projects, IEEE 2009 Projects, IEEE 2009 Projects, Software, IEEE 2009 Projects, Embedded, Software IEEE 2009 Projects, Embedded IEEE 2009 Projects, Final Year Project Titles, Final Year Project Reports, Final Year Project Review, Robotics Projects, Mechanical Projects, Electrical Projects, Power Electronics Projects, Power System Projects, Model Projects, Java Projects, J2EE Projects, Engineering Projects, Student Projects, Engineering College Projects, MCA Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, Wireless Networks Projects, Network Security Projects, Networking Projects, final year projects, ieee projects, student projects, college projects, ieee projects in chennai, java projects, software ieee projects, embedded ieee projects, "ieee2009projects", "final year projects", "ieee projects", "Engineering Projects", "Final Year Projects in Chennai", "Final year Projects at Chennai"
A microcontroller is an integrated circuit that can be programmed to perform tasks like controlling electronic devices. It contains a processor, memory, and input/output ports on a single chip. Microcontrollers come in different sizes based on the width of their internal data bus and instruction set, from 4-bit to 32-bit. They are widely used in embedded systems due to their low cost, low power usage, and flexibility from being programmable.
Networking of Micro-Controllers through USBpranjal009
This project is use to network 'n' No. of Microcontrollers together and communicate with it via USB on PC
Note : First download the presentation & then view it.
This document describes the development and fabrication of a digital fuel level indicator for two-wheel vehicles. The researchers designed a rectangular fuel tank using CAD software to allow for easier installation of electronics. A float and variable resistor measure the fuel level, which is converted to a digital signal by an ADC and sent to a microcontroller. The microcontroller then displays the fuel level in liters or milliliters on an LCD screen. It also activates a buzzer when the fuel reaches the reserve level to warn the rider. The system provides a more accurate reading of the remaining fuel compared to existing digital indicators.
This study paper portrays a fresh approach for
a course and laboratory design to establish low cost prototypes
and other entrenched devices that accentuate virtual
programmable logic device (VPLD), object oriented java and
real time processing tactics. JAVA is used for software
development. The study encompasses the use of host and node
application. A high performance, low power AVR with high
endurance non-volatile memory segments and with an advance
RISC structure is used to construct prototypes. The paperwork
deals with the VPLD board which is capable to work as
corresponding digital logic analyzer, equation parser, standard
digital IC and design wave studio
Microprocessor and Microcontroller Based Systems.pptTALHARIAZ46
The document discusses microcontrollers and the PIC microcontroller architecture. It begins by defining a microcontroller and distinguishing it from a microprocessor. A microcontroller is designed to perform simple control functions and contains peripherals like I/O, timers, and analog components integrated onto a single chip. The rest of the document details the architecture of the PIC microcontroller, including its instruction set, programming, applications, and features of the popular PIC16F84A model.
The document describes an interactive vending machine project presented by 4 students. It includes an introduction to the concept, working principle, list of components, and detailed descriptions of each component including the PIC microcontroller, stepper motor, LEDs, microphone, and load cell. It also includes sections on hardware programming code, an overview, and conclusions. The goal is to create a vending machine that allows two-way communication and is accessible for visually impaired and disabled users.
Design of a low power processor for Embedded system applicationsROHIT89352
The document describes the design of a low power processor for embedded systems. It uses clock gating techniques and a standby mode to reduce power consumption. The processor is designed based on a modified MIPS microarchitecture and can operate using the RV32E instruction set. It has been implemented at the register transfer level in Verilog and synthesized into an 180nm CMOS technology. The processor consumes 189uA in normal mode and 11.1uA in standby mode, achieving low power operation.
IJRET : International Journal of Research in Engineering and Technology is an international peer reviewed, online journal published by eSAT Publishing House for the enhancement of research in various disciplines of Engineering and Technology. The aim and scope of the journal is to provide an academic medium and an important reference for the advancement and dissemination of research results that support high-level learning, teaching and research in the fields of Engineering and Technology. We bring together Scientists, Academician, Field Engineers, Scholars and Students of related fields of Engineering and Technology.
Design of a usb based data acquisition systemeSAT Journals
Abstract
Development of a multi-channel compact data – acquisition board, which collects real world analog (0-5 Volt dc) and digital data,
delivers them to a personal computer using a USB communication link. The DAQ board is based on microchip PIC microcontroller
(PIC18F2550). A GUI is developed on Visual Basic which displays the instantaneous analog and digital data. It can also be used for
generating the control action signal (manual) which could be delivered to the actuator through a DAC through the microcontroller.
Keywords: PIC Microcontroller, data acquisition, USB.
Real Time Atomization of agriculture system for the modernization of indian a...SHAMEER C M
The document discusses a system to automate irrigation in Indian agriculture using ARM7 and GSM technology. It involves an ARM7 microprocessor connected to sensors like temperature, water level, light, and humidity sensors. GSM is used to control irrigation in the field and send sensor data via SMS to users. The system aims to modernize Indian agriculture by providing real-time field conditions and adequate irrigation. Embedded systems and advantages are discussed. Key hardware includes the ARM7 microcontroller, sensors, GSM modem, and LCD. Analog to digital conversion is also summarized. The system automates irrigation based on sensor data and informs users of field conditions remotely via SMS.
Real Time Atomization of agriculture system for the modernization of indian a...
GOWTHAM REPORT
1. ii
CENTRAL POLYTECHNIC COLLEGE
Tharamani - chennai-113.
PROJECT REPORT(2014-2015)
DEVELOPMENT OF COMPUTER VISSION
SYSTEM FOR VISUALLY IMPAIRED
Submitted in partial full fillment for the award of diploma in
ELECTRONICS AND COMMUNICATION ENGINEERING
GUIDED BY
Mr.T.PADMANATHAN.,B.E
DONE BY
S.GOWTHAM 401112019
S.LOGESWARAN 401112041
S.MANOJ KUMAR 401112046
S.PONNAIYAN 401112060
M.PRASANTH 401112062
K.PRATHAP 401112064
2. ii
CENTRAL POLYTECHNIC COLLEGE, THARAMANI,CHENNAI-113
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING
PROJECT REPORT
(2014-2015)
BONAFIDE CERTIFICATE
This is to certify that this is a bonafide record of the project work
done by
Selvan........................................... Reg. no................... of final year
Diploma in ELECTRONICS AND COMMUNICATION
ENGINEERING who carried out the project work under my
supervision during the Academic Year 2014-2015. submitted for
board examination held on.................
MARKS AWARDED: __/25
PROJECT GUIDE HEAD OF THE DEPARTMENT
INTERNAL EXAMINER EXTERNAL EXAMINER
3. ii
ACKNOWLEDGEMENT
First of all, would like to express our sincere thanks to our parents
creating us as diploma engineers.
Next our thanks to our honourable THE DIRECTOR, DIRECTORATE OF
TECHNICAL EDUCATION who made me our ways full of light will a
kind heart to achieve our targets.
We would all so like to thank our honourable principle.
DR.SOKKALINGAM. M.E., Ph.D.,who leads our college in a
respectable manner.
We thank our respectable Head of the Department
Mr.JAYAPAL for providing us more facilities and also for the great
encouragement while doing our project.
We thank our respectable project guide
Mr.T.PADMANATHAN.,B.E.,for his valuable suggestions.
We would thank our department staff and other department staffs
for providing us a great support by helping in various times to finish
our project.
4. ii
PREFACE
PROJECT WORK IMPORTANCE
Project work plays an important role in technical education.
With working through the project, students are exposed to
different fields in production.
Thus the students get an opportunity to make use of his
knowledge, skill and ability in the design, fabrication and
erection of the project.
He even learns new subjects and practical works as well. He
gains great experience in getting ideas in organizing the work
and putting them into practice.
He learns to approach various problems systematically,
thereby constructing a project and improving his knowledge.
5. ii
CONTENTS
CHAPTERS page no
1. INTRODUCTION . . .6
2. AIM OF THE PROJECT . . .7
3. SYSTEM DESIGN . . .8
BLOCK DIAGRAM
BLOCK DESCRIPTION
CIRCUIT DIAGRAM
CIRCUIT DESCRIPTION
PIC MICROCONTROLLER 16F877A
POWER SUPPLY
MAX 232
APR 9600 VOICE IC
LCD MODULE
MPLAB IDE V8
4. SYSTEM SOFTWARE . . .59
5. CONCLUSION . . .69
6. ii
INTRODUCTION
The Embedded Technology is now in its prime and
the wealth of Knowledge available is mind-blowing.
Embedded System is a combination of hardware
and software. Embedded technology plays a major
role in integrating the various functions associated
with it.
This needs to tie up the various sources of the
Department in a closed loop system. This proposal
greatly reduces the manpower, saves time and
operates efficiently without human interference.
Basedon statistics from the World Health
Organization (WHO), there are more than 161
million visually impaired people around the world,
and 37 million of them are blind.
Choosing clothes with suitable colors and patterns is
a challenging task for blind or visually impaired
people.
7. ii
AIM OF PROJECT
The aim of the project is about DEVELOPMENT OF
COMPUTER VISSION SYSTEM FOR VISUALLY
IMPAIRED
METHODOLOGY:
With the help of PIC microcontroller and WEB camerais used to find the
person and path without anyone help.
WORKING PRINCIPLE:
The system integrates a camera, a microphone, a
computer, and a speaker for audio description of certain
objects.
A camera is used to capture the certain objects like table,
chair. Also person face recognition is done for
authentication.
The detected object and status of the system displayed on
LCD. Also the voice is alerted using APR.
ADVANTAGES:
Very much helpful for blind people
More reliable system
Portable
9. ii
BLOCK DESCRIPTION:
POWER SUPPLY
PIC MICROCONTROLLER
MAX 232
LCD MODULE
APR 9600 VOICE IC
MPLAM COMPILER
10. ii
BLOCK 1: POWER SUPPLY
Power Supply for PIC 16F877A Microcontroller
This section describes how to generate +5V DC power supply
The power supply section is the important one. It should
deliver constant output regulated power supply for successful
working of the project. A 0-12V/1 mA transformer is used for
this purpose.
The primary of this transformer is connected in to main
supply through on/off switch& fuse for protecting from
overload and short circuit protection. The secondary is
connected to the diodes to convert 12V AC to 12V DC voltage.
And filtered by the capacitor. Which is further regulated to
+5v, by using IC 7805.
11. ii
BLOCK 2: PIC MICROCONTROLLER
INTRODUCTION OF PIC16F877A:
The PIC16F877A CMOS FLASH-based 8-bit microcontroller is upward
compatible with the PIC16C5x, PIC12Cxxx and PIC16C7x devices. It
features 200 ns instruction execution, 256 bytes of EEPROM data
memory, self programming, an ICD, 2 Comparators, 8 channels of 10-bit
Analog-to-Digital (A/D) converter, 2 capture/compare/PWM functions, a
synchronous serial port that can be configured as either 3-wire SPI or 2-
wire I2C bus, a USART, and a Parallel Slave Port.
Microchip PIC16F877A Microcontroller Features:
High-Performance RISC CPU
Operating speed: 20 MHz, 200 ns instruction cycle
Operating voltage: 4.0-5.5V
Industrial temperature range (-40° to +85°C)
15 Interrupt Sources
35 single-word instructions
All single-cycle instructions except for program branches (two-
cycle)
Special Microcontroller Features
Flash Memory: 14.3 Kbytes (8192 words)
Data SRAM: 368 bytes
Data EEPROM: 256 bytes
Self-reprogrammable under software control
In-Circuit Serial Programming via two pins (5V)
Watchdog Timer with on-chip RC oscillator
Programmable code protection
12. ii
Power-saving Sleep mode
Selectable oscillator options
In-Circuit Debug via two pins
Peripheral Features
33 I/O pins; 5 I/O ports
Timer0: 8-bit timer/counter with 8-bit prescaler
Timer1: 16-bit timer/counter with prescaler
o Can be incremented during Sleep via external crystal/clock
Timer2: 8-bit timer/counter with 8-bit period register, prescaler and
prescaler
Two Capture, Compare, PWM modules
o 16-bit Capture input; max resolution 12.5 ns
o 16-bit Compare; max resolution 200 ns
o 10-bit PWM
Synchronous Serial Port with two modes:
o SPI Master
o I2C Master and Slave
USART/SCI with 9-bit address detection
Parallel Slave Port (PSP)
o 8 bits wide with external RD, WR and CS controls
Brown-out detection circuitry for Brown-Out Reset
Analog Features
10-bit, 8-channel A/D Converter
Brown-Out Reset
Analog Comparator module
o 2 analog comparators
o Programmable on-chip voltage reference module
13. ii
PIN DIAGRAM:
Memory of the PIC16F877 divided into 3 types of memories:
Program Memory- A memory that contains the program(which we
had written), after we've burned it. As a reminder, Program Counter
executes commands stored in the program memory, one after the
other.
Data Memory – This is RAM memory type, which contains a
special registers like SFR (Special Faction Register) and GPR
(General Purpose Register). The variables that we store in the Data
Memory during the program are deleted after we turn of the micro.
These two memories have separated data buses, which makes the
access to each one of them very easy.
14. ii
Data EEPROM (Electrically Erasable Programmable Read-Only
Memory)- A memory that allows storing the variables as a result of
burning the written program.
Each one of them has a different role. Program Memory and Data Memory
two memories that are needed to build a program, and Data EEPROM is
used to save data after the microcontroller is turn off.
Program Memory and Data EEPROM they are non-volatile memories,
which store the information even after the power is turn off. These
memories called Flash Or EEPROM. In contrast, Data Memory does not
save the information because it needs power in order to maintain the
information stored in the chip.
PIC16F87XA Program Memory
The PIC16F87XA devices have a 13-bit program counter capable
of addressing an 8K word x 14 bit program memory space. This
memory is used to store the program after we burn it to the
microcontroller. The PIC16F876A/877A devices have 8K words x
14 bits of Flash program memory that can be electrically erased
and reprogrammed. Each time we burn program into the micro,
we erase an old program and write a new one.
15. ii
PIC16F876A/877A program memory map and stack
Program Counter (PC) keeps track of the program execution by holding
the address of the current instruction. It is automatically incremented to
the next instruction during the current instruction execution.
The PIC16F87XA family has an 8-level deep x 13-bit wide hardware
stack. The stack space is not part of either program or data space
and the stack pointer is not readable or writable. In the PIC
microcontrollers, this is a special block of RAM memory used only
for this purpose.
The CALL instruction is used to jump to a subroutine, which must
be terminated with the RETURN instruction. CALL has the address
of the first instruction in the subroutine as its operand. When the
CALL instruction is executed, the destination address is copied to
the PC. The PC is PUSHed onto the stack when a CALL instruction
is executed, or an interrupt causes a branch. The stack is POP’ed in
the event of a RETURN, RETLW or a RETFIE instruction execution.
The stack operates as a circular buffer. This means that after the
stack has been PUSHed eight times, the ninth push overwrites the
value that was stored from the first push. The tenth push overwrites
the second push (and so on).
16. ii
Each time the main program execution starts at address 0000 -
Reset Vector. The address 0004 is “reserved” for the “interrupt
service routine” (ISR).
If we plan to use an interrupt, our program will begin after the
Interrupt Vector; and if not we can start to write from the beginning
of the Reset Vector.
Some of the memory is divided into the pages that are designed for
write/burn the program into them; the remaining memory (Stack,
Interrupt Vector, and Reset Vector) is hardware registers.
Attention!
Program Memory is divided into the pages, where the program is stored.
Data Memory is divided into the banks. The banks are located inside the
RAM, where the special registers and the data located.
STATUS register
In most cases, this register is used to switch between the banks (Register Bank
Select), but also has other capabilities.
PIC STATUS register
With the help of three left bits (IRP, RP1, and RP0) one can control the
transition between the banks:
IRP - Register Bank Select bit, used for indirect addressing
method.
RP1:RP0: - Register Bank Select bits, used for direct addressing
method.
To distinguish between the two methods, at this point, the will use the definition
of fundamental concepts. Later on, the two methods will be studied in detail.
When the IRP Equal to 0, the program will work with banks 0, 1.
When the IRP Equal to 1, the program will work with banks 2, 3.
The following table demonstrates, which of the Banks the program is working
with, based on the selection of the RP0 and RP1 bits:
17. ii
RP1:RP0 BANK
00 0
01 1
10 2
11 3
An example of using STATUS register and Register Bank Select bit:
1. bsf STATUS, 5 ; Change to Bank 1
2. clrf TRISB ; Set PORTB as output
3. bcf STATUS, 5 ; Change to Bank 0
In the first line, we are in changing/setting the 5th bit, RP0, in the STATUS
register to 1, and thus, base on the table we are switching/selecting Bank 1.
After PortB was set as output in the second line, we switched back to Bank 0 by
in changing/setting the 5th bit, RP0, in the STATUS register to 0, in the third
line.
C: Carry/borrow bit (ADDWF, ADDLW,SUBLW,SUBWF instructions)
1 = A carry-out from the Most Significant bit of the result occurred
0 = No carry-out from the Most Significant bit of the result occurred
An example of using STATUS register and Carry/borrow bit:
1. Movlw 200
2. Addwf 100, 0
In this example, we are assigning value of 200 to the W (working) register.
Then, we are adding the value of 100 and the W register together. The result is
stored in W register and should be 300 (200+100).
However, the maximum value is 256, resulting in carry out. The C (bit 0) of the
STATUS register becomes 1 (C = 1). Register W will contain the reminder: 44.
DC: Digit carry/borrow bit (ADDWF, ADDLW,SUBLW,SUBWF
instructions) (for borrow, the polarity is reversed)
1 = A carry-out from the 4th low order bit of the result occurred
0 = No carry-out from the 4th low order bit of the result
18. ii
Z: Zero bit
1 = The result of an arithmetic or logic operation is zero
0 = The result of an arithmetic or logic operation is not zero
The bits 3 and 4 are used with WDT - Watchdog Timer.
PD: Power-down bit
1 = After power-up or by the CLRWDT instruction
0 = By execution of the SLEEP instruction
TO: Time-out bit
1 = After power-up, CLRWDT instruction or SLEEP instruction
0 = A WDT time-out occurred
PORT register
The role of the PORT register is to receive the information from an external
source (e.g. sensor) or to send information to the external elements (e.g. LCD).
19. ii
We can control each port by using an assigned address of specific port, but there
is much easier way to control the port. We are allowed to use the names of the
ports without considering their addresses.
For example:
# define SWITCH PORTA, 0
We define a variable named SWITCH, which received a value of bit number 0
of the PORTA. Usually we define the ports at the beginning of the program, and
then we use only the given names.
TRIS register
The TRIS register is data direction register which defines if the specific bit or
whole port will be an input or an output. Each PORT has its own TRIS register.
Here's a map of the locations:
BANK0 BANK1
PORTA TRISA
PORTB TRISB
PORTC TRISC
PORTD TRISD
PORTE TRISE
The default mode of each TRIS is input. If you want to set a specific port as exit
you must change the state of the TRIS to 0.
Keep in mind: to change a specific port to an output, one should first move to
the BANK1, make the change, and then return to BANK0. The default state of
the banks is BANK0.
The running program is working only with one bank at all time. If not set
otherwise, then as stated, the default bank is BANK0. Part of the registers
located inside BANK0, and some are not. When we need to access a register
that is not located inside BANK0, we are required to switch between the banks.
20. ii
For example, the access to PORT registers is done inside BANK0. However, to
change port from an input to an output and vice versa, we need to access TRIS
register that is located inside BANK1. From the moment we moved to the
BANK1, the program will always work with BANK1; at this time, to access
registers inside BANK0, we will have to return to the situation in which our
program will work with BANK0.
Direct and Indirect addressing
Direct Addressing: Using this method we are accessing the registers directly by
detecting location inside Data Memory from Opcode and by selecting the bank
using bits RP1 and RP0 of the STATUS register.
Indirect Addressing: To implement indirect addressing, a File Select Register
(FSR) and indirect register (INDF) are used. In addition, when using this
method we choose bank using bit IRP of the STATUS register. Indirect
addressing treated like a stack pointer, allowing much more efficient work with
a number of variables. INDF register is not an actual register (it is a virtual
register that is not found in any bank).
Don’t be confused! There is SFR (Special Function Register) - special registers
of RAM, and there is FSR (File Select Register).
The following figure shows the two addressing methods:
21. ii
To the left you can see the direct addressing method, where the bank selection is
made by RP bits and the referencing is made directly from memory Opcode by
using the variable name.
To the right you can see the indirect addressing method, where the bank
selection is made by IRP bit and accessing the variable by pointer FSR.
Let’s explore the differences between the 2 methods:
We want to assign number 5 to the variable TEMP located at address 0X030. In
the first row of each example, we will define the variable TEMP at the address
0X030.
Example of direct addressing:
1. TEMP Equ 0x030
2. Movlw 5
3. Movwf TEMP
It's easy to understand, that direct addressing method means working directly
with the variables. In the second line we put the number 5 into the working
register W, and in the line 3, the content of the W passes to the TEMP variable.
Example of indirect addressing:
1. TEMP Equ 0x030
2. Movlw 0x030
3. Movwf FSR
4. Movlw 5
5. Movwf INDF
In the second line, we put a value into the W register. In the third line, the value
passes to the FSR register, and from this moment FSR points to the address of
the TEMP variable. In the fourth line, the number 5 passes to the W register,
and in the fifth line, we move the contents of W register (which is 5) to the
INDF. In fact INDF performs the following: it takes the number 5 and puts it in
the address indicated by FSR register.
22. ii
PIC16F87XA Data EEPROM
The data EEPROM and Flash program memory is readable and writable during
normal operation (over the full VDD range). This memory is not directly
mapped in the register file space. Instead, it is indirectly addressed through the
Special Function Registers.
There are six SFRs used to read and write to this memory:
1. EECON1
2. EECON2
3. EEDATA
4. EEDATH
5. EEADR
6. EEADRH
When interfacing to the data memory block, EEDATA holds the 8-bit data for
read/write and EEADR holds the address of the EEPROM location being
accessed. These devices have 128 or 256 bytes of data EEPROM (depending on
the device), with an address range from 00h to FFh. On devices with 128 bytes,
addresses from 80h to FFh are unimplemented.
A few important points about Data EEPROM memory:
It lets you save data DURING programming
The data is saved during the “burning” process
You can read the data memory during the programming and use it
The use is made possible with the help of SFR
At this point there is no need to learn how to use this memory with special
registers, because there are functions (writing and reading) that are ready.
Write to DATA EEPROM
To write to an EEPROM data location, the user must first write the address to
the EEADR register and the data to the EEDATA register. Then the user must
follow a specific write sequence to initiate the write for each byte.
BSF STATUS, RP1 ;
BSF STATUS, RP0 ; Bank 3
BTFSC EECON1, WR ;Wait for write
23. ii
GOTO $-1 ;to complete
BCF STATUS, RP0 ;Bank 2
MOVF DATA_EE_ADDR, W ;Data Memory
MOVWF EEADR ;Address to write
MOVF DATA_EE_DATA, W ;Data Memory Value
MOVWF EEDATA ;to write
BSF STATUS, RP0 ;Bank 3
BCF EECON1, EEPGD ;Point to DATA memory
BSF EECON1, WREN ;Enable writes
BCF INTCON, GIE ;Disable INTs.
MOVLW 55h ;
MOVWF EECON2 ;Write 55h
MOVLW AAh ;
MOVWF EECON2 ;Write AAh
BSF EECON1, WR ;Set WR bit to begin write
BSF INTCON, GIE ;Enable INTs
BCF EECON1, WREN ;Disable writes
Read DATA EEPROM
To read a data memory location, the user must write the address to the
EEADR register, clear the EEPGD control bit (EECON1<7>) and then set
control bit RD (EECON1<0>). The data is available in the very next cycle
in the EEDATA register; therefore, it can be read in the next instruction.
EEDATA will hold this value until another read or until it is written to by
the user (during a write operation).
BSF STATUS, RP1 ;
BCF STATUS, RP0 ; Bank 2
MOVF DATA_EE_ADDR, W ; Data Memory
MOVWF EEADR ; Address to read
BSF STATUS, RP0 ; Bank 3
BCF EECON1, EEPGD ; Point to Data memory
BSF EECON1, RD ; EE Read
BCF STATUS, RP0 ; Bank 2
MOVF EEDATA, W ; W = EEDATA
24. ii
Both of these functions are provided by the manufacturer. There is a
required sequence in order to write/read to/from the memory; that
process can be performed independently, but it is better to use ready
functions of Microchip.
PIC Timer0:
Many times, we plan and build systems that perform various processes
that depend on time.
Simple example of this process is the digital wristwatch. The role of this
electronic system is to display time in a very precise manner and change
the display every second (for seconds), every minute (for minutes) and so
on.
To perform the steps we've listed, the system must use a timer, which
needs to be very accurate in order to take necessary actions. The clock is
actually a core of any electronic system.
In this PIC timer module tutorial we will study the existing PIC timer
modules. The microcontroller PIC16F877 has 3 different timers:
PIC Timer0
PIC Timer1
PIC Timer2
We can use these timers for various important purposes. So far we used
“delay procedure” to implement some delay in the program, that was
counting up to a specific value, before the program could be continued.
"Delay procedure" had two disadvantages:
we could not say exactly how long the Delay procedure was in
progress
we could not perform any further steps while the program executes
the "delay procedure"
Now, using Timers we can build a very precise time delays which will be
based on the system clock and allow us to achieve our desired time delay
well-known in advance.
25. ii
In order for us to know how to work with these timers, we need to learn
some things about each one of them. We will study each one separately.
PIC Timer0
The Timer0 module timer/counter has the following features:
8-bit timer/counter
Readable and writable
8-bit software programmable prescaler
Internal (4 Mhz) or external clock select
Interrupt on overflow from FFh to 00h
Edge select (rising or falling) for external clock
Let’s explain the features of PIC Timer0 we have listed above:
Timer0 has a register called TMR0 Register, which is 8 bits of size.
We can write the desired value into the register which will be increment
as the program progresses. Frequency varies depending on the Prescaler.
Maximum value that can be assigned to this register is 255.
TMR0IF - TMR0 Overflow Interrupt Flag bit.
The TMR0 interrupt is generated when the TMR0 register overflows from
FFh to 00h. This overflow sets bit TMR0IF (INTCON<2>). You can
initialize the value of this register to what ever you want (not necessarily
"0").
We can read the value of the register TMR0 and write into. We can reset
its value at any given moment (write) or we can check if there is a certain
numeric value that we need (read).
Prescaler - Frequency divider.
1:2
26. ii
1:4
1:8
1:16
1:32
1:64
1:128
1:256
The structure of the OPTION_REG register
We perform all the necessary settings with OPTION_REG Register. The
size of the register is 8 bits.
Initializing the OPTION_REG register
The following is an example how we can initialize the OPTION_REG:
1. PSA=0; // Prescaler is assigned to the Timer0 module
2. PS0=1; // Prescaler rate bits
3. PS1=1; // are set to “111”
4. PS2=1; // which means divide by 256
5. TOSE=0; // rising edge
6. TOCS=0; // Internal instruction cycle clock
Block diagram of the PIC Timer0 / WDT prescaler
27. ii
PIC TIMER0 block diagram
Calculating Count, Fout, and TMR0 values
If using INTERNAL crystal as clock, the division is performed as follow:
PIC TIMER0 formula for internal clock
Fout– Output frequency after the division.
Tout – The Cycle Time after the division.
4 - The division of the original clock (4 MHz) by 4, when using internal
crystal as clock (and not external oscillator).
Count - A numeric value to be placed to obtain the desired output
frequency - Fout.
(256 - TMR0) - The number of times in the timer will count based on the
register TMR0.
28. ii
An example of INTERNAL crystal as clock
Suppose we want to create a delay of 0.5 second in our program using
Timer0. What is the value of Count?
Calculation:
First, let’s assume that the frequency division by the Prescaler will be
1:256. Second, let’s set TMR0=0. Thus:
Formula to calculate Cout using Timer0
If using EXTERNAL clock source (oscillator), the division is performed as
follow:
PIC TIMER0 formula for external clock
In this case there is no division by 4 of the original clock. We use the
external frequency as it is.
An example of EXTERNAL clock source (oscillator):
What is the output frequency - Fout, when the external oscillator is 100kHz and
Count=8?
Calculation:
First, let’s assume that the frequency division by the Prescaler will be 1:256.
Second, let’s set TMR0=0. Thus:
29. ii
Formula to calculate Fout for Timer0
PIC Timer1:
The Timer1 module, timer/counter, has the following features:
16-bit timer/counter consisting of two 8-bit registers (TMR1H and
TMR1L)
readable and writable
8-bit software programmable prescaler
Internal (4 Mhz) or external clock select
Interrupt on overflow from FFFFh to 0000h
Let’s explain the features of PIC Timer1 we have listed above:
Timer1 has a register called TMR1 register, which is 16 bits of size.
Actually, the TMR1 consists of two 8-bits registers:
TMR1H
TMR1L
It increments from 0000h to the maximum value of 0xFFFFh (or 0 b1111 1111
1111 1111 or 65,535 decimal). The TMR1 interrupt, if enabled, is generated on
overflow which is latched in interrupt flag bit, TMR1IF (PIR1<0>). This
interrupt can be enabled/disabled by setting/clearing TMR1 interrupt
enable bit, TMR1IE (PIE1<0>). You can initialize the value of this register
to what ever you want (not necessarily "0").
TMR1IF – TMR1 overflow Interrupt Flag bit.
This flag marks the end of ONE cycle count. The flag need to be reset in
the software if you want to do another cycle count. We can read the value
30. ii
of the register TMR1 and write into. We can reset its value at any given
moment (write) or we can check if there is a certain numeric value that
we need (read).
Prescaler – Frequency divider.
We can use Prescaler for further division of the system clock. The size of
the register is 2-bit only, so you can make four different division. The
options are:
1:1
1:2
1:4
1:8
You can choose whether to use an internal system clock (crystal) or
external oscillator that can be connected to a pin RC0.
The structure of the T1CON register
We perform all the necessary settings with T1CON register. As we can see,
the size of the register is 8 bits. Let’s explore the relevant bits:
Initializing the T1CON register
The following is an example how we can initialize the T1CON register:
1. TMR1ON=1; // the timer is enable
2. TMR1CS=0; // internal clock source
3. T1CKPS0=0; // Prescaler value set to “00”
4. T1CKPS1=0; // which means 1:1 (no division)
Or you can set all the T1CON register at once as follows:
T1CON=0b00000001;
31. ii
Block diagram of the PIC Timer1
PIC TIMER1 block diagram
Calculating Count, Fout, and Timer1 values
If using INTERNAL crystal as clock, the division is performed as follow:
PIC TIMER1 formula for internal clock
Fout– The output frequency after the division.
Tout – The Cycle Time after the division.
4 - The division of the original clock (4 MHz) by 4, when using internal crystal
as clock (and not external oscillator).
Count - A numeric value to be placed to obtain the desired output frequency -
Fout.
(256 - TMR1) - The number of times in the timer will count based on the
register TMR0.
If using EXTERNAL clock source (oscillator), the division is performed as
follow:
PIC TIMER1 formula for external clock
32. ii
Simple example and calculation of how to use TIMER1:
Suppose we want to create a delay of 2 second in the our program using Timer1.
What is the value of Count?
Calculation:
First, let’s assume that the frequency division by the Prescaler will be 1:1.
Second, let’s set TMR1=0, which means the TMR1 will count 65,536 times.
Thus:
Formula to calculate Cout for Timer1
PIC Timer2:
The Timer2 module has the following features:
• two 8-bit registers (TMR2 and PR2)
• readable and writable
• prescaler and a postscaler
• connected only to an internal clock - 4 MHz crystal
• Interrupt on overflow
Let’s explain the features we have listed above:
• Timer2 has 2 count registers: TMR2 and PR2. The size of each registers is
8-bit in which we can write numbers from 0 to 255. The TMR2 register is
readable and writable and is cleared on any device Reset. PR2 is a readable
and writable register and initialized to FFh upon Reset.
Register TMR2 is used to store the “initial” count value (the value from
which it begins to count). Register PR2 is used to store the “ending” count
value (the maximum value we need/want to reach). ie: using Timer2 we
can determine the started count value, the final count value, and the
33. ii
count will be between these two values. The Timer2 increments from 00h
until it matches PR2 and then resets to 00h on the next increment cycle.
• Prescaler and Postscaler - Timer2 is an 8-bit timer with a prescaler and a
postscaler. Each allows to make additional division of the frequency clock
source.
Prescaler divides the frequency clock source BEFORE the counting take
place at the register TMR2, thus the counting inside the TMR2 register is
performed based on the divided frequency clock source by the Prescaler
The match output of TMR2 goes through a 4-bit postscaler (which gives a
1:1 to 1:16 scaling inclusive) to generate a TMR2 interrupt (latched in flag
bit, TMR2IF (PIR1<1>)).
Postscaler divides the frequency that comes out of the Comparator again
for the last time.
TIMER2 Prescaler and Postscaler
• TMR2IF - TMR2 to PR2 Match Interrupt Flag bit.
• Comparator – Compares the value of the register TMR2 and the
maximum value of the register PR2.
• TMR2 – The register in which the “initial” count value is written.
34. ii
• PR2 – The register in which the final or the maximum count value is
written.
We perform all the necessary settings with T2CON Register The structure
of the T2CON register:
As we can see, the size of the register is 8 bits. Let’s explore the relevant
bits:
T2CKPS1:T2CKPS0: Timer2 Clock Prescale Select bits
The input clock (FOSC/4) has a prescale option of 1:1, 1:4 or 1:16, selected
by control bits T2CKPS1:T2CKPS0 (T2CON<1:0>).
00 = Prescaler is 1
01 = Prescaler is 4
1x = Prescaler is 16
TMR2ON: Timer2 On bit
Timer2 can be shut-off by clearing control bit, TMR2ON (T2CON<2>), to
minimize power consumption.
1 = Timer2 is on
0 = Timer2 is off
TOUTPS3:TOUTPS0: Timer2 Output Postscale Select bits
The match output of TMR2 goes through a 4-bit postscaler (which gives a
1:1 to 1:16 scaling inclusive selected by control bits TOUTPS3:TOUTPS0
(T2CON<6:3>).
35. ii
0000 = 1:1 postscale
0001 = 1:2 postscale
0010 = 1:3 postscale
1111 = 1:16 postscale
The following is an example how we can initialize the T2CON register:
1. TMR2ON=1; // the timer is enable
2. T2CKPS0=0; // Prescaler – 1:1
3. T2CKPS1=0;
4. TOUTPS0=1; // Postscaler – 1:16
5. TOUTPS0=1;
6. TOUTPS0=1;
7. TOUTPS0=1;
Or you can set all the T2CON register at once as follows:
T2CON=0b01111100;
36. ii
TIMER2 BLOCK DIAGRAM
How to calculate the required values of the TIMER2:
Fout – The output frequency after the division.
Tout – The Cycle Time after the division.
4 - The division of the original clock (4 MHz) by 4, when using internal
crystal as clock (and not external oscillator).
Count - A numeric value to be placed to obtain the desired output
frequency - fout.
(PR2 – TMR2) - The number of times the counter will count.
Simple example and calculation of how to use TIMER2:
Suppose we want to create a delay of 1 second in the our program using
Timer2. What is the value of Count?
Calculation:
First, let’s assume that the frequency division by the Prescaler will be 1:1
and Postscaler will be 1:16. Second, let’s set TMR1=0 and PR2=255. Thus:
37. ii
Introduction to Serial communication with PIC16F877
microcontroller
In this tutorial we will study the communication component – USART
(Universal Synchronous Asynchronous Receiver Transmitter) located
within the PIC. It is a universal communication component
(Synchronous/Asynchronous), which can be used as transmitter or as
receiver. We will look at:
serial and parallel communications
synchronous and asynchronous communications
how to enable serial communication - TXSTA and RCSTA registers
An example of 8-bit transmission
An example of 9-bit transmission
how to calculate the value being placed in the SPBRG register
USART Transmit and Receive block diagrams
Max323 Driver/Receiver
the implementation of the PIC serial communication (C program
and a video)
We will show how to set USART in order to allow communication
between PIC to PIC or between PIC to a personal computer. We will start
with the definition of media concepts. There are two options to
differentiate when speaking about transmission of information on the
transmission lines:
serial communication
parallel communication
38. ii
In order to understand what serial communication is, and emphasize the
difference between serial communication and parallel communication,
let’s take a look at the following example:
We have a multi-bit word, and we want to transmit it from one computer
to the second computer.
Using the serial communication:
When using the serial communication we transmit the multi-bit word bit
after bit (when at any given moment only one bit will pass).
Transmitting the word 10011101 using serial communication.
Using the parallel communication:
When using the parallel communication, however, the number of bits will be
transmitted at once from one computer to the second computer.
39. ii
Transmitting the word 10011101 using parallel communication.
In addition to the serial and parallel communications, there are 2 types of
communication we will explore:
Synchronous communication
Asynchronous communication
Synchronous communication
When using the synchronous communication – the information is
transmitted from the transmitter to the receiver:
in sequence
bit after bit
with fixed baud rate
and the clock frequency is transmitted along with the bits
That means that the transmitter and the receiver are synchronized
between them by the same clock frequency. The clock frequency can be
transmitted along with the information, while it is encoded in the
information itself, or in many cases there is an additional wire for the
clock.
This type of communication is faster compare to the asynchronous
communication since it is "constantly transmitting” the information, with
no stops.
Asynchronous communication
When using the asynchronous communication - the transmitter and the receiver
refraining to transmit long sequences of bits because there isn't a full
synchronization between the transmitter, that sends the data, and the receiver,
that receives the data.
In this case, the information is divided into frames, in the size of byte.
Each one of the frame has:
“Start” bit marks the beginning of a new frame.
“Stop” bit marks the end of the frame.
40. ii
Frames of information must not necessarily be transmitted at equal time
space, since they are independent of the clock.
Enabling Serial Communication
To communicate with external components such as computers or
microcontrollers, the PIC micro uses a component called USART -
Universal Synchronous Asynchronous Receiver Transmitter. This
component can be configured as:
a Full-Duplex asynchronous system that can communicate with
peripheral devices, such as CRT terminals and personal computers
a Half-Duplex synchronous system that can communicate with
peripheral devices, such as A/D or D/A integrated circuits, serial
EEPROMs, etc.
To enable the serial communication with PIC micro we must set different
parameters within two registers: (click the links for the explanation of
each bit)
1. TXSTA - Transmit Status and Control Register
2. RCSTA - Receive Status and Control Register
An example of 8-bit transmission:
Let’s assume that we need to transmit the following information: 10110010.
This information will be stored inside TXREG register, which acts as a
temporary buffer storage of information prior to transmission.
The bit TX9 will be zero (TX9=0) - which determines that the
transmission will be 8-bit transmission, so there is no need to address
TX9D bit, which stores the ninth bit of information.
41. ii
The information before the transmission looks like this:
Transmitting 8 bit data
Now, let’s define the receiver side to receive 8 bit information. To do so,
the register RX9 will be zero (RX9=0). The received information will be
stored in the RSR register, which acts as a temporary buffer storage.
The received information will look like this:
Receiving 8 bit data
42. ii
BLOCK 3:MAX 232
MAX 232
The MAX232 is a dual driver/receiver that includes a
capacitive voltage generator to supply RS 232 voltage levels
from a single 5v supply.
Each receiver converts RS-232 to 5v TTL/CMOS levels. Each
driver converts TLL/CMOS input levels into EIA-232 levels.
The P3_0 (RX) and P3_1 (TX) pin of controller is connected to
the max 232 driver and the TX and RX pin of max 232 is
connected to the GSM modem or PC.
43. ii
In this circuit the microcontroller transmitter pin is
connected in the MAX232 T2IN pin which converts input 5v
TTL/CMOS level to RS232 level.
Then T2OUT pin is connected to reviver pin of 9 pin D type
serial connector which is directly connected to PC.
In PC the transmitting data is given to R2IN of MAX232
through transmitting pin of 9 pin D type connector which
converts the RS232 level to 5v TTL/CMOS level.
The R2OUT pin is connected to receiver pin of the
microcontroller. Likewise the data is transmitted and received
between the microcontroller and PC or other device vice
versa.
CIRCUIT
45. ii
BLOCK4 : LCD MODULE
►Introduction
The most commonly used Character based LCDs are based on Hitachi's
HD44780 controller or other which are compatible with HD44580. In this
tutorial, we will discuss about character based LCDs, their interfacing with
various microcontrollers, various interfaces (8-bit/4-bit), programming, special
stuff and tricks you can do with these simple looking LCDs which can give a
new look to your application.
►Pin Description
The most commonly used LCDs found in the market today are 1 Line, 2
Line or 4 Line LCDs which have only 1 controller and support at most of 80
charachers, whereas LCDs supporting more than 80 characters make use of 2
HD44780 controllers.
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16
Pins (two pins are extra in both for back-light LED connections). Pin
description is shown in the table below.
Figure 1: Character LCD type HD44780 Pin diagram
Pin No. Name Description
Pin no. 1 D7 Data bus line 7 (MSB)
Pin no. 2 D6 Data bus line 6
Pin no. 3 D5 Data bus line 5
Pin no. 4 D4 Data bus line 4
Pin no. 5 D3 Data bus line 3
Pin no. 6 D2 Data bus line 2
Pin no. 7 D1 Data bus line 1
Pin no. 8 D0 Data bus line 0 (LSB)
46. ii
Pin no. 9 EN1 Enable signal for row 0 and 1 (1st
controller)
Pin no. 10 R/W 0 = Write to LCD module
1 = Read from LCD module
Pin no. 11 RS 0 = Instruction input
1 = Data input
Pin no. 12 VEE Contrast adjust
Pin no. 13 VSS Power supply (GND)
Pin no. 14 VCC Power supply (+5V)
Pin no. 15 EN2 Enable signal for row 2 and 3 (2nd
controller)
Pin no. 16 NC Not Connected
Table 2: Character LCD pins with 2 Controller
Usually these days you will find single controller LCD modules are used more
in the market. So in the tutorial we will discuss more about the single controller
LCD, the operation and everything else is same for the double controller too.
Lets take a look at the basic information which is there in every LCD.
►BF - Busy Flag:
Busy Flag is an status indicator flag for LCD. When we send a command
or data to the LCD for processing, this flag is set (i.e BF =1) and as soon as the
instruction is executed successfully this flag is cleared (BF = 0). This is helpful
in producing and exact amount of delay. for the LCD processing. To read Busy
Flag, the condition RS = 0 and R/W = 1 must be met and The MSB of the LCD
data bus (D7) act as busy flag. When BF = 1 means LCD is busy and will not
accept next command or data and BF = 0 means LCD is ready for the next
command or data to process.
►Instruction Register (IR) and Data Register (DR)
There are two 8-bit registers in HD44780 controller Instruction and Data
register. Instruction register corresponds to the register where you send
commands to LCD e.g LCD shift command, LCD clear, LCD address etc. and
Data register is used for storing data which is to be displayed on LCD. when
send the enable signal of the LCD is asserted, the data on the pins is latched in
to the data register and data is then moved automatically to the DDRAM and
hence is displayed on the LCD. Data Register is not only used for sending data
to DDRAM but also for CGRAM, the address where you want to send the data,
is decided by the instruction you send to LCD. We will discuss more on LCD
instruction set further in this tutorial.
47. ii
►Commands and Instruction set
Only the instruction register (IR) and the data register (DR) of the
LCD can be controlled by the MCU. Before starting the internal operation of the
LCD, control information is temporarily stored into these registers to allow
interfacing with various MCUs, which operate at different speeds, or various
peripheral control devices. The internal operation of the LCD is determined by
signals sent from the MCU. These signals, which include register selection
signal (RS), read/write signal (R/W), and the data bus (DB0 to DB7), make up
the LCD instructions (Table 3). There are four categories of instructions that:
48. ii
Although looking at the table you can make your own commands and test them. Below is a
brief list of useful commands which are used frequently while working on the LCD.
No. Instruction Hex Decimal
1 Function Set: 8-bit, 1 Line, 5x7 Dots 0x30 48
2 Function Set: 8-bit, 2 Line, 5x7 Dots 0x38 56
3 Function Set: 4-bit, 1 Line, 5x7 Dots 0x20 32
4 Function Set: 4-bit, 2 Line, 5x7 Dots 0x28 40
5 Entry Mode 0x06 6
6
Display off Cursor off
(clearing display without clearing DDRAM
content)
0x08 8
7 Display on Cursor on 0x0E 14
8 Display on Cursor off 0x0C 12
9 Display on Cursor blinking 0x0F 15
10 Shift entire display left 0x18 24
12 Shift entire display right 0x1C 30
13 Move cursor left by one character 0x10 16
14 Move cursor right by one character 0x14 20
15 Clear Display (also clear DDRAM content) 0x01 1
16
Set DDRAM address or coursor position on
display
0x80+add* 128+add*
17
Set CGRAM address or set pointer to
CGRAM location
0x40+add** 64+add**
Table 4: Frequently used commands and instructions for LCD
* DDRAM address given in LCD basics section see Figure 2,3,4
** CGRAM address from 0x00 to 0x3F, 0x00 to 0x07 for char1 and so on.
49. ii
BLOCK 5: APR 9600 VOICE IC
APR9600 is a low-cost high performance sound
record/replay IC incorporating flash analogue storage
technique. Recorded sound is retained even after power
supply is removed from the module.
The replayed sound exhibits high quality with a low noise
level. Sampling rate for a 60 second recording period is
4.2 kHz that gives a sound record/replay bandwidth of
20Hz to 2.1 kHz.
However, by changing an oscillation resistor, a sampling
rate as high as 8.0 kHz can be achieved. This shortens the
total length of sound recording to 32 seconds.
Total sound recording time can be varied from 32 seconds
to 60 seconds by changing the value of a single resistor.
The IC can operate in one of two modes: serial mode and
parallel mode. In serial access mode, sound can be
recorded in 256 sections.
In parallel access mode, sound can be recorded in 2, 4 or 8
sections. The IC can be controlled simply using push
button keys. It is also possible to control the IC using
external digital circuitry such as micro-controllers and
computers.
50. ii
The APR9600 has a 28 pin DIP package. Supply voltage is
between 4.5V to 6.5V. During recording and replaying,
current consumption is 25 mA. In idle mode, the current
drops to 1 mA.
The APR9600 experimental board is an assembled PCB
board consisting of an APR9600 IC, an electrets
microphone, support components and necessary switches
to allow users to explore all functions of the APR9600
chip. The oscillation resistor is chosen so that the total
recording period is 60 seconds with a sampling rate of 4.2
kHz. The board measures 80mm by 55mm.
APR 9600 EXPERIMENT BOARD
51. ii
APR 9600
Pin-out of the APR9600 is given in Figure 1. A typical connection
of the chip is given in Figure 2 (This is the circuit diagram of the
module).
During sound recording, sound is picked up by the microphone. A
microphone pre-amplifier amplifies the voltage signal from the
microphone. An AGC circuit is included in the pre-amplifier, the
extent of which is controlled by an external capacitor and resistor.
If the voltage level of a sound signal is around 100 mV peak to-
peak, the signal can be fed directly into the IC through ANA IN pin
(pin 20). The sound signal passes through a filter and a sampling
and hold circuit. The analogue voltage is then written into non-
volatile flash analogue RAMs. It has a 28 pin DIP package. Supply
voltage is between 4.5V to 6.5V.
During recording and replaying, current consumption is 25 mA. In
idle mode, the current drops to 1 mA.
53. ii
TYPICAL CONNECTION OF APR9600
APR9600 MODULE
The circuit diagram of the module is shown in Figure 2. The module consists of an
APR9600 chip, an electrets microphone, support components, a mode selection
switch (-RE, MSEL1, MSEL2 and – M8) and 9 keys (-M1 to –M8 and CE). The
oscillation resistor is chosen so that the total recording period is 60 seconds with a
sampling rate of 4.2 kHz.
Users can change the value of the ROSC to obtain other sampling frequencies. It
should be noted that if the sampling rate is increased, the length of recording time is
decreased. Table 3 gives the details. An 8-16 Ohm speaker is to be used with the
module. Users can select different modes using the mode selection switch.
The module is measured 80mm´55mm. Connection points (0-8, C and B) can connect
to other switches or external digital circuits. In this cased, on-board keys M1 to M8
and CE are by-passed.
54. ii
Application tips
1. Use a good quality 8 Ohm speaker with a cavity such as speakers for
computer sound systems. Do not use a bare speaker which gives you degraded
sound.
2. For better sound replay quality, speak with a distance to the on-board
microphone and speak clearly. Also keep the background noise as low as
possible.
3. For even better sound replay quality, use microphone input or Audio Line In
input. If Audio Line In is used, the amplitude of input signal should be < 100
mV p-p.
55. ii
BLOCK 6: MPLAB COMPILER
ABOUT MPLAB COMPILER:
The MPLAB X IDE is the new graphical, integrated debugging tool set for all of
Microchip’s more than 800 8-bit, 16-bit and 32-bit MCUs and digital signal
controllers, and memory devices.
It includes a feature-rich editor, source-level debugger, project manager, software
simulator, and supports Microchip’s popular hardware tools, such as the MPLAB ICD
3 in-circuit debugger, PICkit™ 3, and MPLAB PM3 programmer.
Based on the open-source NetBeans platform, MPLAB X runs on Windows® OS,
MAC® OS and Linux, supports many third-party tools, and is compatible with many
NetBeans plug-ins.
MPLAB IDE v8
What is MPLAB IDE?
MPLAB Integrated Development Environment (IDE) is a free, integrated toolset for the
development of embedded applications employing Microchip's PIC®
and
dsPIC®
microcontrollers. MPLAB IDE runs as a 32-bit application on MS Windows®
, is easy
to use and includes a host of free software components for fast application development and
super-charged debugging. MPLAB IDE also serves as a single, unified graphical user
interface for additional Microchip and third party software and hardware development tools.
Moving between tools is a snap, and upgrading from the free software simulator to hardware
debug and programming tools is done in a flash because MPLAB IDE has the same user
interface for all tools.
Don't know where to start?
Download MPLAB IDE and use the tutorial in the MPLAB IDE User’s Guide at the bottom
of this page to explore how easy it is to create an application. Write assembly code, build and
assemble your project with MPLAB's wizards, then test your code with the built-in simulator
and debugger. When you are ready to test your own application, select one of our low-cost
debugger/programmers to program a device and analyze your hardware.
56. ii
Want to write your code in C?
Choose MPLAB C Compilers, the highly optimized compilers for the PIC18 series
microcontrollers, high performance PIC24 MCUs, dsPIC digital signal controllers and
PIC32MX MCUs. Or, use one of the many products from third party language tools vendors.
Most integrate into MPLAB IDE to function transparently from the MPLAB project
manager, editor and debugger.
Want to know more?
See the Microchip Web Seminars for up-to-date information on using Microchip products.
The archive section contains the Introduction to MPLAB IDE Web Seminar for a tutorial
that will get you started quickly with MPLAB projects. There is also an Overview of
Microchip Development Tools Seminar, and a walk-through of the powerful features of the
simulator and stimulus generator.
MPLAB IDE features include:
57. ii
Flexible customizable programmer's text
editor
Free components
Fully integrated debugging with
right mouse click menus for
breakpoints, trace and editor
functions
Tabbed editor option or separate
source windows
Recordable macros
Context sensitive color
highlighting for assembly, C and
BASIC code readability
Mouse over variable to instantly
evaluate the contents of variables
and registers
Set breakpoints and
tracepoints directly in editor to
instantly make changes and evaluate
their effects
Graphical project manager
Version control support for MS
Source Safe, CVS, PVCS,
Subversion
Programmer’s text editor
MPLAB SIM, high speed software
simulator for PIC and dsPIC devices with
peripheral simulation, complex stimulus
injection and register logging
Full featured debugger
MPASM™ and MPLINK for PIC MCUs
and dsPIC DSC devices
HI-TECH C PRO for PIC10/12/16 MCU
Families running in lite mode
CCS PCB C Compiler
Labcenter Electronic’s Proteus
VSM spice simulator
Many Powerful Plug-Ins including
○ AN851 Bootloader programmer
○ AN901 BLDC Motor Control Interface
○ AN908 ACIM Tuning Interface
○ KeeLoq support
○ Real Time Data Monitor and Control
Simple, powerful source level debugging Built in support for hardware and add-on
components
Auto alignment of
breakpoints after source code
modification
Mouse-over variable inspection
Drag and drop variables to watch
windows
Watch variables, structures and
MPLAB C Compilers (free student
editions available for download)
MPLAB REAL ICE™ in-circuit emulator
MPLAB ICD 2 and MPLAB ICD 3 in-
circuit debuggers and engineering
programmers for selected Flash devices
PICkit 2 and PICkit 3 Debug
58. ii
arrays
Mixed source code/disassembly
view
Stack symbolic return label
display
Automatic single-step "animate"
feature
Pass counts and break on PIC18F,
PIC24 and dsPIC file register R/W
for MPLAB ICD 2
Step-Out-Of function
Custom hot keys
Powerful simulator stimulus
generator
Trace to source correlation to
compare real time data collected
with original source code and
comments
Express economy debug/programmers
PICSTART Plus development
programmer
MPLAB PM3 device programmer
Third Party tools, including HI-TECH,
IAR, Byte Craft, B. Knudsen, CCS,
Micrium, microEngineering Labs,
Labcenter, MATLAB, Segger
A host of low cost starter boards,
demonstration and evaluation kits
60. ii
clc;
close all
clear all
%%%% TAKE THE INPUT IMAGE FROM THE CAMERA %%%
warning off;
vid = videoinput('winvideo',1,'YUY2_640x480');
preview(vid);
%% FACE DETECTION BY VIALO JONES ALGORITHM
FDetect = vision.CascadeObjectDetector;
for ii=1:50
pause(15);
b1 = getsnapshot(vid);
b = YUY2toRGB(b1);
figure,imshow(b);
%Returns Bounding Box values based on number of objects
BB = step(FDetect,b);
if ~isempty(BB)
61. ii
hold on
for i = 1:size(BB,1)
rectangle('Position',BB(i,:),'LineWidth',5,'LineStyle','-
','EdgeColor','r');
end
title('Face Detection');
Face = imcrop(b,BB);
figure,imshow(Face);title('face detected image')
Face=imresize(Face,[160,160]);
hold off;
b1=Face;
%imwrite(Face,'im.jpg');
%% GRAYSCALE CONVERSION
[m,n,o]=size(b1);
if o==3
im=(rgb2gray(b1));
else
im=(b1);
end
figure,imshow(im);
63. ii
%[g,g1]=max(f1);
cd ..
%{
%% SIFT ALGORITHM
sigmae=1.6;
ev=1;
[KP,KPL,KPORI,KPMAG,KPD] = SIFT(I1,sigmae,ev);
figure,imshow(I1);
title('keypoint extraction of input image');
%% KEYPOINT SHOW
for i=1:length(KP)
ab1=KPL(i,2);
ab2=KPL(i,1);
ab=[ab1,ab2];
viscircles(ab,5);
end
65. ii
% temp=cell(1,1);
% temp{1,1}=test_feat;
%% MATCHING PROCESS
load template;
M=[];
N=[];
for i=1
in_feat=temp;
ma_feat=matchFeatures(in_feat,test_feat);
M=[M,length(ma_feat)];
end
if ff<=0.30 || M<=0
fprintf('UnAuthorized person n');
elseif aa==1 || ff<=0.09
fprintf('UnAuthorized person n');
%}
if ff>=0.4
fprintf('GOWTHAM n')
66. ii
ccf=3;
else
fprintf('UnAuthorized person')
end
else
%disp('input image is not clear');
b2=rgb2gray(b);
s=imresize(b2,[512,512]);
figure,imshow(s);
s1=im2bw(s);
figure,imshow(s1);
s2=bwareaopen(s1,40);
figure,imshow(s2)
s3=bwconncomp(s2);
nn=s3.NumObjects
if nn<=4
disp('mobile')
ccf=4;
elseif nn>=5 && nn<=8
disp('table');
67. ii
ccf=2;
elseif nn>=9 && nn<=20
disp('chair');
ccf=1;
else
disp('unwanted content');
end
end
%% HARDWARE
instrumentObjects=instrfind; % don't pass it anything - find all of
them.
delete(instrumentObjects)
a=serial('COM1','BaudRate',9600);
fopen(a);
if ccf==1
fprintf(a,'1');
elseif ccf==2
fprintf(a,'2');
elseif ccf==3
fprintf(a,'3');
69. ii
CONCLUSION
The aim of this project work undertaken in our
polytechnic is to improve our practical knowledge and to
implement our creativity in scientific and technical way.
The project work teaches us, how the work can be done
collectively with proper understanding among the
members of the team.
We have successfully completed the project. We have
made this project entirely different from the rest. Since
concepts involved is entirely different that based blind
person to find the person or way without anyone help with
the use of pic micro controller and the web camera, which
makes our project a unique.
By doing this project we gained knowledge of pic micro
controller based systems and knew many things related to
our project`
In this way, we can conclude that this project idea will
take a major role in our science world to give a confidential
survive for a blind person.