I am new to micro-p programming so pls help me in tis.
currently i am using a photo-reflective sensor i/p to my 8051 processor at p2.0.
for the sensor it will send a '0' if detect any reflected signal and '1' if didnt detect any signal.
so if the sensor always detect a '0' i will always increment my output data which is not wat i want.
what i need is when it detect '0' first and if next bit is still a '0' it will not output the data. Therefore, i need a program to keep track of the sensor. i need to output the data when there is a change in state from '1' to '0' only.
So hope that anyone can help me to write tis part of the program.
pls reply to firstname.lastname@example.org