We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi All,, My 8 bitcontroller is receiving a stream of pulses on one of its normal pins (ie., not an interrupt pin). The width of the pulses is either 300-microseconds or 1-milliseconds. So infact a binary 0 and 1 is being received in the form of pulse width. If the pulse width is 300-microseconds then it is a logic zero. If the pulse width is 1-milliseconds then it is logic one. The controller receives 25 pulses. Now i need to test this received bit stream to see if it is equal to a constant value stored in the code. If they matches i would toggle an output pin. Can someone throw some quick code to do this ..?? Thankzz & Bye -Steve
theOutPin = ( key == keyConst );
theOutPin = ( key == keyConst ); _nop_(); theOutPin = 0;
Thanks Jon.. I am going through your code and it will actually take me some time to get the gist of the logic.. Would you be kind enough to comment your code and describe how it does the trick ?? Thankzz && Bye -Steve
Would you be kind enough to comment your code and describe how it does the trick ?? This kinda sounds like consulting to me. Jon
I heard that! Hey over here! :-)