Forum Replies Created
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
February 3, 2017 at 1:56 pm in reply to: Using Capture and Compare mode together – PIC 12F1840 #13470GITANJALIParticipant
ok , thanks for your reply . 🙂
February 3, 2017 at 9:53 am in reply to: Using Capture and Compare mode together – PIC 12F1840 #13462GITANJALIParticipantHi,
I’m using PIC 12F1840 (single CCP module) and internal oscillator 16MHz. I want to read Pulse width of input signal at RA2 (input PWM frequency 400Hz). Generate new PWM out (output PWM frequency 18KHz) at RA5 with same pulse width reading at input PWM at RA2.
steps i followed :
1) Capture Mode: detected rising edge (interrupt detection) -> detected falling using capture mode (interrupt detection) at RA2, got pulse width (falling edge – rising edge)
2) Compare Mode : Â write pulse width to RA5 using compare mode
Now, my problem is when controller is in compare mode at the same time my new rising or falling edge get detected system is not able to find new pulse width.
thanking you,
Gitanjali
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)