aredhel_vlsi
Member level 4
Hello people, I am trying to understand the Input Capture.
I use 18f4331 PIC and a 10MHz crystal.
You see, I 've got this problem. I used CAP1 of the 18F Microchip's PIC to toggle a led connected to RC0. I also use another led connected to RC0. I've connected the RA2 pin to RC3. When the RC3 changes state, the CAP1 detects this and the Leds toggle simultaneously. I've done this for a first indication. My problem is this ;
I want to change the PWM state in PWM 1 and PWM 3 but it seems my code is wrong because it doesn't understand that. It just preserves the initial state of my bootup function 50% PWM.What do I forget to activate so as to change the PWM state? I use the ic_flag for the interrupt, and when it is set, the main executes the code under the ic_flag.
I've attached my code, please have a look and let's talk about it, so as to have a brainstorming. I guess someone might have done something similar. I use Power control mode to send the PWM.
Nevermind, it is ok now.
I use 18f4331 PIC and a 10MHz crystal.
You see, I 've got this problem. I used CAP1 of the 18F Microchip's PIC to toggle a led connected to RC0. I also use another led connected to RC0. I've connected the RA2 pin to RC3. When the RC3 changes state, the CAP1 detects this and the Leds toggle simultaneously. I've done this for a first indication. My problem is this ;
I want to change the PWM state in PWM 1 and PWM 3 but it seems my code is wrong because it doesn't understand that. It just preserves the initial state of my bootup function 50% PWM.What do I forget to activate so as to change the PWM state? I use the ic_flag for the interrupt, and when it is set, the main executes the code under the ic_flag.
I've attached my code, please have a look and let's talk about it, so as to have a brainstorming. I guess someone might have done something similar. I use Power control mode to send the PWM.
Nevermind, it is ok now.
Last edited: