C H A P T E R 1 INTRODUCTION

Similar documents
8-bit Microcontroller with 8K Bytes In-System Programmable Flash AT89S52

CHAPTER 1 MICROCOMPUTER SYSTEMS. 1.1 Introduction. 1.2 Microcontroller Evolution

DTMF BASED INDUSTRIAL AUTOMATION

1. Pin diagram of 8051 and ports

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture

8051 Microcontroller

Module I. Microcontroller can be classified on the basis of their bits processed like 8bit MC, 16bit MC.

MODEL ANSWER SUBJECT- MICROCONTROLLER(12187) CLASS-EJ5E CLASS TEST-02 Q1.)Attempt any THREE of the following.

8051 Microcontroller

Microcontroller Based Code Locking System with Alarm

FACULTY OF ENGINEERING LAB SHEET

ISSI. IS89C51 CMOS SINGLE CHIP 8-BIT MICROCONTROLLER with 4-Kbytes of FLASH ISSI IS89C51 NOVEMBER 1998 FEATURES GENERAL DESCRIPTION

Three criteria in Choosing a Microcontroller

A TECHNICAL REVIEW ON DTMF BASED ELECTRONIC VOTING MACHINE

Engr. A. N. Aniedu Electronic and Computer Engineering Nnamdi Azikiwe University, Awka

Introduction To MCS-51

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

8-Bit Microcontroller with 1K Bytes Flash. AT89C1051U Preliminary. Features. Description. Pin Configuration

8-Bit Microcontroller with 2K Bytes Flash AT89C2051. Features. Description. Pin Configuration

DTMF BASED HOME AUTOMATION

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1

8051 I/O and Class 6 EE4380 Spring 03. Pari vallal Kannan. Center for Integrated Circuits and Systems University of Texas at Dallas

MCS-51 Serial Port A T 8 9 C 5 2 1

Keywords Digital IC tester, Microcontroller AT89S52

Address connections Data connections Selection connections

Experiment# 8: Photo-Interrupter Control

Applications of 8051 Microcontrollers

3 PHASE FAULT ANALYSIS WITH AUTO RESET FOR TEMPORARY FAULT AND TRIP FOR PREMANENT

Microcontrollers can be considered as self-contained systems with a processor, memory and I/O ports.

8-Bit Microcontroller with 8K Bytes Flash AT89S8252. Features. Description

Chapter 09. Programming in Assembly

PREPAID ENERGY METER

Department of EIE / Pondicherry Engineering College. Timer/Counters. Department of EIE / Pondicherry Engineering College 1

Microcontroller and Embedded Systems:

8051 Timers and Serial Port

AT89C Bit Microcontroller with 2 Kbytes Flash. Features. Description. Pin Configuration


e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text

EE6502- MICROPROCESSOR AND MICROCONTROLLER

8051 I/O and 8051 Interrupts

AT89S4D12. 8-Bit Microcontroller with 132K Bytes Flash Data Memory AT89S4D12. Features. Description. Pin Configurations

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

SECURE DIGITAL ACCESS SYSTEM USING IBUTTON

ET2640. Unit 5:ADVANCED I/O TECHNIQUES Pearson Education, Inc. Pearson Prentice Hall Upper Saddle River, NJ 07458

CPEG300 Embedded System Design. Lecture 8 Timer

Transmission Line Security System Based on RFID and GSM Technology

P1.0 P P0.0 (AD0) P1.2 P P0.1 (AD1) P P0.2 (AD2) P P0.3 (AD3) P P0.4 (AD4) P P0.

I. INTRODUCTION II. METHODS AND MATERIAL

8051 Microcontroller memory Organization and its Applications

CoE3DJ4 Digital Systems Design. Chapter 6: Interrupts

Microcontrollers. Fig. 1 gives a comparison of a microprocessor system and a microcontroller system.

INTERRUPTS PROGRAMMING

Question Bank Microprocessor and Microcontroller

P1.0 P P0.0 (AD0) P1.2 P P0.1 (AD1) P P0.2 (AD2) P P0.3 (AD3) P P0.4 (AD4) P P0.

The 8051 microcontroller has two 16-bit timers/counters called T0 and T1.

8-Bit Microcontroller with Flash. Application Note. Controlling FPGA Configuration with a Flash-Based Microcontroller

Mechatronics and Measurement. Lecturer:Dung-An Wang Lecture 6

3. The MC6802 MICROPROCESSOR

Chapter C2051 Architecture and Serial Communication Link

80C51GB, 83C51GB, 87C51GB SPECIFICATION UPDATE

ELEG3923 Microprocessor Ch.9 Timer Programming


Ali Karimpour Associate Professor Ferdowsi University of Mashhad

80C51FA/83C51FA EVENT-CONTROL CHMOS SINGLE-CHIP 8-BIT MICROCONTROLLER Automotive

The Timers/Counters The Serial Interface The Interrupt System Reset P0.0-P0.7 P2.0-P2.7. Port 2 Drivers. Port 2 Latch

REMOTE POWER MONITORING SYSTEM USING MICROCONTROLLER

ET2640 Microprocessors

ericssonz LBI-38616B MAINTENANCE MANUAL FOR MTD TM SERIES AND DATA RADIO LOGIC BOARD 19D902151G3 DESCRIPTION CIRCUIT ANALYSIS TABLE OF CONTENTS

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Rev. No. History Issue Date Remark

AT Bit Spread- Spectrum Microcontroller. Preliminary. Features. Description. Pin Configuration

Bachelor of Engineering in Computer and Electronic Engineering

2. Write an 8051 program to generate a square wave of 25 khz at pin P2.3 using XTAL = 12 MHz. Solution:


MICROPROCESSORS AND MICROCONTROLLERS MATERIAL. Features of 8051:

80C51 Block Diagram. CSE Overview 1

Serial I-O for Dinesh K. Sharma Electrical Engineering Department I.I.T. Bombay Mumbai (version 14/10/07)

Lecture 14. Ali Karimpour Associate Professor Ferdowsi University of Mashhad

UNIT IV MICROCONTROLLER

Alexandria University Faculty of Engineering Communications & Electronics Department.

Interrupt Programming: Interrupts vs. Polling Method:

8-Bit Microcontroller with 12K Bytes Flash AT89LS53. Features

~: Simple Programs in 8051 assembly language :~

8051 MICROCONTROLLER

Introducing The MCS 251 Microcontroller -- 8XC251SB

Chapter 3. Bit Addressable Area. By DeccanRobots

UNIT - II PERIPHERAL INTERFACING WITH 8085

INTERFACING 16 2 LCD WITH 8051

8051 Timers. Class 7 EE4380 Fall Pari vallal Kannan. Center for Integrated Circuits and Systems University of Texas at Dallas

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

POWER SAVER METER USING MICROCONTROLLER TO SAVE ELECTRICITY UPTO 30-40%

PDIP P1.0 P P0.0 (AD0) P1.2 P P0.1 (AD1) P P0.2 (AD2) P P0.3 (AD3) P P0.4 (AD4) P P0.

b. List different system buses of 8085 microprocessor and give function of each bus. (8) Answer:

Chapter 6 Interrupts. (I. Scott Mackenzie) By: Masud-ul-Hasan

Department of Electronics and Instrumentation Engineering Question Bank

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

ALE/PROG# is pulsed low during programming,

MICROCONTROLLER BASED AUTOMATIC PLANT IRRIGATION SYSTEM

CPEG300 Embedded System Design. Lecture Interface with Peripheral Devices

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

Transcription:

C H A P T E R 1 INTRODUCTION The mentioned project is based on the worlds most powerful intel controller 8051. Most of the services provided in todays world are voice interactive, you call up your bank and computerised voice will speak to you, and guide you to enter a particular number from your phone to get the desired service. So this project is give the basic idea that how we can remotely control the industrial applications with use of mobile phone. You can switch on/off devices using your mobile phone or land line phone eight numbers loads can be connected to the eight relay provided. Here in this project we are going to connect 3 relay with controller. And with this relay we can connect any type of load. Suppose you own a company and are three or more partners and are always travelling. You have an office located some where. And have a main server you donot want that somebody other then your partner should handle this server due to security reason. At the same time you donot want to keep your server all the time on so ther this device comes to your help only requirement for this device is a parallel telephone connection. and of course power supplay.you can switch on your server remotely from any where in the world. Whenyou dial the number where this device is connected with the server, after some time the phone will automatically pic up. Then you have to enter the password. When you enter the password. If your password is correct then device will further respond otherwise it will not give any further response. Now if your password is correct and you will enter any number from the remote mobile it will decode that number and give different hax output for every number and according to that the particular relay will work and corresponding divice connected with that relay will turn on for particular time which is already define in program then that device will automatically turn off. As we disconnect the mobile the circuit will disabled and wait for the next call. 1

