Go to Post "PWMed" - Sam N. [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 22-06-2005, 14:18
ImmortalAres ImmortalAres is offline
Registered User
no team
 
Join Date: May 2005
Location: Clarkson University
Posts: 33
ImmortalAres is an unknown quantity at this point
Question about kevin's code

the code found here: http://kevin.org/frc/edu_accel_lcd.zip

contains the following

Code:
// initialize CCP modules 2 & 3
	TRISEbits.TRISE7 = 1;		// set CCP pins to inputs
	TRISGbits.TRISG0 = 1;

	PIE2bits.CCP2IE = 0;		// disable the CCP interrupts
	PIE3bits.CCP3IE = 0;

	T3CONbits.T3CCP1 = 0;		// CCP 2 captures timer 1, CCP 3 captures timer 3
	T3CONbits.T3CCP2 = 1;

	CCP2CON = 0x05;				// initialize CCP modules to capture on each rising edge
	CCP3CON = 0x05;

	IPR2bits.CCP2IP = 0;		// CCP modules use the low priority interrupt
	IPR3bits.CCP3IP = 0;		//

	PIR2bits.CCP2IF = 0;		// make sure the interrupt flags are zero before...
	PIR3bits.CCP3IF = 0;		//

	PIE2bits.CCP2IE = 1;		// enable the CCP interrupts
	PIE3bits.CCP3IE = 1;		//
my question is about the 2 lines

Code:
T3CONbits.T3CCP1 = 0;		// CCP 2 captures timer 1, CCP 3 captures timer 3
T3CONbits.T3CCP2 = 1;
this doesn't make sense to me. can someone please explain what's going on, the comment doesn't seem to match the code or does it and i'm jsut missing it

Thanks
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we load 2004 code? colt527 Programming 5 15-02-2005 19:48
Need Advice On Code Out Of Box...New To This gemccnp Programming 4 30-01-2005 18:57
Operator Interface code RiotingNerd Programming 5 07-02-2004 21:13
Rookie Programmer has question about the default code DanL Programming 3 26-01-2002 19:59


All times are GMT -5. The time now is 23:10.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi