CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

pic16f873 CCP feature

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
anandpv2009



Joined: 26 Jul 2009
Posts: 31

View user's profile Send private message

pic16f873 CCP feature
PostPosted: Sun Jul 26, 2009 4:59 am     Reply with quote

I am trying to make a project but I need some sample program to understand CCP feature of pic16f873 and ADC of this micrcontroller

Capture
Compare
PWM
CCP
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jul 26, 2009 2:26 pm     Reply with quote

Get a "text search" program such as Examine32, or maybe another
program that is free. Set it to search the CCS Examples directory.
Search for the function that is used to setup the CCP module, which is:
setup_ccp1. Run it, and you will get results like these:
Quote:

c:\program files\picc\examples\ex_ccp1s.c 1/7/08 11:24:54 AM 4477
setup_ccp1(CCP_COMPARE_CLR_ON_MATCH); // Configure CCP1 in COMPARE mode
setup_ccp1(CCP_COMPARE_SET_ON_MATCH); // Configure CCP1 to set
setup_ccp1(CCP_COMPARE_CLR_ON_MATCH); // Configure CCP1 in COMPARE

c:\program files\picc\examples\ex_pwm.c 10/10/07 9:44:58 AM 7447
setup_ccp1(CCP_PWM); // Configure CCP1 as a PWM

c:\program files\picc\examples\ex_ccpmp.c 8/3/05 11:41:20 AM 3379
setup_ccp1(CCP_CAPTURE_RE); // Configure CCP1 to capture rise
setup_ccp2(CCP_CAPTURE_FE); // Configure CCP2 to capture fall

c:\program files\picc\examples\ex_react.c 5/12/09 10:04:04 AM 4881
setup_ccp1(CCP_CAPTURE_RE);
setup_ccp1(CCP_CAPTURE_FE);

This shows 4 filenames (and their directory location) that setup the CCP.

Also, for more examples, you could search on my name in the CCS
search page, and search for these terms:
Quote:
Tachometer
set_pwm1_duty
read_adc volts

On the last one, set it to: Search for all terms
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Sun Jul 26, 2009 2:29 pm     Reply with quote

ok as far as you say -
but WHICH feature do you need ?

Capture compare for event duration / freq measurement ?

OR?
PWM generation ?

OR?
fixed frequency generation ?


what you ask is WAY too broad

what are you trying to DO ?

more specificity would be required to know how to craft an answer
that you would understand.
anandpv2009



Joined: 26 Jul 2009
Posts: 31

View user's profile Send private message

PostPosted: Wed Jul 29, 2009 8:46 am     Reply with quote

asmboy wrote:
ok as far as you say -
but WHICH feature do you need ?

Capture compare for event duration / freq measurement ?

OR?
PWM generation ?

OR?
fixed frequency generation ?


what you ask is WAY too broad

what are you trying to DO ?

more specificity would be required to know how to craft an answer
that you would understand.


I am trying to built a Ultrasonic Range meter and I need to understand more about capture feature of this mc.

Thanks.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Wed Jul 29, 2009 1:01 pm     Reply with quote

you might check out:

http://www.ccsinfo.com/forum/viewtopic.php?t=23425&highlight=ultrasonic+range

http://www.ccsinfo.com/forum/viewtopic.php?t=24332&highlight=ultrasonic+range


as a starting point
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group