CHAPTER 2 BLOCK DIAGRAM THIS DEVICE HAS THE FOLLOWING BLOCKS 1. Dtmf decoder ic mt 8870 2. Microcontroller circuit the central processor 89c51 3. Not gate 74LS04 4. Mobile interfacing 2

2.1 DTMF DECODER MT8870: This circuit detects the dial tone from a telephone line and decodes the keypad pressed on the remote telephone. The dial tone we heard when we pick up the phone set is call Dual Tone Multi-Frequency, DTMF in short. The name was given because the tone that we heard over the phone is actually make up of two distinct frequency tone, hence the name dual tone. The DTMF tone is a form of one way communication between the dialer and the telephone exchange. A complete communication consist of the tone generator and the tone decoder. In this article, we are use the IC MT8870DE, the main component to decode the input dial tone to 5 digital output. These digital bits can be interface to a computer or microcontroller for further application (eg. remote control, phone line transfer operation, etc...). As technology matures, pulse/dial tone method was inverted for telephony communication. It uses electronics and computer to assist in the phone line connection. Basically on the caller side, it is a dial tone generator. When a key is being pressed on the matrix keypad, it generate a unique tone consisting of two audible tone frequency. For example, if the key '1' is being press on the phone, the tone you hear is actually consist of a 697hz & 1209hz sine signal. Pressing key '9' will generate the tone form by 852hz & 1477hz. The frequency use in the dial tone system is of audible range suitable for transmission over the telephone cable. On the telephone exchange side, it has a decoder circuit to decode the tone to digital code. For example, the tone of 941hz + 1336hz will be decoded as binary '1010' as the output. The dtmf decoder produce the frequency as per the following table: 3

1209 Hz 1336 Hz 1477 Hz 1633 Hz 697 Hz 1 2 4 A 770 Hz 4 5 6 B 852 Hz 7 8 9 C 941 Hz * 0 # D Table 2.1.1 frequency produced by different no Now after detecting the particular frequency it will convert it in to hex. Detection of dial tones is reflected on the bit TOE, while the output Q4, Q3, Q2, Q1 indicate the dial tone that is being detected on the telephony system. A complete table of the decoded digital output for individual dial tone is as per the following table. Key Tone Output Logic Q4 Q3 Q2 Q1 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 8 1 0 0 0 9 1 0 0 1 0 1 0 1 0 * 1 0 1 1 # 1 1 0 0 A 1 1 0 1 B 1 1 1 0 C 1 1 1 1 D 0 0 0 0 Table 2.1.2 output provided by different no Now output of dtmf decoder will given to the microcontroller. 4

CHAPTER 3 CIRCUIT DIAGRAM 5

3.1 CIRCUIT DESCRIPTION : As shown in circuit diagram the mobile phone will connected to dtmf decoder via 0.1u capacitor and 100k resistor with the use of handsfree. In the basic configuration the pin no 1 and 4 are shorted.we give input at pin no 2.the pin no 2 and 3 are shorted.pin no 5,6 and 9 are connected to gnd. Connect vcc to pin no 18.connect ristor of 330k between 16 and 17 no pin.pin no 17 is connected to VCC via 0.1uf capacitor. Crystal of 3.57mhz is connected between pin no 16 and 17.and both pins are connected to gnd via 22pf capacitor. We get output at pin no 11,12,13 and 14. Connect led with all this output pins. Connect led at pin no 15 also bcoz it will becom high when no is dialled. As per the circuit diagram do the basic connection of microcontroller. Then connect the output of the dtmf to the pin no p1.1,p1.2 and p1.3. connect output of pin no 15 of dtmf decoder to the pin no p3.2 of controller. Also connect output to the leds. Leds are connected to gnd via 1k resistor. We get output at pin no p2.1,p2.2 and p2.3. connect the output to the led(same for all 3 output). Connect emitter to gnd and collector to 5volt. We have to give separate supply for both 8870 and at89c51. Connect all supply through 1k resistor. 6

