NOTE-1: In 4:42 , if you look at the default states of the IOCB bits, you can see that, they're all turned on by default. So, even though I tried to only enable the RB5 and RB4 pins, RB6 and RB7 pins were also enabled. This likely didn't cause any issues since those lines were connected to the programmer, but make sure to clear the bits for the pins you don't want to use! I assumed they would be disabled by default since interrupt sources are always disabled by default (and they should be)... Goes to show you that you shouldn't assume anything 👍 ------------------------ NOTE-2: In the examples, I used global variables to save the previous states of the pins; however, you should avoid using global variables wherever you can. Since those global variables are only used in the interrupt routine, you're better off using "STATIC" variables defined inside the routine. For beginners, static variables are usually confusing, while global variables are straight-forward, hence the choice.
@zanderpolson5170 Жыл бұрын
Much appreciated! You explain beautifully clear and the practical implementation hit the points home. Well done!
@Microesque Жыл бұрын
Thanks👍
@ryleebrownfox6 ай бұрын
He is right. I'm a beginner and experience the same mismatch problem. Thank you very much
@Microesque6 ай бұрын
Appreciate the compliment 👍
@alfredomamani226911 ай бұрын
Really thanks you, I was searching an explanation of Interrupt on change and your video develope all we have to know. 🤩 New Suscriber!
@Microesque11 ай бұрын
Thanks 👍
@bartoszjozwicki4541 Жыл бұрын
You produce a very valuable content, amazing!
@Microesque Жыл бұрын
Thanks 👍
@thanhphucnguyen84366 ай бұрын
Very useful tutorial, thank you so much
@Microesque6 ай бұрын
Thanks 👍
@SanelKeys Жыл бұрын
About 6 years ago I've used RB4-7 interrupts on change on PIC18F4520 and PIC18F452 for HALL sensor inputs on BLDC sensored control. Every change I've read Port B state and depending on state, turn appropriate sequence on PORTD as driving port for 3-phase bridge. I've used CCS PIC C compiler. Great video.
@NoodleFlame Жыл бұрын
Thank you for making this video and providing the code. It's my first time using PIC's so this has really helped me to understand the PIC12f data sheet, which as a beginner, is quite daunting and cryptic
@paradiselost99466 ай бұрын
"cryptic" is an understatement....
@DiscoPumpkin11 ай бұрын
Very clear and articulate. Thank you!
@Microesque10 ай бұрын
Thanks 👍
@SpinStar1956 Жыл бұрын
Great info -- Thanks! Just came across your channel. 😀 Also, just getting started with a PIC 16F18456 so will be very interested in your other videos... 🤔 👍
@sravankumarreddy8063Ай бұрын
Hello sir, Good article which would be helpfull for beginers, But when i am using alternating signal to detect zero crossing signal, I am not able to find the signal whether it crosses zero axis. I am using to detect three phase(440v 50Hz) by zerocrossing with the help of PIC12f1501. Could you please help me on that or can you please make one tutorial on that.
@MicroesqueАй бұрын
There are many ways to detect zero crossings, you don't even really need a microcontroller depending on what you're trying to do. Without seeing your circuit I can't really help you.