dsPic Forum
dsPic Directory
   Add url

Unusual Research
Wearable Smart Sesors
Emdedded Systems
Software Safety
dspic microchips

'interruptions input capture dspic30f4013'




- Test and Measurement
interruptions input capture dspic30f4013
Tags: interruptions, input, capture, dspic30f4013

team drone (134.59.142.75) - Thu Jun 5 04:12:03 2008

good moorning!!!

this is my problem :

I use a input capture modul of dspic to detect edges.

my input capture configuration :

/* Input Compares */

/* Config : Timer 3 for all, idle mode ON */

IC1CON = 0x0003; // Rising edge only

IC2CON = 0x0003; // Rising edge only

IC7CON = 0x0003; // Rising edge only

IC8CON = 0x0001; // Rising and falling edge

/* Enabling Interrupts for Input Compare */

IEC0bits.IC1IE = 1;

IEC0bits.IC2IE = 1;

IEC1bits.IC7IE = 1;

IEC1bits.IC8IE = 1;

/* Interrupts priority (priority decrease IC8 to IC1) */

IPC0 = 0x0040; // set IC1 priority

IPC1 = 0x0005; // set IC2 priority

IPC4 = 0x0760; // set IC7 and IC8 priority

/* Clear interrupt flags */

IFS0bits.IC1IF = 0;

IFS0bits.IC2IF = 0;

IFS1bits.IC7IF = 0;

IFS1bits.IC8IF = 0;

and one of my interupt fonction is (the four functions are all same) :

void __attribute__ ((__no_auto_psv__ )) _IC1Interrupt (void) {

IFS0bits.IC1IF = 0; // Clear flag

TMR3 = 0;

T3CON = 0x8000; // Start Timer 3

}

I use demo board dsPICDEM2 with mplab and c30.

But when I put the chip on my own board, interrupts functions doesn't run anymore.

I checked the voltages and connectors on my board, everything is allright !

I tested capture interrupt alone (I invert an output each time I go in interrupt), and it doesn't run. So I never go in interrupt functions.

Moreover, when I test the program on the demo board (dspicdem2) it runs perfectly in debug mode, but nothing in programmer mode

Is there a specific configuration I could have miss ?

Here is the configuration of my pic :

_FOSC(CSW_FSCM_OFF & HS); // External Crystal

_FWDT(WDT_OFF); //watch dog off

_FBORPOR(MCLR_DIS & PWRT_OFF);

_FGS(CODE_PROT_OFF);

thank you for your help (and sorry for my english !).


You are not logged in. It is recommeded that you post messages and comments with a dspic.org profile. You can login or register. You will be protected from spam and have more features. Registration is quick and easy. You can also post as a casual user with the form below. Your IP address will be published with your email address (if provided below).

Submit a follow up to this message.

Please submit a new reply here. HTML is not allowed and you are encouraged to seperate your paragraphs with a double blank line for readablity. More fun in the sun. Please make sure your message is interesting and relevant to Test and Measurement, and this message: If you wish to start a new message click here. dspic.org

interruptions input capture dspic30f4013; Test and Measurement

Everything you enter will be published.

Name:           
E-Mail:         

Optional (please add to our directory first)
Web Link:       
Link Title:     

Message:




dspic.org Submit Reply. Please do not submit the same message more than once.




Login or Register

dsPIC Forum

    Top Searches: • dspicdem2 • c30 input capture •

    For the full benefit of dspic.org website please register and login. You can upload your photos and interact with other users better.

    Login with Email: Password:
    Not a member? Register: Register for dspic.org

    Note: once you register your email address with dspic.org it is used across our whole network of forums and blogs. You can create seperate profiles for each forum or blog, but use the same login.



    <a href="http://directory.dspic.org/Test_and_Measurement">interruptions input capture dspic30f4013; Test and Measurement</a>interruptions input capture dspic30f4013; Test and Measurement

    (wrtzypzwteziy)

    Privacy Policy
    Test and Measurement 'interruptions input capture dspic30f4013'