Displaying of Graphics on CRO through 8051 Microcontroller and Digital to Analog Converter

Similar documents
Interfacing Analog to Digital Data Converters. A/D D/A Converter 1

CCE RR REVISED & UN-REVISED KARNATAKA SECONDARY EDUCATION EXAMINATION BOARD, MALLESWARAM, BANGALORE G È.G È.G È..

4.S-[F] SU-02 June All Syllabus Science Faculty B.Sc. II Yr. Instrumentation Practice [Sem.III & IV] S.Lot

Electrical and Electronic Laboratory Faculty of Engineering Chulalongkorn University. Cathode-Ray Oscilloscope (CRO)

Decade Counters Mod-5 counter: Decade Counter:

Instructions and answers for teachers

Ocean Sensor Systems, Inc. Wave Staff III, OSSI With 0-5V & RS232 Output and A Self Grounding Coaxial Staff

LAB NAME: ELECTRONICS LABORATORY. Ammeters (0-1mA, 0-10mA, 0-15mA, 0-30mA, 0-50mA, 0-100mA,0-50µA,0-

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: DIGITAL ELECTRONICS AND DIGITAL INSTRUMENTS (Code: )

B. Sc. III Semester (Electronics) - ( ) Digital Electronics-II) BE-301 MODEL ANSWER (AS-2791)

Ocean Sensor Systems, Inc. Wave Staff, OSSI F, Water Level Sensor With 0-5V, RS232 & Alarm Outputs, 1 to 20 Meter Staff

The Micropython Microcontroller

Chapter 11 Sections 1 3 Dr. Iyad Jafar

Lab #6: Combinational Circuits Design

CATHODE RAY OSCILLOSCOPE. Basic block diagrams Principle of operation Measurement of voltage, current and frequency

THE KENYA POLYTECHNIC

University of Illinois at Urbana-Champaign

8 X 8 KEYBOARD INTERFACE (WITHOUT INTERRUPT SIGNAL)

TV Character Generator

S op o e p C on o t n rol o s L arni n n i g n g O bj b e j ctiv i e v s

Electronic Grocery Machine

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

WINTER 15 EXAMINATION Model Answer

16 Stage Bi-Directional LED Sequencer

Alice EduPad Board. User s Guide Version /11/2017

Rfid Based Attendance System

Chapter 9 MSI Logic Circuits

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver

Digital Stopwatch Timer Circuit Using 555timer and CD4033

Lab 2: Hardware/Software Co-design with the Wimp51

University of Victoria. Department of Electrical and Computer Engineering. CENG 290 Digital Design I Lab Manual

CATHODE-RAY OSCILLOSCOPE (CRO)

A 400MHz Direct Digital Synthesizer with the AD9912

Digital Electronics II 2016 Imperial College London Page 1 of 8

Log-detector. Sweeper setup using oscilloscope as XY display

Experiment # 4 Counters and Logic Analyzer

International Journal of Innovative Scientific &Engineering Technologies Research 1(2):29-41, December, 2013

Embedded System Training Module ABLab Solutions

TRAINING KITS ON DIGITAL ELECTRONIC EXPERIMENTS. Verify Truth table for TTL IC s AND, NOT, & NAND GATES

Engineering College. Electrical Engineering Department. Digital Electronics Lab

HD66766 Rev. 1.0 / 30 November 2001 HD (132 x 176-dot Graphics LCD Controller/Driver for 65K Colors)

ระบบคอมพ วเตอร และการเช อมโยง Computer Systems and Interfacing บทท 1 พ นฐานด จ ตอล

Course Plan. Course Articulation Matrix: Mapping of Course Outcomes (COs) with Program Outcomes (POs) PSO-1 PSO-2

A First Laboratory Course on Digital Signal Processing

THE STRUCTURE AND ADVANTAGES OF DIGITAL TRAINING SET FOR COMPUTER ENGINEERING

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science

Data Sheet. Electronic displays

A dedicated data acquisition system for ion velocity measurements of laser produced plasmas

Data Conversion and Lab (17.368) Fall Lecture Outline

