Report Title: Digital Voltmeter using 89C51

Similar documents
Microprocessors 1. The 8051 Instruction Set. Microprocessors 1 1. Msc. Ivan A. Escobar Broitman

Microcontroller Intel [Instruction Set]

8051 Microcontroller

Digital Blocks Semiconductor IP

Programming of 8085 microprocessor and 8051 micro controller Study material

Timer-1 can be run using the internal clock, fosc/12 (timer mode) or from any external source via pin T1 (P3.5) (Counter mode).

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Digital Blocks Semiconductor IP

Digital Blocks Semiconductor IP

Instruction Set Of 8051

8051 Overview and Instruction Set

Q. Classify the instruction set of 8051 and list out the instructions in each type.

Application Brief D-005

UNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING

TUTORIAL Assembly Language programming (2)

INSTRUCCIONES ARITMETICAS ERROR! MARCADOR NO DEFINIDO.

Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples.

Module Contents of the Module Hours COs

Dodatak. Skup instrukcija

Microcontroller. Instruction set of 8051

UNIT THE 8051 INSTRUCTION SET AND PROGRAMMING

Programming Book Microcontroller Kit. Rev 3.0 January, Wichit Sirichote

SN8F5000 Family Instruction Set

DR bit RISC Microcontroller. Instructions set details ver 3.10

Assembly Language programming (2)

Principle and Interface Techniques of Microcontroller

CPEG300 Embedded System Design. Lecture Interface with Peripheral Devices

ELEG3923 Microprocessor Ch.6 Arithmetic and Logics

Lab-Report Microprocessors

8051 Programming using Assembly

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

Highlights. FP51 (FPGA based 1T 8051 core)


MASSEY UNIVERSITY PALMERSTON NORTH CAMPUS

Embedded Controller Programming

NAME as31 - An Intel 8031/8051 assembler. SYNOPSIS as31 [-h] [-l] [-s] [-v] [-Aarg] [-Ffmt] [-Ofile] infile.asm

1. Write A Program to move a block of data within the internal RAM

8051 Microcontrollers

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 9 Simple I/O Interfacing

Dragonchip. Instruction Set Manual

~: Simple Programs in 8051 assembly language :~

8051 Microcontroller Assembly Programming

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

MICROCONTROLLER BASED WATER LEVEL CONTROL SYSTEM

Principle and Interface Techniques of Microcontroller

Interfacing ahantronix 128x64 Graphic Module to an 8-bitMicrocontroller

TUTORIAL. Donal Heffernan University of Limerick May Tutorial D.Heffernan 2000,

Application Brief D-002

INTERFACING 16 2 LCD WITH 8051

CW6631B Bluetooth Audio Player Microcontroller User Manual

Microcontroller Lab Manual

Unit-I. 1. INTRODUCTION TO MICROCONTROLLERS. Micro controller, types, selection of a microcontroller and applications

What Registers are available? Programming in Assembler. Assembler Programming - like early Basic. Assembler Data Movement Instructions

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

FlashFlex51 Microcontroller Control of CompactFlash Card in TrueIDE Mode

Introduction to uc & Embedded Systems

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5

Control Transfer Instructions Jump, Loop, and Call. ECE473/573 Microprocessor System Design, Dr. Shiue

Assembly Language programming (3)

C51 Family. Architectural Overview of the C51 Family. Summary

Contents. Join the Technical Community Today!

UNIT-III ASSEMBLY LANGUAGE PROGRAMMING. The CPU can access data in various ways, which are called addressing modes

Lecture 5. EEE3410 Microcontroller Applications Department of Electrical Engineering Assembly Language Programming (1)

S.J.P.N Trust's. Hirasugar Institute of Technology, Nidasoshi.

AL8051S 8-BIT MICROCONTROLLER Application Notes

To Produce a Bidirectional, Speed Regulated Moving Message Display by Using the SAB80515/SAB80535's Timer 2 & 8-Bit Converter

Microcontroller and Applications

8051 Core Specification

8051 Single Board Monitor Programming. Minmon - Yeralan & Ahluwalia. PaulMon1 & PaulMon2 - Paul Stoffregen

FACULTY OF ENGINEERING LAB SHEET

D: arc SRC KUT51 KUT51LCD.LST KUT51LCD PAGE 1

UNIT MICROCONTROLLER AND ITS PROGRAMMING

80C51 family programmer s guide and instruction set. 80C51 Family. PROGRAMMER S GUIDE AND INSTRUCTION SET Memory Organization. Philips Semiconductors

Chapter 3. Bit Addressable Area. By DeccanRobots

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

8051 Microcontroller Logical Operations. Prepared by : A. B. Modi Target Audience : 5 th Semester Students

Alexandria University Faculty of Engineering Communications & Electronics Department.

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller Subject Code:

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

