EC - 311/ based Project

Similar documents
APPENDIX A Instruction Set. Op Code. T states Flags Main Effects. Instructions

EE 6502 UNIT-II PROGRAMMING OF 8085 MICROPROCESSOR. Prepared by S.Sayeekumar, AP/RMDEEE

JNC, JC, and JNZ Instructions for the WIMP51

PacMan BoB QA Test Plan

Basic Electricity. Mike Koch Lead Mentor Muncie Delaware Robotics Team 1720 PhyXTGears. and Electronics. for FRC

Energy Harvesting Platform

Arduino-based OBD-II Interface and Data Logger. CS 497 Independent Study Ryan Miller Advisor: Prof. Douglas Comer April 26, 2011

PC-I 04/104. Passive PC/CAN Interface HARDWARE MANUAL ENGLISH

Nickel Cadmium and Nickel Hydride Battery Charging Applications Using the HT48R062

CDC Table for Calculated Body Mass Index Values for Selected Heights and Weights for Ages 2 to 20 Years

AN RPM to TACH Counts Conversion. 1 Preface. 2 Audience. 3 Overview. 4 References

Automated Seat Belt Switch Defect Detector

Table 1d - FSA for All Returns, Females Tax Year

Letter STUDENT NUMBER SYSTEMS ENGINEERING. Written examination. Monday 16 November 2015

Sensing the position of throttle valve using Throttle Position Sensor

Programming Languages (CS 550)

Design of Intelligent Anti-Theft System for Electric Bicycles Wang Yanan1,a, Kang Caiqin2,b

Heavy Duty Actuators CONTROLS. Pneumatic Actuators for Quarter-Turn Valves and Dampers Torques to 1,600,000 in. lbs. Double Acting and Spring Return

MGV (Marshall TM Guv'nor TM Replica) Instructions

IV-3 VFD Shield for Arduino. Assembly Manual

Title: Electric Trike

Chapter 11. Using MAX II User Flash Memory for Data Storage in Manufacturing Flow

Week 11. Module 5: EE100 Course Project Making your first robot

Collision Avoidance System CAS-M light. Manual

INVITATION FOR QUOTATION. TEQIP-III/2017/uiet/Shopping/35

EZECU - EzFi Starter ECU Standalone 3D Programmable Fuel Injection Computer for BOSCH Compliant EFI Systems

PCT200 Powercast High-Function RFID Sensor Datalogger

Macnet Technology.

Department of Mechanical, Aerospace and Manufacturing Engineering. Wire Routing Tool. ME 3483 Mechatronics Professor Kapila

Hybrid Off Grid Solar UPS

(FPGA) based design for minimizing petrol spill from the pipe lines during sabotage

英文使用手冊 MS 印製

AC : SMART ROD

Chapter 1: Battery management: State of charge

Fuel Monitoring and Electronics control of Dispenser for Fuel Station

Design and Fabrication of Automated Hacksaw Machine

DEFINITION OF ACRONYMS

International Journal of Advance Engineering and Research Development

Solar tracker is the best solution for receiving maximum radiation.

Model based development of Cruise Control for Mercedes-Benz Trucks

An Autonomous Braking System of Cars Using Artificial Neural Network

TAILOR MADE METAL FABRICATIONS LTD. VEHICLE ACCESS CONTROL BARRIER (VAC B)

Implementation of a Grid Connected Solar Inverter with Maximum Power Point Tracking

G3 UNIVERSAL GRIP CONFIGURATION GUIDE

C capacitance, 91 capacitors, codes for, 283 coupling, polarized and nonpolarized,

Orica Seismic Electronic Initiation System OSEIS TESTER. Manual

VACUUM PRESSURE PUMPS INSTALLATION CAUTIONS AND INFORMATION READ AND FOLLOW CAREFULLY!

Top quality For industrial use

Superstatic 749. Fluidic Oscillation Compact Heat Meter

Technical Article. How improved magnetic sensing technology can increase torque in BLDC motors. Roland Einspieler

SITRANS P measuring instruments for pressure

Push Button Units and Indicator Lights

ECHO Enhanced Controller Hook Count Application *** Infrared Photo Sensors *** GCA 110 ECHO Controller. Version 3.5

IFC-BL02 Interface Free Controller Brushless Motor Card

CERTIFICATE OF COMPLIANCE

Improved PV Module Performance Under Partial Shading Conditions

An High Voltage CMOS Voltage Regulator for automotive alternators with programmable functionalities and full reverse polarity capability

+Denotes lead(pb)-free and RoHS compliant. JU1 JU4 4

AP Physics B Ch 18 and 19 Ohm's Law and Circuits

HYB25D256400/800AT 256-MBit Double Data Rata SDRAM

Summary of Specifications

U36D SERIES Engineering Bulletin Mar 07

or, with the time and date option enabled using the CommFlags command:

DATE: May 19, 2000 Service Instruction No. 1443E (Supersedes Service Instruction No. 1443D) Engineering Aspects are FAA Approved

THE SOLAR POWERED ANTI-THEFT BAG

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

OPERATIONS MANUAL M-520. Please take the time to read these instructions before starting to use the scales. Page 1

mith College Computer Science CSC231 Assembly Fall 2017 Week #4 Dominique Thiébaut

Embedded system design for a multi variable input operations

RAISEBORING DRILL PIPES

Product Manual L293D BREAKOUT Updated on 24 June 2017

Convergence module (Driver) - Green convergence sub module

GEMALTO M2M. Accessories Overview. Product Marketing. Sep 2015

1. Historical background of I2C I2C from a hardware perspective Bus Architecture The Basic I2C Protocol...

Fluidic Oscillation Compact Heat Meter of High-Tech Composite

TESTING OF CONTROL UNITS FOR THE APPLICATION OF WIRELESS COMMUNICATION PROTOCOLS IN ON-BOARD VEHICLE DIAGNOSTIC SYSTEMS

R260S - In-Circuit Programmer

Testing Electrified Drivetrains for Vehicles without the Battery or Engine. Application Reprint of Readout No. 38

Automatic Braking and Control for New Generation Vehicles

Process connection. Further designs. Order code. to EN

DAT105: Computer Architecture Study Period 2, 2009 Exercise 2 Chapter 2: Instruction-Level Parallelism and Its Exploitation

AMM-TE ammeter Manual

International Journal of Science Engineering and Advance Technology, IJSEAT, Vol 3, Issue 9 ISSN September-2015

UniverSOL Charge Station

Design and Implementation of an Automatic Power Supply from Four Different Source Using Microcontroller

INSTRUMENT PANEL CLUSTERS

Final Report 4/25/12. Project: Intelli-Shade. Team: Test Curtains Please Ignore

EV-EMCU Electric Vehicle - Economy Mode Control Unit

CMPEN 411 VLSI Digital Circuits Spring Lecture 22: Memery, ROM

HOW TO PERFORM VEHICLE IDENTIFICATION NUMBER (VIN) WRITING

Tip: LED Lighting for the 4367 SBB Euro City Set, 4366 and 4368 Cars Date: , Corrections Modified , Photos

6.823 Computer System Architecture Prerequisite Self-Assessment Test Assigned Feb. 6, 2019 Due Feb 11, 2019

54ACxxxx, 54ACTxxxx. Rad-hard advanced high-speed 5 V CMOS logic series. Features. Description

Sunseeker Sunseek Electrica Electric l a Systems 22 September 2009

INSTALLATION INSTRUCTIONS

Robotized semiautomatic motorcycle transmission development. Electronic and software design

Issue 2.0 December EPAS Midi User Manual EPAS35

medical/health scales

Robofish Charging Station (RCS) Test Plan

A14-18 Active Balancing of Batteries - final demo. Lauri Sorsa & Joonas Sainio Final demo presentation

Transcription:

EC - 311/316 8085 based Project BMI CALCULATOR (Body Mass Index) Made by :- Himanshu Santolia - 63/EC/13 Balram - 45/EC/13

Contents :- 1) Introduction 2) Block Diagram 3) Proposed Model 4) Schematic 5) Board Layout 6) Implementation 7) Flow Chart 8) Components Used 9) Testing and Debugging 10) EEPROM 11) Gallery 12) Code 13) Conclusion 14) Bibliography 15) Tools Used

