hey,i am having the same problem like you,and my condition is much more worse than you,i dunno how to writet the source code for the system whenever the smoke detector detect the smoke and send the signal to the PIC16F877,since u already ask this question one year ago,I guess u already find a answer for it,so I hope to get the help from you in urgent,because my lecturer is forcing me to send the project to her on the next two days,if u are here,please help me,thanks..