LCM12232A LCM12232A. 122 x 32 1/32D STN( EL / 100VAC 400HZ LED / 4.2VDC

Department of Electronics and Instrumentation Engineering Question Bank

Vidyalankar T.E. Sem. V [ETRX] Microprocessors and Microcontrollers I Prelim Question Paper Solution

Hardware Setups for Communication with a DS1267

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

WZMICRO>COM

ET2640 Microprocessors

build_char macro P1,P2,P3,P4,P5,P6,P7,P8 ;Macro for building a custom character


Data Acquisition Using INS8048

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) SUMMER 14 EXAMINATION Model Answer

Y51 Microcontroller. Technical Manual

Assembly Language programming (1)

Question Bank Microprocessor and Microcontroller

8051 Interfacing and Applications Microcontroller

MICROCONTROLLER LAB Version 1.0 Aug 2017

MASSEY UNIVERSITY PALMERSTON NORTH CAMPUS

;~~~~~~~~~~~~ ;P4-6-1.ASM ~ ;~~~~~~~~~~~~ SYMBOLS RS REG P2.0 EN REG P2.1 PICK REG P3.0 RELAY0 REG P3.1 RELAY1 REG P3.6 RELAY2 REG P3.

Vector-based Pong on an Oscilloscope

3. (a) Explain the steps involved in the Interfacing of an I/O device (b) Explain various methods of interfacing of I/O devices.

Embedded World Television, Radio, CD player, Washing Machine Microwave Oven Card readers, Palm devices

Transcription:

VIVEKANAND EDUCATION SOCIETY'S INSTITUTE OF TECHNOLOGY Approved by AICTE & Affiliated to Mumbai University ELECTRONIC WORKSHOP - 2 REPORT Report Title: Digital Voltmeter using 89C51 PROJECT MEMBERS: 1. Ajay Patkar 59 2. Prasad Pawaskar 61 3. Vishal Thakur 74

Digital Voltmeter Using 89C51 Micro controller Prasad Pawaskar Electronics T.E. Vivekanand Institute Of technology Mumbai Ajay Patkar Electronics T.E. Vivekanand Institute Of technology Mumbai Vishal Thakur Electronics T.E. Vivekanand Institute Of technology Mumbai Abstract Digital voltmeter as the name suggests is a microcontroller based project. The main objective of this paper is to perform a project to get digital voltage reading from an analog source and display the voltage value digitally on a LCD display. Index Terms Introduction, Working Principle.Block Diagram, Circuit Diagram, Circuit Explanation, Features, Advantages, Disadvantages, Conclusion. I. INTRODUCTION The digital voltmeter basically is the model of demonstrating the use of analog to digital converter with the most popular micro controller IC 89C51. The basic schematical layout of this project is as shown in fig a. This circuit consists of following components: 1. 89C51 Based Controller: 1 2. ADC0804: 1 3. LCD 16x1: 1 4. Potentiometer 10K: 1 5. Resistor 10K: 2 6. Resistor 200K: 1 7. Resistor 100K: 1 8. Capacitor 33pF: 2 9. Capacitor 10uF: 1 10. Capacitor 150pF: 1 11. Capacitor 100nF: 1 12. Crystal 12Mhz: 11 What we have done is simply interface an ADC to a 89C51 and a LCD display to the output ports of 89C51. Thus, the ADC takes in input analog voltage and converts it to digital while 89C51 displays it on the LCD display

ADC i.e. it reads the output of the ADC. While on the other hand it gives output to the LCD or in other words 89c51 drives the LCD unit Voltage reference This is a simple voltage divider network that is used to get input to the input pins of the ADC. L C D driver The micro controller itself acts as the LCD driver unit. L C D Section II. Circuit Explanation The circuit shown in fig. is explained as follows showing the operation of each component: ADC This is used to convert the analog input voltage to digital output voltage. As seen in the figure a. the input probes i.e. Probe+ and Probe- are connected to the IN+ and INterminals of the ADC through a voltage divider circuit. The 8 bit output is connected to the Port 1.0 to Port pins P1.7. RD, WR, CS and INTR are interfaced with RD WR T1 T0 of 89c51 respectively. The o/p of ADC is 8 bit digital representation of the input analog voltage. Micro controller 89c51 The LCD forms the output of the project. The digital voltage received by the micro controller as to be converted into some particular limit so that it can be displayed on the LCD. The output available on LCD is the digital representation of the analog input voltage. The inputs to it are the 8 bit digital output from the micro controller. III. Block diagram The operation of the entire circuit can be shown as follows in the form of following block diagram: Analog Input Micro controller L C D The micro controller 89c51 forms the basic heart of the project. It gets input from the

