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.
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.
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... 🤔 👍
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
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.
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.
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.
Much appreciated! You explain beautifully clear and the practical implementation hit the points home. Well done!
Thanks👍
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.
You produce a very valuable content, amazing!
Thanks 👍
Very useful tutorial, thank you so much
Thanks 👍
He is right. I'm a beginner and experience the same mismatch problem. Thank you very much
Appreciate the compliment 👍
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... 🤔
👍
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
"cryptic" is an understatement....
Very clear and articulate. Thank you!
Thanks 👍
Really thanks you, I was searching an explanation of Interrupt on change and your video develope all we have to know. 🤩 New Suscriber!
Thanks 👍
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.
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.