And safety glasses. I always wear them when I write code.
As skimask saidMy point with 50Hz is that the PIC thinks the smoke machine is ready then not ready 100 times a second. Ive been thinking about the code for that and it should be really easy. Just a variable that counts down to 0 from whatever value (i havnt worked that out yet). If it gets to 0 then there is no power, otherwise the input will turn on again before it reaches 0 and reset the variable to its start valueShould not be a problem.You'll probably have to put a diode inline with the PIC pin and maybe a small R/C network behind that to filter out the 50hz half-wave and get a decent reading at the PIC
Bookmarks