Hi David, Excellent explanation. I think if the GPIO supports the Schmitt-trigger function, a simple RC filter is good enough to avoid the switch bouncing problem, which can save code space as well as CPU cycles and thus more energy efficient too. Thanks
Yes, it's true - and I show the Schmitt trigger method in the PDF version. And of course all modern MCUs (ARM, later PICs) have ST inputs available. But the baseline PICs I'm using here don't have any GPIO with Schmitt trigger. As to why teach software approaches to switch bounce, one reason is that in the next lesson I show how a timer can be used to simplify the code, and in the mid-range PIC tutorials I build on that to show how a periodic timer interrupt can be used to regularly sample and debounce an input. Not that that's necessarily the best approach, but I try to show how additional MCU features can simplify software methods that I'd explained earlier.
I've now released an updated version of that switch debounce video, for enhanced midrange, using the 12F1501 which does have a Schmitt trigger input and I show how RC works effectively with that: th-cam.com/video/_KD-T1vsf-Y/w-d-xo.html.
thank for sharing baseline course i learn and its very clear your explain 1 Do you have any movies of the next chapters of the course 2 ן want to make a program to connect a number of processors and talk to them in RS-485 connection Are there any explanations in the paid course? regard charli
Hi David, Excellent explanation. I think if the GPIO supports the Schmitt-trigger function, a simple RC filter is good enough to avoid the switch bouncing problem, which can save code space as well as CPU cycles and thus more energy efficient too. Thanks
Yes, it's true - and I show the Schmitt trigger method in the PDF version. And of course all modern MCUs (ARM, later PICs) have ST inputs available. But the baseline PICs I'm using here don't have any GPIO with Schmitt trigger.
As to why teach software approaches to switch bounce, one reason is that in the next lesson I show how a timer can be used to simplify the code, and in the mid-range PIC tutorials I build on that to show how a periodic timer interrupt can be used to regularly sample and debounce an input. Not that that's necessarily the best approach, but I try to show how additional MCU features can simplify software methods that I'd explained earlier.
Got it, Great job
I've now released an updated version of that switch debounce video, for enhanced midrange, using the 12F1501 which does have a Schmitt trigger input and I show how RC works effectively with that: th-cam.com/video/_KD-T1vsf-Y/w-d-xo.html.
Thank you for sharing your knowledge with us!
Are there any plans of making lessons about UART, I2C, rotate encoders and such?
No definite plans at the moment, but I do hope to do some more advanced lessons like that.
thank for sharing baseline course
i learn and its very clear your explain
1 Do you have any movies of the next chapters of the course
2 ן want to make a program to connect a number of processors and talk to them in RS-485 connection
Are there any explanations in the paid course?
regard charli
hi , i need some help , can i take some of your time?I have a code written in the assembly language and need a simple modification
Hi Tarek, I'm sorry but I'm not able to help with individual requests like this. You could try asking at www.microchip.com/forums/