EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / plz tell me that is this

plz tell me that is this

|

Microcontroller › 8051 › how to start timer by software and stop by external hardware and then taking resultant value of time? › plz tell me that is this

July 21, 2011 at 9:54 pm #6490
ZOBI
Participant

plz tell me that is this program is correct or it needs some more addition or correction. all the details are written in front of every command after “;” sign

 

ORG 0013H                   ; INT1 ISR
clr TR0           ;stops timer 0(pin p3.3 will be connected with ECHO OUTPUT PULSE PIN of SRF04)
mov DPL,TL0                 ;save the TL0 values to lower DPTR portion
mov DPH,TH0                ;save the TH0 values to upper DPTR portion
LJMP RANGE_CHECKER ;from here the DPTR value will be shifted to furhter part of this remaining programe
RANGE_CHECKER:

 

{{{{{{here i will write further program}}}}}}

ORG 0030H
MAIN:
setb tcon.3                      ; make INT1 edge triggerd(high-to-low) interrupt
setb tcon.1                     ;make INT0 edge triggerd(high-to-low) interrupt
mov Ie,#10000101b       ;enable external INT0,ITN1
mov tmod,#10011001b  ;make timr to strt/stop by EXTRNAL HARDWARE,MODE 1,16 bit timers
mov tl0,#0000                ;load initial values in timer TLO
mov th0,#0000               ;load initial values in timer THO
setb p1.0                        ;make pin P1.0 HIGH
call delay                         ;this delay will  HIGH pin P1.0 for 10 usec
delay:
l1:mov r0,#1
djnz r0,l1
nop
nop
clr p1.0
end

RSS Recent Posts

  • flexible copper cable January 13, 2026
  • Sears 40/20 200amp starter/battery charger switch pinout January 13, 2026
  • renewed interest in old project I call it WICKED 8 January 13, 2026
  • Drawing software January 13, 2026
  • updating circuit with power on off switching January 13, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise