Re: IOC flag triggered when PIC is unplugged...?
That's what the IOC flag was used for; to check if a button was activated.
That is a false assumption, all the IOC flag says is that a edge was detected, you need way more info to determine if it was a valid key press, at a minimum you need to know if its still "active" and if it was "active" for a reasonable time. no simple hw debounce solution will do all the work
don't forget a 0.000000025S [thats 25nS ] pulse can trigger an ioc event , would you call that a key press
how about 25uS what about 1mS , for my money i would ignore anything less than 50mS
glacially slow for a Pic@32MHz
ps , switches on long leads and breadboards are potentially difficult cases also
Last edited by richard; - 22nd September 2024 at 04:01.
Warning I'm not a teacher
Bookmarks