Extra Note: At 26:33 instead of creating a software flag variable, you can just disable the enable bit of that interrupt and directly check the flag bit in your code without any interrupts (this is exactly the reason why flag bits set regardless of their enable bits; it's so you can poll the interrupt flags). You only need to create software flags if you need a part of your code executed asap in the interrupt routine, while some parts can tolerate being delayed.
@27:07 I believe this will reduce power consumption and decrease the latency period for the ISR mechanism to respond to an external request - because of how IRQ works.
That depends. Most of the time, efficiency won't change since you'll enter and leave the interrupt routines the same number of times. Power consumption would only reduce if you also utilized low-power modes along with interrupts. As an extra note: Jumping to the interrupt routine takes 3-4 instructions. Checking which interrupt routine has been fired also takes many instructions. If you're using two interrupt routines at the same time, that also adds a bunch of instructions since there's only one set of "shadow registers" for this microcontroller. So technically, depending on the application, interrupts may even reduce the efficiency.
Extra Note: At 26:33 instead of creating a software flag variable, you can just disable the enable bit of that interrupt and directly check the flag bit in your code without any interrupts (this is exactly the reason why flag bits set regardless of their enable bits; it's so you can poll the interrupt flags). You only need to create software flags if you need a part of your code executed asap in the interrupt routine, while some parts can tolerate being delayed.
2 hours of sleep 12 hours of self taught half understood frankin code. Due today. You just saved 20% of my grade you beautiful bastard.
You are awesome! Crystal clear explanation!
very good video and explain in technical with help of datasheet
Thanks 👍
Thank You Man, a very useful vídeo
@27:07 I believe this will reduce power consumption and decrease the latency period for the ISR mechanism to respond to an external request - because of how IRQ works.
That depends. Most of the time, efficiency won't change since you'll enter and leave the interrupt routines the same number of times. Power consumption would only reduce if you also utilized low-power modes along with interrupts.
As an extra note:
Jumping to the interrupt routine takes 3-4 instructions. Checking which interrupt routine has been fired also takes many instructions. If you're using two interrupt routines at the same time, that also adds a bunch of instructions since there's only one set of "shadow registers" for this microcontroller. So technically, depending on the application, interrupts may even reduce the efficiency.
That is a very well explained tutorial, amazing work!
Thanks 👍
Awesome video series, I hope you continue to make more PIC programming videos!
Thanks👍I'm currently uploading for the debugging series, and there's only one more video left. After that, I'll continue on with this one again.
AMAZING content, thank you !!! 🙏
Thanks 👍
Great explanation. Saluti from Italia
What a nice explaination you have done, do you have any other courses on advanced emebdded system.
pls share .
Thanks 👍I don't have any courses or anything like that. This is kind of like a hobby I do for fun.
Awesome tutorials! Do you have the config bits somewhere? I can't get the first example to work - it is not blinking at all.
Whoops... I should've included that too, my bad. It's the same config file I've been using in the series. I'll update the description shortly.
@@Microesque Thank you so much! All of these tutorials have been great! You are explaining everything so well and in great detail!!!
@@ellerycadel Thanks 👍
THANKS MAN
Great explanation, but dark theme made it hard to see.