Digital Delay / Pulse Generator DG535 Digital delay and pulse generator (4-channel)

THE NOISE PERFORMANCE OF EVALUATION BOARDS FOR A UNIVERSAL TRANSDUCER INTERFACE WITH USB CONNECTION

Lab #10: Building Output Ports with the 6811

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) WINTER 2018 EXAMINATION MODEL ANSWER

NAND/NOR Implementation of Logic Functions

LM16X21A Dot Matrix LCD Unit

Digital Fundamentals. Introduction to Digital Signal Processing

PESIT Bangalore South Campus

NORTHWESTERN UNIVERSITY TECHNOLOGICAL INSTITUTE

Quick Start. RSHS1000 Series Handheld Digital Oscilloscope

Burlington County College INSTRUCTION GUIDE. for the. Hewlett Packard. FUNCTION GENERATOR Model #33120A. and. Tektronix

Introduction to Mechatronics. Fall Instructor: Professor Charles Ume. Analog to Digital Converter

Design of VGA and Implementing On FPGA

Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop. Course project for ECE533

Digital Effects Pedal Description Ross Jongeward 10 December 2014

UNIT V 8051 Microcontroller based Systems Design

Vorne Industries. 2000B Series Buffered Display Users Manual Industrial Drive Itasca, IL (630) Telefax (630)

EPROM pattern generator with "Genlock"

TIME SCHEDULE. MODULE TOPICS PERIODS 1 Number system & Boolean algebra 17 Test I 1 2 Logic families &Combinational logic

LabView Exercises: Part II

North Shore Community College

Published in A R DIGITECH

Digital Clock. Perry Andrews. A Project By. Based on the PIC16F84A Micro controller. Revision C

-SQA-SCOTTISH QUALIFICATIONS AUTHORITY HIGHER NATIONAL UNIT SPECIFICATION GENERAL INFORMATION

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

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

Digital Networks and Systems Laboratory 2 Basic Digital Building Blocks Time 4 hours

Point System (for instructor and TA use only)

ME EN 363 ELEMENTARY INSTRUMENTATION Lab: Basic Lab Instruments and Data Acquisition

1 Hour Sample Test Papers: Sample Test Paper 1. Roll No.

AE/AC/AT54 LINEAR ICs & DIGITAL ELECTRONICS DEC 2014

ECE 372 Microcontroller Design

Notes on Digital Circuits

PCM ENCODING PREPARATION... 2 PCM the PCM ENCODER module... 4

Microcontroller Based Emergency Service Console

Converters: Analogue to Digital

Computer Organization & Architecture Lecture #5

LAB #6 State Machine, Decoder, Buffer/Driver and Seven Segment Display

Digital Systems Principles and Applications. Chapter 1 Objectives

ECE 402L APPLICATIONS OF ANALOG INTEGRATED CIRCUITS SPRING No labs meet this week. Course introduction & lab safety

MM5452/MM5453 Liquid Crystal Display Drivers

Notes on Digital Circuits

B I O E N / Biological Signals & Data Acquisition

OFC & VLSI SIMULATION LAB MANUAL

HT9B92 RAM Mapping 36 4 LCD Driver

Hitachi Europe Ltd. ISSUE : app084/1.0 APPLICATION NOTE DATE : 28/04/99

OSCILLOSCOPE AND DIGITAL MULTIMETER

Zeroplus Logic Analyzer Multi-LA Stack and LA-Oscilloscope Stack

Dev Bhoomi Institute Of Technology Department of Electronics and Communication Engineering PRACTICAL INSTRUCTION SHEET

Combo Board.

Microcontrollers and Interfacing week 7 exercises

Transcription:

Displaying of Graphics on CRO through 8051 Microcontroller and Digital to Analog Converter Dr. Chinni Krishna D #1, Shaheen SK #1, Sridevi U *2 # Senior Lecturer and Lecturer, Department of Physics, Bhavan s New Science College (PG), Affiliated to Osmania University, Narayanaguda, Hyderabad-500 029, Telangana State, India * Lecturer & Head, Department of Mathematics, Government City College, Affiliated to Osmania University, Nayapul, Hyderabad-500 001, Telangana State, India Abstract - With a view to display various shapes and different types of characters on cathode ray oscilloscope through 8051 Microcontroller, 8255 programmable peripheral interface and Two 4-bit Digital to Analog Converters (DACs), an interfacing diagram was designed. The output of first 4-bit DAC is acting as a source of data for x- axis and the output of second 4-bit DAC is acting as a source of data for y-axis. The length of the scale varies in terms of digital inputs from 00 to 0FH on x axis and also on y axis. An assembly language program of 8051 Microcontroller was written and executed to determining analog output voltages and for all digital input combinations and the obtained outputs incremented systematically by increasing the digital inputs. Later, the outputs are connected to CRO through op-amps and written an assembly language program to transfer the data through port A of 8255 PPI. The characters A, M and the shapes Hexagonal and Circle were displayed in the present work. Due to 4-bit DACs, 2 4 =16 outputs are possible for different digital input combinations from 00 to 0FH. For displaying more number of shapes and many characters, there is a need to enhance the digital inputs. To enhance the length of scale from 00 to H, one complete 8-bit port is connected to x- channel and another complete port to y- channel to display series of characters and many shapes on oscilloscope. Keywords Microcontroller, Digital to Analog Converter, Interfacing, Graphics, Assembly language program, Time delay I. INTRODUCTION In the digital era, it is an essential to transfer characters and shapes either in parallel mode or in serial mode to output devices to display them on liquid crystal displays (LCDs), seven segment LEDs or on dual slope cathode ray oscilloscopes (CROs). In the present work, efforts were made to transfer different types of characters and shapes through 8051 microcontroller as given in a book in [1] and displaying them on dual slope oscilloscope. A. Digital to Analog Converter (DAC) Many systems accept a digital word as an input signal and translate or convert it to an analog voltage or current as mentioned in a book in [2]. These systems are called digital to analog converters (DACs). The output voltage V o of an N- bit DAC is given by the following equation V o =(a N-1 2-1 +a N-2 2-2 +a N-3 2-3 +...+a 0 2 -N )V R...(1) Where the coefficients a N represents the binary word and a N =1 (0) if the n th bit is 1 (0). The voltage V R is a stable reference voltage used in the circuit. The most significant bit is corresponds to a N-1 and its weight is V R 2, while the Least significant bit corresponds to a 0 and its weight is V R 2 N. The vast majority of IC DACs, including MC1408 (DAC 0808) uses the R-2R method since it can achieve a much higher degree of accuracy. The first criterion for judge a DAC is its resolution, which is a function of the number of binary inputs. The number of data bit inputs decides the resolution of DAC since the number of analog output levels is equal to 2 n, where n is the number of data inputs. The 4 bit DAC provides 16 discrete voltage (Current) levels of outputs and an 8 bit DAC provides 256 outputs in hexadecimal format as given in a journal article in [3]. In the present work two 4-bit DACs were designed as given in a book in [4] and their outputs were obtained by using the equation as given below ISSN: 2348 8549 www.internationaljournalssrg.org Page 1

= = - [8 D + 4 C + 2 B + A]... (2) Where is the analog voltage at the output of first 4 bit DAC1, is the analog voltage at the output of second 4 bit DAC2 and D is the Voltage at PA 7 PA 4, C is the Voltage at PA 6 PA 3, B is the Voltage at PA 5 PA 2, A is the Voltage at PA 4 PA 0. The negative sign indicates the inverted output from operational amplifier. II. EXPERIMENTAL TECHNIQUES The microcontroller used in the present work is the SDA 51-MEL, which is a system design aid for operation of microcontroller devices as given in a lab manual in [5]. It uses 803151 as the controller. It is a powerful microcontroller trainer for the INTEL 8051 microcontroller and it is operating at 11.0592MHz. The outputs obtained from port A of 8255 PPI is connected to the inputs of digital to analog converter. The R-2R ladder type DAC is designed with and 2KΩ resistors and it was connected to inverting operational amplifier (IC 741) to boost the outputs. The op-amp is activated with +15V and -15V dual power supply. Firstly, the outputs are connected to multi meter to obtain analog voltage for different combinations of digital inputs and finally, the outputs of DACs are connected to dual slope cathode ray oscilloscope, which must be operated in xy mode to display graphs on it. The complete experimental circuit diagram was given in Fig. 1. More details about electronic components were given in a journal article in [6]. III. RESULTS AND DISCUSSIONS The two 4-bit DACs were designed by using R-2R ladder method, which is a simple and most useful method with high resolution to design DAC. The inputs of DAC are connected to the outputs of 8255 PPI port A bits (PA0 PA7). The inputs are also connected to LEDs to indicate the input condition in binary format. The output and are initially connected to multimeter to obtain analog voltage for each digital input. An Dual Slope 0F 3KΩ 00 2 - +15 7 2KΩ 2KΩ 2KΩ 2KΩ 2KΩ 3 + 741 4-15V 6 3KΩ PA 7 2 - +15V 7 PA 6 PA 5 PA 4 2KΩ 2KΩ 2KΩ 2KΩ 2KΩ 3 741 + 4-15V 6 PA 3 PA 2 PA 1 PA 0 Fig.1. Interfacing diagram to connect Two 4-bit DACs and Dual slope CRO through port A of 8255 PPI and 8051 Microcontroller. The LEDs are also connected to port bits to indicate the digital input condition ISSN: 2348 8549 www.internationaljournalssrg.org Page 2

assembly language program of 8051 microcontroller as given in Table 1 was written and executed to supply binary inputs with 8 seconds delay to DAC. The DELAY routine as given in Table 2 will produce an approximately 8 Seconds time delay to record analog voltage on multimeter. The analog voltages for all digital input combinations were given in Table 3. The obtained output voltages are increasing systematically by increasing the digital input pattern. The loose contacts may give the disordered output voltage pattern. This may causes wrong pattern in displayed graph. So, precautions were taken to eliminate loose contacts in the circuit. After getting linear variations of the output voltages and are connected to channel 1 and channel 2 of the dual slope cathode ray oscilloscope through an inverting operational amplifier by keeping the CRO in xy mode to accept the data to display dots based on input conditions. If the datas 00, 0FH, H, H were transferred to port A, then a square wave frame will appear on CRO as shown in figure 1. Therefore, to display any character or any shape should be displayed with in this frame only. Therefore a group of data points were collected to display characters A, M and shapes hexagonal and circle and tabulated in Table 4. All these data points were stored in RAM memory from 31H onwards. The total number of data points was taken as a counter value, which was stored at RAM memory location 30H. Now, an assembly language program of 8051 as given in Table 5 was written and executed to transfer all these data points one by one to port A of 8255 PPI to supply inputs to DAC. After transferring of one data the count value will be decremented by one. After receiving data from port A of 8255 PPI, the DAC output values will be modified and its corresponding dot will appear on CRO. After receiving all the data s, the required character or shape will be displayed on CRO. This process can be repeatedly performed to display the stable graph on CRO. In the first trail, the datas of character A as given in Table 4 was transferred and displayed letter A on CRO. In the similar way the character M and the shapes hexagonal and circle were displayed on CRO by changing the data points at RAM memory locations from 30H onwards. All these graphs were shown in Fig. 2. IV. Table 1 Assembly language program of 8051 microcontroller to determine Analog Voltages through digital to analog converter ORG 8000; Initial address of the main program Addre ss 8000H Lab -el Mnemonic DPTR,#2023H V. Table 2 The Delay Routine Comments ; Load DPTR with Control port Address 8003H MO,#80H ; Load Accumulator with 80H to 8255 control word to consider the ports (P0, P1 and P3) as output ports 8005H 8006H X DPTR,#2020H ; Transfer the control word to control port ; Load DPTR with port A Address 8009H MO,#00 ; (A) = 00 = First data 800BH BK: X 80H LCALL DELAY ; Transfer the first data to port A ; Call delay routine to produce delay to note analog voltage 800FH ADD A,#11 ; (A) = (A) + 11, next data 8011H 8013H Address Label field CJNE A,#,BACK LCALL 0003 Mnemonic field ; If (A) H then jump to BACK End of the program Comments field F0 DLY: R5,#08 ; (R5) = 08 F2 LP3: R6,#0 LP2: R7,#0 F6 LP1: DJNZ R7,LP1 F8 FA DJNZ R6,LP2 DJNZ R5,LP3 ; (R6) = H ; (R7) =H ; Decrement R7 by 1 and jump to LP1 if it is not equal to 0 ; Decrement R6 1 and jump to LP2 if it is not equal to 0 ; Decrement R5 and jump to LP3 if it is not equal to 0 RET ; Return to the main program ISSN: 2348 8549 www.internationaljournalssrg.org Page 3

