|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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; // Code:
T3CONbits.T3CCP1 = 0; // CCP 2 captures timer 1, CCP 3 captures timer 3 T3CONbits.T3CCP2 = 1; Thanks |
|
#2
|
||||
|
||||
|
Re: Question about kevin's code
I think that it means that whichever one you set to 1 will be the one that works.
That help any? |
|
#3
|
||||
|
||||
|
Re: Question about kevin's code
Quote:
|
|
#4
|
|||
|
|||
|
Re: Question about kevin's code
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |