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 / Topics / how to make 8051 to recognise i/p only greater than a specified voltage?

how to make 8051 to recognise i/p only greater than a specified voltage?

|

Microcontroller › 8051 › how to make 8051 to recognise i/p only greater than a specified voltage?

  • This topic has 0 replies, 1 voice, and was last updated 9 years, 10 months ago by Greeshma N D.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • March 25, 2016 at 6:41 am #4396
    Greeshma N D
    Participant

    My project is on blood leakage monitoring system.It uses TCST110 photointerrupter. Curently in proteus i've used pc817d and some resistors instead of tcst110.i can make 8051 detect the photointerrupter's on condition, but unable to make it to respond only when photointerruprt's o/p is above specified vlg(.03V ).what changes should i make in the code.

    code is as follows:

    #include "REG51.h"
    #include <stdio.h>
    #define buz P1
    sbit LED_pin = P2^0; //Defining LED PIN
    sbit sensor_pin = P0^0; //Defining output of sensor  PIN
    void Delay(int); //Function prototype declaration
    void main (void)
    { buz=0x00;  //buzzer off
      sensor_pin = 1; // if sensor is low 
      LED_pin=0; //LED off 
      while(1) //infinite loop
      {
        if(sensor_pin == 0 ) //If sensor is high 
        {
          LED_pin = 1; //LED ON
    buz=0x01;      // ON Buzzer
    Delay(6000); //Delay
    buz=0x00; // OFF Buzzer
          LED_pin = 0; //LED OFF
     Delay(6000);
        }}}
     void Delay(int k)
    { int j;
      int i;
      for(i=0;i<k;i++)
      {
        for(j=0;j<100;j++)
        { } }
    }
     
  • Author
    Posts
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Expensive hobby January 23, 2026
  • analog logic of shmidt trigger bjt circuit January 23, 2026
  • renewed interest in old project I call it WICKED 8 January 23, 2026
  • getting no where fast 8 x 8 led matrix January 23, 2026
  • Micro mouse January 22, 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