VI. Table 3 Analog output Voltages of DAC for various combinations of digital inputs PA 7 PA 3 PA 6 PA 2 PA 5 PA 1 PA 4 PA 0 (Volts) In Hex (Volts) 0 0 0 0 0 0 0 0 0 0 1 0.23 1 0.24 0 0 1 0 0.42 2 0.41 0 0 1 1 0.58 3 0.56 0 1 0 0 0.73 4 0.74 0 1 0 1 0.95 5 0.97 0 1 1 0 1.17 6 1.22 0 1 1 1 1.33 7 1.38 1 0 0 0 1.49 8 1.52 1 0 0 1 1.67 9 1.67 1 0 1 0 1.96 A 1.86 1 0 1 1 2.18 B 2.98 1 1 0 0 2.51 C 2.51 1 1 0 1 2.86 D 2.80 1 1 1 0 3.09 E 3. 1 1 1 1 3.33 F 3.23 VII. Table 4 Data Points to display letter A, M and shapes Hexagonal and Circle Charact Data Points er Shape A 00,,,, 22, 34, 59, 7E, 8C, 99, A7, C2, 59, 69, 79, 89, 99 M 00,,,, 21, 23, 24, 25, 26, Hexa gonal 27, 28, 29, 2B, 48, 65, 76, 88, AB, AA, A9, A8, A7, A6, A5, A4, A3, A2, A1 00,,,, 34, 35, 36, 37, 38, 39, 3A, 4B, 5C, 6D, 7E, 8D, 9C, AB, BA, B9, B8, B7, B6, B5, B4, A3, 92, 81, 70, 61, 52, 43 Circle 00,,,, 80, 52, 44, 36, 38, 5D, 7E, 8E, AD, C9, C7, A2, Total Data s & Memory 17 = 11H (31H 41H) 28 (31H 4CH) 32 (31H 50H) 16 (31H 40H) Fig. 2. The Characters A & M and the Shapes Hexagonal and the Circle in a coordinate system ISSN: 2348 8549 www.internationaljournalssrg.org Page 4