Introduction It is a basic machine that calculates BMI of a person by inputting weight and height and also gives a comment about person's state on being - Underweight, Normal, Overweight, Obese according to the BMI range :- Underweight : less than 18.5 Normal : between 18.5 and 25 Overweight : between 25 and 30 Obese : greater than 30 It is based on 8085 microprocessor viz. an 8 bit microprocessor introduced by Intel in 1976.

How it looks like :-

Schematic :-

Board Layout :-

Implementation :- We used HC-SR04 ultrasonic sensor to calculate height of the person by calling ultrasonic instruction (written in code) twice, once to calculate distance between roof to floor and another one to calculate distance between head to roof. Height of a person can be calculated by subtracting above two distances. We used SID and SOD (serial communication) of 8085 µp to deal with ultrasonic sensor. Weight was manually input via 4x3 matrix keypad that was made using Omron switches interfaced with 8255 PPI. It consists of 0-9 digit keys, a height key and an enter key. 0-9 digit keys are for inputting weight viz. of the form _. _ (up to 3 digits after decimal) Enter key is used to transit from weight-input to heightinput. User presses enter when he is done inputting weight. Height key is used to initiate the ultrasonic sensor for operation when a person is standing right below it. After pressing height key it gives the distance between head to roof and stores it in memory after which it is subtracted from roof-floor distance. We made an algorithm for division and iterated it twice to calculate BMI of the person and displayed it on a 16x2 LCD. BMI = Weight / (Height)^2 (kg/m^2) ;

Apart from calculating BMI, it also comments whether the subject is Underweight, Normal, Overweight or Obese by comparing with standard BMIs of respective categories.

Flowchart :- LCD DISPLAY WELCOME TO BMI CALCULATOR LCD DISPLAY ENTER YOUR WEIGHTkg: _. _ CALL ULTRASONIC SENSOR (Distance from roof to floor is stored ) WEIGHT IS FED TO MICROPROCESSOR (Scanning of matrix keyboard is done and keys pressed are stored as weight of the subject) Is ENTER KEY is pressed? Is HEIGHT KEY is pressed? LCD DISPLAY STAND STILL!! PRESS HEIGHT KEY CALL ULTRASONIC SENSOR (Distance from roof to head is stored) Subtraction LCD Display of Height "HEIGHT = _ cm"

BMI Calculation (division of stored weight with height is done TWO times ) LCD Display of BMI and Comment "BMI =._ COMMENT" END

Components Used :- PART DEVICE PACKAGE 8085 8085 DIL40 01 8255A 8255A DIL40 01 ADL 74HCT573N DIL20 01 Capacitor (.1µF) Capacitor (10 µf) C-EU025-025X050 C025-025X050 CPOL-EUE2-5 E2-5 2 DECODER 74HCT138N DIL16 01 EEPROM 58C256P DIL28-6 01 Omron Switch OMRON_SWITCH_10- XX QUANTITY 28 B3F-10XX 13 NOT Gate 74HCT04N DIL14 02 Resistors R-US_0204/7 0204/7 33 Preset PRESET_LR PRESET_LR 01 RAM 62256P DIL28-6 01 Connectors M10 10P 04 USB Port USB(POWER) USB(POWER) 01 LED LED5MM LED5MM 01 Q2 CRYSTALHC49US HC49US 01

Testing and Debugging :- After soldering components on PCB, all components were tested using Multimeter. Result was satisfactory. To test ICs, a small code regarding SID-SOD was executed..org 0000H LOOP: RIM ANI 080H ORI 040H SIM JMP LOOP HLT.END To test LCD a small code of display was executed. (Included in the final code) To test Ultrasonic Sensor a small code of 'distance measuring' was executed. (included in the final code)

EEPROM :- We used Electrically Erasable Programmable Read-Only Memory (EEPROM) and write data (our code) on this ROM we used 'EEPROM Programmer' built in CEDT of NSIT under Prof. Dhananjay Gadre. It consists of 2 shift register ICs (74HC595N) and an Arduino nano.

BMI CALCULATOR (Gallery) :-

CODE :-.ORG 0000H LXI SP,0FFFFH MVI A,88H OUT 083H MVI A,38H MVI A,38H MVI A,38H MVI A,01H MVI A,0CH MVI A,83H MVI A,57H MVI A,45H MVI A,4CH MVI A,43H MVI A,4FH MVI A,4DH MVI A,45H