3.2 OPERATION : The input is given to the pin no 2 of the dtmf decoder which is the non inverting input of the op-amp. The inverting and gain adjusting pins are shorted. Then it will converted in to hex code by ADC converter. That output we get at pin no 11,12,13 and 14. The leds are connected to it so we can see the output of dtmf decoder. There is pin no 15 which will going to be high every time when we press no. It is connected to the pin no 13 of the controller which is the pin of external interrupt 1. When no is pressed on the remote mobile this pin will goes high so interrupt will occur and the input is scanned and check which no is pressed according to that it will give output at port no 2. This pins are connected to microcontroller so input is given to the controller First of all it will check for the password if password is wrong then it will go out of the program. And if password is right then it will procedure further. If we press 1 the pin no p2.0 will goes high. If we press 2 the pin no p2.1 will goes high. If we press 4 the pin no p2.2 will goes high. We can see the output at port 2 bcoz we connected the leds with it. 7

2.2 MICROCONROLER AT89C51; Features Compatible with MCS-51 Products 4K Bytes of In-System Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles Fully Static Operation: 0 Hz to 24 MHz Three-level Program Memory Lock 128 x 8-bit Internal RAM 32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Programmable Serial Channel Low-power Idle and Power-down Modes 8

Description: The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4Kbytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel s high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. In this project we mainly use the interrupt so now we see about interrupt. Port 3 is an 8-bit bi-directional I/O port with internal pullups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by The internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of various special features of the AT89C51 as listed below: Port 3 also receives some control signals for Flash programming and verification. RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. ALE/PROG Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE Port Pin Alternate Functions P3.0 RXD (serial input port) P3.1 TXD (serial output port) P3.2 INT0 (external interrupt 0)(used in project) P3.3 INT1 (external interrupt 1) P3.4 T0 (timer 0 external input) P3.5 T1 (timer 1 external input) P3.6 WR (external data memory write strobe) P3.7 RD (external data memory read strobe) 9

Interrupt enable sfr: bit description symbol B7 enable all interrupts B6 reserved B5 reserved B4 enable serial port interrupt B3 enable timer 1 interrupt B2 enable external interrupt 1 B1 enable timer 0 interrupt B0 enable external interrupt 0 EA(used bit) ES ET1 EX1 ET0(used bit) EX0 And we use port 1 as input port to take input from the dtmf decoder. We use port 2 as output port to give the output to the realy driver circuit. 2.3 NOT GATE 74LS04: 10

7404 is a NOT gate IC. It consists of six inverters which perform logical invert action. The output of an inverter is the complement of its input logic state, i.e., when input is high its output is low and vice versa. It is very easy to use we have to just give vcc to pin no 14 and gnd to pin no 7. It has 6 input pins. So we can maximum invert 7 inputs. At the output we get tnverted output. 2.4 MOBILE INTERFACING: For this purpose we use the handsfree of that particular mobile phone. Cut one of the earburd.there will be two wires, from that one(green) is ring and other(black) is ground. Connect green to the input of dtmf decoder and ground other one. 11

2.5 ALGORITHM : Wait for the phone If call arrived the remote phone the system will answer automatically in 5 second. After that system will check the password. If correct then procedure farther and if wrong then system will not respond. After that if we press 1 corresponding led will glow. If we disconnect the phone the whole system will disable. 12

CODE IN ASSEMBLY LANGUAGE org 0000h mov r1,#00h int:mov p1,#0ffh mov p2,#00h mov ie,#84h h1:sjmp h1 sjmp int org 0013h inc r1 cjne r1,#01h,lol sjmp pw lol: mov a,p1 mov b,a anl a,#01h cjne a,#00h,l2 setb P2.0 call delay clr P2.0 sjmp e l2: clr a mov a,b anl a,#02h cjne a,#00h,l3 setb P2.1 call delay clr p2.1 sjmp e l3:clr a 13

mov a,b anl a,#04h cjne a,#00h,e setb P2.2 call delay clr P2.2 sjmp e clr a delay: MOV R0, #51h AGN:MOV TMOD, #01H MOV TH0, #00H MOV TL0, #00H SETB TR0 IRR:JNB TF0, IRR CLR TF0 DJNZ R0, AGN RET pw: mov a,p1 mov b,a anl a,#01h cjne a,#00h,over reti e: reti over: end 14