This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

reg tsop interfacing

Hi,
I am using 89v51rd2 controller,,i wanted to blink an led on board using tsop sm0038 ir reciever,the code which i used for this is

sbit TSOPSEN= P3^4; //Input from TSOP sensor
sbit LED = P0^4; //Output display from TSOP sensor

void main()
{ while (1) { LED=0; if(TSOPSEN == 1) { LED=1; } }
} but wen i dumped the code and pressed the remote,the led is not blinking

Parents
  • ya spent some time on it ,but since i am new to 8051 programming,i couldnt find wats the problem,,i changed the code to
    Hi,
    I am using 89v51rd2 controller,,i wanted to blink an led on board using tsop sm0038 ir reciever,the code which i used for this is

    #include<reg51.h>
    sbit TSOPSEN= P0^0; //Input from TSOP sensor
    sbit LED = P1^4; //Output display from TSOP sensor

    void main()
    { while (1) { if (TSOPSEN==0)

    { LED=0; } else if(TSOPSEN == 1) { LED=1; } }
    } but still get the same problem,led nt blinking

Reply
  • ya spent some time on it ,but since i am new to 8051 programming,i couldnt find wats the problem,,i changed the code to
    Hi,
    I am using 89v51rd2 controller,,i wanted to blink an led on board using tsop sm0038 ir reciever,the code which i used for this is

    #include<reg51.h>
    sbit TSOPSEN= P0^0; //Input from TSOP sensor
    sbit LED = P1^4; //Output display from TSOP sensor

    void main()
    { while (1) { if (TSOPSEN==0)

    { LED=0; } else if(TSOPSEN == 1) { LED=1; } }
    } but still get the same problem,led nt blinking

Children