MVI A,20H MVI A,54H MVI A,4FH MVI A,0C1H MVI A,42H MVI A,4DH MVI A,49H MVI A,20H MVI A,43H MVI A,41H MVI A,4CH MVI A,43H MVI A,55H MVI A,4CH MVI A,41H

MVI A,54H MVI A,4FH MVI A,52H CALL DEL_5SEC MVI A,38H MVI A,38H MVI A,38H MVI A,01H MVI A,0CH MVI A,83H MVI A,45H MVI A,4EH MVI A,54H MVI A,45H MVI A,52H MVI A,20H MVI A,20H

MVI A,59H MVI A,4FH MVI A,55H MVI A,52H MVI A,0C0H MVI A,57H MVI A,45H MVI A,49H MVI A,47H MVI A,48H MVI A,54H MVI A,6BH MVI A,67H MVI A,3AH MVI A,0CCH MVI A,2EH

; HEIGHT FROM ROOF TO FLOOR CALL ULTRASONIC SHLD 8070H LXI H,08000H MVI C,0C8h PUSH B KYBOARD: XRA A MOV E,A OUT 81h KEYREL: IN 82h ANI 70h CPI 70h JNZ KEYREL CALL DBONCE KYCHK: IN 82h ANI 70h CPI 70h JZ KYCHK CALL DBONCE MVI A,7Fh MVI B,04h NXTROW: RLC MOV D,A OUT 81h IN 82h ANI 70h MVI C,03h RAL NXTCOLM: RAL JNC CODE INR E

DCR C JNZ NXTCOLM MOV A,D DCR B JNZ NXTROW JMP KYCHK CODE: MOV A,E CPI 02H JNZ N1 MVI E,01h JMP PRESS N1: CPI 01h JNZ N2 MVI E,02h JMP PRESS N2: CPI 00h JNZ N3 MVI E,03h JMP PRESS N3: CPI 05h JNZ N4 MVI E,04h JMP PRESS N4: CPI 04h JNZ N5 MVI E,05h JMP PRESS N5: CPI 03h JNZ N6 MVI E,06h JMP PRESS N6: CPI 08h JNZ N7

MVI E,07h JMP PRESS N7: CPI 07h JNZ N8 MVI E,08h JMP PRESS N8: CPI 06h JNZ N9 MVI E,09h JMP PRESS N9: CPI 09h JNZ N10 ;DISPLAY LCD TO STAND STILL AND PRESS HEIGHT KEY MVI A,38H MVI A,38H MVI A,38H MVI A,01H MVI A,0CH MVI A,81H MVI A,53H MVI A,54H MVI A,41H MVI A,4EH

MVI A,44H MVI A,20H MVI A,53H MVI A,54H MVI A,49H MVI A,4CH MVI A,4CH MVI A,21H MVI A,21H MVI A,0C0h MVI A,50H MVI A,52H MVI A,45H MVI A,53H MVI A,53H MVI A,20H MVI A,48H

MVI A,45H MVI A,49H MVI A,47H MVI A,48H MVI A,54H MVI A,20H MVI A,4BH MVI A,45H MVI A,59H JMP KYBOARD N10: CPI 0Ah JNZ N11 MVI E,00H JMP PRESS N11: CPI 0Bh JZ BREAKOUT PRESS: ; lcd display of pressed key MOV M,E INX H POP B INR C MOV A,C

CPI 0CCH JNZ FROG INR C FROG: PUSH B MOV A,C MOV A,E ADI 30H JMP KYBOARD BREAKOUT: ; HEIGHT FROM ROOF TO HEAD CALL ULTRASONIC MOV A,H CMA MOV H,A MOV A,L CMA MOV L,A LXI B,0001H DAD B XCHG LHLD 8070H DAD D SHLD 8020H XRA A STA 8040H STA 8041H STA 8042H ADD H JNZ GOLD MOV A,L CPI 64h