Fig b. Block Diagram 1. Analog Input This is the input section of project. We apply analog voltage to positive and negative terminal of ADC. This voltage is applied to voltage divider network. 2. Micro controller: This section provides controlling of digital voltage that is applied to ADC.The digital voltage which is taken from the ADC is compared to the reference level set in the micro controller. Port 1 is used as input port. Port 2 is used as output port. Port 3 is used as control signals. Port 0 is not used. 3. LCD: observations of the voltage value on the LCD panel. Rather, if an AC input voltage is given at the input terminals, the output varies indefinitely as is the nature of AC voltage. Thus, the instantaneous value of the AC voltage is not steadily shown on the LCD panel. V. Applications Of DVM Used in conversion of analog voltage to digital voltage. In Laboratories for displaying digital voltage. It is used in applications where we require high accuracy. LCD is used to display digital output. It is the output section of the project. VI. Advantages IV. Working Of Circuit This project aims at building a Digital Voltmeter using an 8051microcontroller. All the data accessed and processed by them microcontroller is the digital data. And thus, the usage of an analog to digital converter finds its necessity here. A standard analog to digital converter ADC0804 is used in the current project. The input voltage (which is the analog input)is restricted to be in the range of 0 15V. The processed data in the 8051 is used to drive a display output on a LCD display unit. The display is in the form of digits and is accurate to a value of one decimal. The input voltage is desired to be that of a DC voltage for steady The digital voltmeter designed uses a microcontroller which is said to be highly efficient in handling the data carrier operation in terms of being faster and being error free and accurate. Thus, it can be considered as a reliable device for observing voltages of magnitudesfrom0 to 14V. Rather than using the obsolete analogue ways of finding out the voltages, the digital voltmeter provides much more precise and accurate values of voltages in a given circuit in the range of the voltmeter.

VII. Calculation IX. Future Scope All we want is input voltage to ADC should not increase 5V and our maximum input voltage to voltmeter is 15V only. So we design the voltage divider circuit as follows. V max is Maximum input voltage to voltmeter. V ip is input voltage to ADC. R 1 and R 2 are resistance of voltage divider circuit. V max = 15V V = R 2 *V max /(R 1 +R 2 ) This project can be further improved by adding an Atmega8 IC technology to it and also making scope for measurement of very slight change by adding more decimals. 5/15 = R 2 /R 1 +R 2 3 = R 1 /R 2 +1 2 = R 1 /R 2 R 2 = R 1 /2 Let s take R 1 as 200K and R 2 will be 100K Maximum current: I max = (V max V i/pmax )/R 1 (approx) V max = 15V V i/pmax = 5V R 1 = 200K I max = (15 5)/200 = 10/200 = 0.02mA VIII. References The following were some of the websites used to prepare this paper. 1. www.electroschematics.com 2. www.youtube.com 3. www.efy.com 4. Multisim By National Instruments

X. Code lcd_cmd equ 0800h acall start lcd_st equ 0801h lcd_wr equ 0802h acall print_hex3 lcd_rd equ 0803h DAC equ 0600h ORG 08100h DVM: mov P2, #(lcd_cmd SHR 8) mov R0, #(lcd_cmd AND 255) mov R7,#00h mov dptr, #mesg3 acall wr_string sjmp DVM Start: mov dptr,#dac mov R7,#10000000b mov a,#0 nxtbit: xrl a,r7 movx @dptr,a acall delay mov R7,#40h mov dptr, #mesg3 acall wr_string jb P3.5,keep xrl a,r7 keep: xch a,r7 clr c mov R7, #01h mov dptr, #mesg1 acall wr_string rrc a xch a,r7 jnc nxtbit cpl a mov R7, #41h ret mov dptr, #mesg2 acall wr_string wr_string: acall lcd_busy mov a, R7

orl a, #080h movx @R0, a nxt_char: acall lcd_busy clr a movc a, @a+dptr inc dptr jz str_end MOVC A,@A+PC mvcoff3a: ACALL char_from_acc POP ACC ANL A,#0FH ADD A,#HEXstring3-mvcoff3b MOVC A,@A+PC mvcoff3b: AJMP char_from_acc mov R1, #(lcd_wr AND 255) HEXstring3: movx @R1, a sjmp nxt_char DB '0123456789ABCDEF' str_end: ret Char_from_ACC: push acc acall lcd_busy lcd_busy: mov R1, #(lcd_st AND 255) movx a, @R1 jb acc.7, lcd_busy pop acc mov R1, #(lcd_wr AND 255) movx @R1, a ret ret mesg1: db "DVM Prog ",0 print_hex3: PUSH ACC mesg2: db "Voltage = ",0 mesg3: db " ",0 SWAP A ANL A,#0FH ADD A,#HEXstring3-mvcoff3a Delay: MOV R0, #05h loop1: MOV R1, #08h

loop2: DJNZ R1, loop2 DJNZ R0, loop1 ret div16_16: CLR C MOV R4,#00h MOV R5,#00h MOV B,#00h div1: INC B MOV A,R2 RLC A MOV R2,A MOV A,R3 RLC A MOV R3,A JNC div1 div2: MOV A,R3 RRC A MOV R3,A MOV A,R2 RRC A CLR C MOV 07h,R1 MOV 06h,R0 MOV A,R0 SUBB A,R2 MOV R0,A MOV A,R1 SUBB A,R3 MOV R1,A JNC div3 MOV R1,07h MOV R0,06h div3: CPL C MOV A,R4 RLC A MOV R4,A MOV A,R5 RLC A MOV R5,A DJNZ B,div2 MOV R3,05h MOV R2,04h end MOV R2,A