On x-axis and on y axis in terms of their respective digital inputs were taken in Fig. 2. Register indirect addressing mode as mentioned in journal article in [7] is used to transfer the data s from RAM memory to port A of 8255 PPI, in which R0 register is acting as a memory pointer. It is observed from figure 2 that the graph with longer sides are matched well with the data points, where as the non linear shapes like circle, the matching points are very few. Therefore, there is a need to enhance the circuit to get more and more data points to draw a perfect picture. B. Figure Captions Fig.1. Interfacing diagram to connect Two 4-bit DACs and Dual slope CRO through port A of 8255 PPI and 8051 Microcontroller. The LEDs are also connected to port bits to indicate the digital input condition Fig. 2. The Characters A & M and the Shapes Hexagonal and the Circle in a coordinate system C. Table Captions Table 1 Assembly language program of 8051 microcontroller to determine Analog Voltages through digital to analog converter Table 2 The Delay Routine Table 3 Analog output Voltages of DAC for various combinations of digital inputs Table 4 Data Points to display letter A, M and shapes Hexagonal and Circle Table 5 Assembly language program of 8051 to display character A, M and the shapes Hexagonal and the circle on CRO (Keep respective Count Value and data values to display a particular pattern as shown in Table 4 at RAM memory location from 30H onwards) IX. CONCLUSIONS 1. The outputs of two digital to analog converters and are varying systematically with increasing digital inputs 2. It is convenient to display single character shape with the present circuit. For non linear shapes like a circle, there is a need to enhance the circuit. 3. The disordered outputs may display wrong pattern of graph on CRO. VIII. Table 5 Assembly language program of 8051 to display character A, M and the shapes Hexagonal and the circle on CRO (Keep respective Count Value and data values to display a particular pattern as shown in Table 4 at RAM memory location from 30H onwards) ORG 8100H; Initial address of the program Addr ess 8100H Lab el Mnemonic field DPTR,#2023 Comments field 4. The CRO must be operated in xy mode to display graphics on it, otherwise waveforms will be displayed on it. ACKNOWLEDGEMENTS ;DPTR = Control port 8103H MO,#80 ; (A) = Control word 8105H 8106H X 8109H AG DPTR,#2020H R0,#30H ; (CP) =80H ; (DPTR) = port A ; (R0)= (30H)=Count 810BH MO,@R0 ; (A) = Count Value 81H R1,A ; (R1) = Count Value 810DH BK INC R0 ; (R0) = (31H) = Data 810EH MO,@R0 ; (A)= First data 810FH X ;First data to port A 8110H DJNZ R1,BK ; Decrement R1 and jump to BK if R1 0 8112H SJMP AG ; Jump to AG to transfer the data continuously The First author would like to express his sincere thanks to the Former Chairman Prof. Sudershan Singh garu and the Present Chairman, Secretary & Correspondent Dr. S. Jai Kishan garu of Bhavan s New Science College, Hyderabad., for their encouragement and support to undertake the present work and providing the facilities in Department of Physics to write and execute the assembly language programs in M.Sc. Laboratories. He would like to express his thanks to Dr. C.R.N. Sharma garu, the retired faculty of Department of Physics, BNSC, Hyderabad, for his ISSN: 2348 8549 www.internationaljournalssrg.org Page 5

noble suggestions on microprocessors. He also like to express his heartfelt thanks to his guru Prof. P. Venugopal Reddy garu, retired Professor from Osmania University, Hyderabad, India for his encouragement and support to undertake the present work. He also likes to express his thanks to his colleagues and students for their support. The second author would like to express her thanks to her Department colleagues and her M.Sc. students. The third author would like to express her thanks to Dr. C. Manjulatha garu, the Principal of Govt. City College, Hyderabad, India for her encouragement and support to undertake the present work. She also expresses her thanks to her Colleagues and Students for their support. She also expresses her thanks to her family members for their encouragement and support to undertake the present project. REFERENCES [1] Muhammad Ali Mazidi, Jainice Gillispie Mazidi and Rolin D. McKinlay; The 8051 Microcontrollers and Embedded Systems using Assembly and C, Second Edition, Eastern Economy Edition-2006, Prentice Hall of India Private Limited, New Delhi-110001. [2] Integrated Electronics: Analog and Digital Circuits and Systems, Tacob Milliman, Christos C. Halkias, Tata McGraw- Hill Publishing Company Limited, New Delhi [3] Dr. D. Chinni Krishna, Usridevi, B. Anjaiah, Internatinal Journal of Engineering Sciences and Computing, Vol. 6, Issue No: 4, PP: 3523 3528, April 2006. [4] R.P. Jain and M.M.S. Anand; Digital Electronics Practice using Integrated Circuits, Tata McGraw-Hill Publishing Company Limited, New Delhi. [5] ALS-SDA-8051-MEL User s Manual, Advanced Electronics, Banagalore-560058, Karnataka, India. [6] Mr. Puneet Sehgal, Ms.Himani Dua, SSRG International Journal of Electronics and Communication Engineering, Vol. 2, Issue 6, PP: 1-5, June 2015. [7] U. Sridevi and Dr. D. Chinni Krishna, International Journal of Innovative research in Computer and Communication Engineering, Vol.4, Issue 4, PP: 5168-5176, April 2016. ISSN: 2348 8549 www.internationaljournalssrg.org Page 6