JC SILVER GOLD: LXI D,0064h MOV A,D CMA MOV D,A MOV A,E CMA MOV E,A LXI B,0001h XCHG DAD B XCHG MVI C,00h MINUS: DAD D INR C MOV A,H ADI 00h JNZ MINUS MOV A,L CPI 64h JC BIRD JMP MINUS BIRD: MOV A,C STA 8040h SILVER: MVI C,00h MOV A,L TREX: CPI 0Ah JC FREE SUI 0Ah INR C JMP TREX FREE: STA 8042h MOV A,C

STA 8041h MVI A,38H MVI A,38H MVI A,38H MVI A,01H MVI A,0CH MVI A,80H MVI A,48H MVI A,45H MVI A,49H MVI A,47H MVI A,48H MVI A,54H MVI A,3DH LDA 8040H ADI 30H LDA 8041H ADI 30H

LDA 8042H ADI 30H MVI A,63H MVI A,6DH CALL DEL_5SEC XRA A STA 8006H STA 8007H DIVISION: MVI B,02h BEGIN: LXI H,8010H MVI C,08h ZERO: MVI A,00h MOV M,A INX H DCR C JNZ ZERO LXI SP,0FFFFh LXI H,8010h LXI D,8000h MVI C,08h PUSH D PUSH H PUSH B LDA 8000h LHLD 8020h XCHG MVI H,00h MOV L,A START: MVI A,00h

ADD H JNZ SUBT MOV A,L CMP E JC UPDATE SUBT: MOV A,D CMA MOV D,A MOV A,E CMA MOV E,A LXI B,0001h XCHG DAD B XCHG DAD D SHLD 8050h LHLD 8020h XCHG POP B POP H INR M PUSH H PUSH B LHLD 8050h JMP START UPDATE: MOV B,H MOV C,L MVI A,09h MULTI: DAD B DCR A JNZ MULTI SHLD 8050h

XCHG SHLD 8052h POP B POP H POP D INX H INX D PUSH D PUSH H PUSH B LDAX D MVI D,00h MOV E,A LHLD 8050h DAD D XCHG LHLD 8052h XCHG POP B DCR C JZ ENDS PUSH B JMP START ENDS: DCR B JZ STOP LXI H,8010h LXI D,8000h MVI C,08h REPLACE: MOV A,M STAX D INX H INX D DCR C

JNZ REPLACE JMP BEGIN STOP: ;LCD DISPLAY OF BMI MVI A,38H MVI A,38H MVI A,38H MVI A,01H MVI A,0CH MVI A,80H MVI A,42H MVI A,4DH MVI A,49H MVI A,3DH LDA 8015H ADI 30H LDA 8016H ADI 30H MVI A,2EH LDA 8017H

ADI 30H ;DECIMAL EQUIVALENT OF BMI IS COMPARED LDA 8015H MOV L,A MVI H,00H MOV D,H MOV E,L MVI C,63H FISH: DAD D DCR C JNZ FISH LDA 8016H MOV B,A MVI C,09H TOAD: ADD B DCR C JNZ TOAD MOV B,A LDA 8017H ADD B MOV E,A MVI D,00H DAD D ; DECIMAL EQUIVALENT IN HL PAIR ;COMPARING BMI XRA A ADD H JNZ TWOBYTE MOV A,L CPI 0B9h JC UNDERWEIGHT JNZ HIGH

JMP NORMAL HIGH: CPI 0FAh JC NORMAL JNZ OVERWEIGHT JMP NORMAL TWOBYTE: MOV A,H CPI 01h JNZ OBESE MOV A,L CPI 2Ch JC OVERWEIGHT JNZ OBESE JMP OVERWEIGHT ;RESULT IS DISPLAYED UNDERWEIGHT: MVI A,0C0h MVI A,55H MVI A,4EH MVI A,44H MVI A,45H MVI A,52H MVI A,57H MVI A,45H MVI A,49H MVI A,47H

MVI A,48H MVI A,54H HLT NORMAL: MVI A,0C0h MVI A,4EH MVI A,4FH MVI A,52H MVI A,4DH MVI A,41H MVI A,4CH HLT OVERWEIGHT: MVI A,0C0h MVI A,4FH MVI A,56H MVI A,45H MVI A,52H MVI A,57H

