Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Input Capture CAP1 in PIC 18F help !!!

Status
Not open for further replies.

aredhel_vlsi

Member level 4
Joined
Aug 21, 2009
Messages
72
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,013
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.
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top