dsPIC33EP Timer1 Custom Interrupt

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

dsPIC33EP Timer1 Custom Interrupt

Post by QMESAR »

Hi Ben /leigh,
Do you guys have a small example how to setup the Timer1 interrupt as a custom code in FC8 ,(dsPIC33EP)
I do not need the bit values of the registers my problem is the ISR function with the vector .
I have it in mikroC but that is not as it should be in Flowcode

In mikroC it look like this the ISR Function, I am looking for the FC-XC16 variant :D
:shock:

Code: Select all

void Timer1Int() iv IVT_ADDR_T1INTERRUPT
 {
  T1CONbits.TON = 0;
  T1IF_bit = 0;    // clear T1IF
  if(Index >=11){Index = 0;}
  else{Index++;}
  TMR1 = 0;
  PR1 = SignalTime[Index];
  SignalPin = SignalLevel[Index];
  T1CONbits.TON = 1;
}

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: dsPIC33EP Timer1 Custom Interrupt

Post by QMESAR »

Guys
it seems it is done this way :D Can you confirm this if possible

Code: Select all

void __attribute__((__interrupt__, no_auto_psv)) _T1Interrupt()
{
 // code in here
}

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: dsPIC33EP Timer1 Custom Interrupt

Post by QMESAR »

Hi All.

Ok the posted Interrupt syntax seems to work fine just for those who has or will have the same confusion as me :D

Post Reply