MVI A,45H MVI A,49H MVI A,47H MVI A,48H MVI A,54H HLT OBESE: MVI A,0C0h MVI A,4FH MVI A,42H MVI A,45H MVI A,53H MVI A,45H CALL DAT HLT ; SUBROUTINES CMD: MOV B,A XRA A PUSH PSW MOV A,B RAL MOV B,A JNC M1

POP PSW ADI 01h PUSH PSW M1: MOV A,B RAL MOV B,A JNC M2 POP PSW ADI 02h PUSH PSW M2: MOV A,B RAL MOV B,A JNC M3 POP PSW ADI 04h PUSH PSW M3: MOV A,B RAL MOV B,A JNC M4 POP PSW ADI 08h PUSH PSW M4: MOV A,B RAL MOV B,A JNC M5 POP PSW ADI 10h PUSH PSW M5: MOV A,B RAL

MOV B,A JNC M6 POP PSW ADI 20h PUSH PSW M6: MOV A,B RAL MOV B,A JNC M7 POP PSW ADI 40h PUSH PSW M7: MOV A,B RAL JNC M8 POP PSW ADI 80h PUSH PSW M8: POP PSW OUT 80H MVI A,01H ;RS=0,E=1 OUT 82H CALL DELAY MVI A,00H ;RS=0,E=0 OUT 82H CALL DELAY RET DATA: MOV B,A XRA A PUSH PSW MOV A,B RAL MOV B,A

JNC M01 POP PSW ADI 01h PUSH PSW M01: MOV A,B RAL MOV B,A JNC M02 POP PSW ADI 02h PUSH PSW M02: MOV A,B RAL MOV B,A JNC M03 POP PSW ADI 04h PUSH PSW M03: MOV A,B RAL MOV B,A JNC M04 POP PSW ADI 08h PUSH PSW M04: MOV A,B RAL MOV B,A JNC M05 POP PSW ADI 10h PUSH PSW M05: MOV A,B

RAL MOV B,A JNC M06 POP PSW ADI 20h PUSH PSW M06: MOV A,B RAL MOV B,A JNC M07 POP PSW ADI 40h PUSH PSW M07: MOV A,B RAL JNC M08 POP PSW ADI 80h PUSH PSW M08: POP PSW OUT 80H MVI A,03H ;RS=1,E=1 OUT 82H CALL DELAY MVI A,02H ;RS=1,E=0 OUT 82H CALL DELAY RET DELAY: MVI C,8CH LOOP: DCR C JNZ LOOP RET DBONCE: PUSH B

PUSH PSW LXI B,04E0H POOL: DCX B MOV A,C ORA B JNZ POOL POP PSW POP B RET ULTRASONIC: LXI B,68DDH DEL5Loop: DCX B MOV A,B ORA C JNZ DEL5Loop MVI A,040H SIM MVI A,0C0H SIM NOP NOP NOP NOP NOP NOP MVI A,040H SIM AGAIN: RIM ANI 080H JZ AGAIN LXI H,0000H MVI B,0AH

DECA: DCR B JNZ DECA NEXT: INX H RIM ANI 080H JZ DRUG JMP TREE TREE: MVI B,09H DECAN: DCR B JNZ DECAN JMP NEXT DRUG: RET DEL_5SEC: MVI B,7CH DEL_5SECLoop1: MVI C,2BH DEL_5SECLoop2: MVI D,0D0H DEL_5SECLoop3: DCR D JNZ DEL_5SECLoop3 DCR C JNZ DEL_5SECLoop2 DCR B JNZ DEL_5SECLoop1 RET

Conclusion :- It was an amazing experience for us, from making the schematic upto the moment when it gave correct results. Through this project,we got an idea of how electronics can be applied in our day to day life to make it a lot easier. It gave an understanding of how hardware and software can combine with and complement each other to give us useful products. Initially we were entangled in a thought of - How a microprocessor which was built in 1976 can be used for practical implementation in 2016? This project is the proof that It Can. Bibliography :- Ramesh Gaonkar, Microprocessor Architecture, Programming and Applications with the 8085, Sixth edition. Data sheets of all the components used. Tools Used :- Software : Eagle 6.60 8085 simulator IDE oshonsoft Jubin 8085 simulator EEPROM Programmer (.JAR) Hardware : EEPROM Programmer Multimeter Solder station Tweezer Cutter