MORE RELATED

GROOMIX INFO
Blogs & Articles
MENU
. . .

programming

views : 123

Assemby program code for Automatic Door Opening System (8051 family microcontroller)

This assembly coded to run automatic door opening and closing system. It has infra-red (IR) Sensors to detect proximity approach of object. This input is used to control opening and closing motor system with appropriate delay. Mostly, slide door is used for this purpose, however, any other type can also be operated.

Image : project demonstrating model

Assemby program code

Note : Pin connection should be in according to code below. if any confusion then ask in comments below...

;################### ########################## #####################
;#######Assemby program code for Automatic Door Opening System ########
;##################### ########################## ###################
;R6,R7 FOR 1mS DELAY
;R3,R4,R5 FOR 1S DELAY
;--------------------- ------relays
MOTOR11 BIT P2.0
MOTOR12 BIT P2.1
;--------------------- ------wire sensors
IR1 BIT P1.0
OPEN_STATUS BIT P1.1
CLOSE_STATUS BIT P1.2
;--------------------- ------BUZZER OUPUTS
BUZZER BIT P2.6 
LED_RED BIT P2.5 
LED_GREEN BIT P2.7 
;===================== ==========
ORG 0
LJMP MAIN  ;RESET
ORG 30H
MAIN:
;===================== ===========INITIAL SETTINGS
MOV P0,#0
MOV P1,#0FFH
MOV P2,#0
MOV P3,#0
;********************* ************************** *************
;********************* ************************** *************
CLR LED_RED
CLR LED_GREEN
CLR BUZZER
CLR LED_RED
CLR MOTOR11
CLR MOTOR12

PROGRAM:
CLR BUZZER
JB IR1,CLOSE
OPEN:
JNB OPEN_STATUS,PROGRAM
SETB MOTOR11
CLR MOTOR12
SETB LED_GREEN
CLR LED_RED
LJMP OPEN
CLOSE:
JNB CLOSE_STATUS,PROGRAM
CLR MOTOR11
SETB MOTOR12
CLR LED_GREEN
SETB LED_RED
SETB BUZZER
LJMP CLOSE
LJMP PROGRAM 
;********************* ************************** **************
;********************* ************************** **************
;===================== ==DELAY 1 SEC ================DELAY_1S DELAY_1S:MOV r7,#1    ;Value of R7=no. 0f Second delay for 12Mhz(1.0003S ACCURATE)
D1S0:   MOV r6,#0ffh
D1S1:   MOV  r5,#245
D1S2:   NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        DJNZ r5,D1S2
        DJNZ r6,D1S1
        DJNZ r7,D1S0
        RET
;===================== ========================== ======DELAY_XXXmS
DELAY_1mS:MOV R7,#1 ;Value of R7=no. 0f mSecond delay for 12Mhz(1.000mS% ACCURATE)
D0:    MOV R6,#248  
D1:    NOP
    NOP
    DJNZ R6,D1 
D2:    DJNZ  R7,D0
D3:    RET
DELAY_250mS:MOV R7,#250;Value of R7=no. 0f mSecond delay for 12Mhz(1.000mS% ACCURATE)
D250mS0:    MOV R6,#248  
D250mS1:    NOP
            NOP
            DJNZ R6,D250mS1 
D250mS2:    DJNZ  R7,D250mS0
D250mS3:    RET
;===================== ========================== INTERRUPT0
OK:
END

For any query, feel free to comment below..... 

Posted By :
Mr. Unique

2016-08-09/20:49:38

Share this Page

Comments...

sumesh

can u change your name from unique to ediat

Mr. Unique

#Dear Sumesh

Thanks for your advice but this is beyond the current topics. And its "IDIOT" not "ediat"...

More :programming

programming
Arduino UNO tachometer coding with variable resistor and DC motor speed control
views :106

p

programming
Here is the code to interface 2 serial devices with AVR
views :111

p

programming
Software Uart for AVR microcontroller tested on 1200 baud rate
views :430

p

programming
ATMEL STUDIO-While loop conditioning issues
views :133

p

programming
ATMEL STUDIO-While loop is not working using interrupt incremented conditioning
views :244

p

programming
Copy and paste code for facebook share button in your websites
views :246
programming
How to program atmel 8051 family microcontroller? (step by step)
views :191
programming
Embedded program code in C language for Digital Voltmeter for AVR microcontroller
views :166
programming
Assemby program code for Automatic Door Opening System (8051 family microcontroller)
views :123
programming
Very simple and accurate Seven Segment Display program Code in Embedded C language
views :128

p

programming
Highway vehicle speed detector or checker Embedded C language code in MikroC AVR Framework also applicable for 8051 Microcontroller
views :83

p

programming
Assembly program for accurate 1 second delay function
views :131
programming
What is Embedded system programming?
views :149

Latest Updates

Breaking News
Best internet Recharge Plans than jio..!
views :102
Engineering Project Ideas
Vehicle Theft Protection Using Gsm
views :139
Engineering Project Ideas
DTMF Controlled Robot or Mobile Controlled Robot
views :82
Engineering Project Ideas
Digital Clock With Home Appliances Control Using Microcontroller
views :80
Engineering Project Ideas
Cooking Monitor
views :106
Engineering Project Ideas
Boundary Security System(Wireless)
views :92
Engineering Project Ideas
Automatic Garage Parking System
views :107
programming
Arduino UNO tachometer coding with variable resistor and DC motor speed control
views :106
Engineering Project Ideas
Employee Details Recording Interface synopsis
views :113
Engineering Project Ideas
Footstep Power Generation
views :89

---More To Do---

This pages is developed to give users a genuine web materials of all types throughout the world. Many articles, by experts are publishing here, every hours. You can publish your topics as well as you can comment on all posted topics and learn more. Many types of topics are published here like Technology based ( Electronics, Electricals, Mechanicals, civil engineering, computer science, programming and software development, Assemply language codings), Health like medicine, healthy diets, Homeopathy etc) and many types of latest news updates.


All content, design, and layout are Copyright © 2016 - Digital Photography Review All Rights Reserved. Reproduction in whole or part in any form or medium without specific written permission is prohibited.

MORE TO DO