Author |
Message |
Topic: Generate Pulse used CCP1 Capture |
soondin
Replies: 7
Views: 8071
|
Forum: General CCS C Discussion Posted: Tue May 17, 2011 1:18 am Subject: Generate Pulse used CCP1 Capture |
This is my new code.
I've remove following (inside while loop) and used offset value.
// got_pulse_width = FALSE;
Almost work fine. but some time can't detect no signal input or mak ... |
Topic: Generate Pulse used CCP1 Capture |
soondin
Replies: 7
Views: 8071
|
Forum: General CCS C Discussion Posted: Tue May 17, 2011 12:58 am Subject: Generate Pulse used CCP1 Capture |
As a test, run your original code with a 1 ms pulse input.
Please see link it's a input 1ms with my code
http://twitpic.com/4yr5cz
I can make some square pulse with remove some routine.
but ... |
Topic: Generate Pulse used CCP1 Capture |
soondin
Replies: 7
Views: 8071
|
Forum: General CCS C Discussion Posted: Mon May 16, 2011 8:39 pm Subject: Generate Pulse used CCP1 Capture |
Thank you PCM programmer,
I don't know the repetition rate for your incoming pulses to the CCP1 pin, so I put in a 2ms period between pulses.
My pulse(Square) range is from around 14ms to 300 ... |
Topic: Generate Pulse used CCP1 Capture |
soondin
Replies: 7
Views: 8071
|
Forum: General CCS C Discussion Posted: Mon May 16, 2011 10:41 am Subject: Generate Pulse used CCP1 Capture |
If the delay is twice as long as to be expected, make sure your #use delay statement has the correct clock frequency in it.
I think my delay and clock setting is correct
When work following else ... |
Topic: Generate Pulse used CCP1 Capture |
soondin
Replies: 7
Views: 8071
|
Forum: General CCS C Discussion Posted: Mon May 16, 2011 8:25 am Subject: Generate Pulse used CCP1 Capture |
Hello All,
It's a code for pulse converter.
I used some code from this forum.
My target is get some pulse from sensor and send that pulse to other module.
When pulse reach to target, I hope to ... |
Topic: Capture and Generate Pulse |
soondin
Replies: 2
Views: 3927
|
Forum: General CCS C Discussion Posted: Wed May 11, 2011 2:03 am Subject: Capture and Generate Pulse |
Thank you for good informations.
I've add followings codes, Looks like be more better.
Still my code have problems, I can't back to PIN_A0 to high.
If input make some changed width pulse to CC ... |
Topic: Capture and Generate Pulse |
soondin
Replies: 2
Views: 3927
|
Forum: General CCS C Discussion Posted: Tue May 10, 2011 5:43 am Subject: Capture and Generate Pulse |
Hello All.
I try to capture pulse width from around 14ms to 300us with CCP pins
and no input(I don't know it's 0 or unlimited)
and it's use to generate pulse at PIN_A0.
Following is my code.
... |
Topic: How can I make exact delay_us or pulse ? |
soondin
Replies: 3
Views: 6300
|
Forum: General CCS C Discussion Posted: Thu Apr 21, 2011 6:19 am Subject: How can I make exact delay_us or pulse ? |
Thank you for reply.
unsigned long rise,fall,p_wid,us;
This is set of my Vals.
Using your code....
You'll have to 'compensate' for the time to be in the ISR as well as your output.. function ... |
Topic: How can I make exact delay_us or pulse ? |
soondin
Replies: 3
Views: 6300
|
Forum: General CCS C Discussion Posted: Thu Apr 21, 2011 5:01 am Subject: How can I make exact delay_us or pulse ? |
Hello All,
Following is part of my code.
---------------------------------------
#int_ccp2
void isr()
{
rise = CCP_1;
fall = CCP_2;
p_wid = fall - rise;
}
void m ... |
|