Instructable plagiarism. Funny. But it got me thinking and searching and lo and behold, you are correct, sir!Some of the comments refer to using an 18F series chip. I am more inclined just to pass it off as Instructable plagiarism.
While I can't imagine anyone submitting this work as his own, perhaps moving it to Homework and requiring the TS to solve the "second event" issue for a chip without interrupts per se would at least show some contribution by him for getting a baccalaureate degree in engineering. I know what I would do, let's see if he understands the code himself to do that (without posting elsewhere for the answer) or something even better.
From 2012
https://www.edaboard.com/showthread...to-convert-follwing-assembly-code-to-hex-file
These are probably the original one - uses the ADC to sense the clap level.
http://www.electroniclessons.com/COMMENTED CLAP.txt
http://www.bradsprojects.com/forum/viewtopic.php?t=661
The first link even has the original RESET bug.
Geeze...
EDIT: Musing on this further, the edaboard code looks like a knockoff of the electronicslessons code by Patrick Mitchell. That code uses the PIC ADC to look for a very small change in voltage from the amplified microphone. Without the ADC, the clap detector has to swing full logic levels.
And here is Patrick Mitchell's Instructable with the same defective 'reset' code - line for line:
https://www.instructables.com/id/How-to-make-a-Clap-Clap-on-Clap-Clap-Off-switch-/
http://www.electroniclessons.com/10F222TMPO.ASM
That one uses a section of the LM324 as a comparator so maybe logic level input works. As for 'reset', he does mention an 18F. Maybe he prototyped it with that and left the 'reset' instruction to goto the top of the loop. Sorry stuff.
For the TS, that's the problem when you copy stuff from the internet. You actually have to understand it to use it and that comes from creating it - especially for a university project leading to a degree.
At any rate, I'm out.
Good luck!
Last edited: