| ??? 11/25/04 12:55 Read: times |
#81927 - Sorry I small typpo in earlier post. Responding to: ???'s previous message |
Hi Friends,
In hurry I missed copying some lines of my ISR. These lines I couldnt see because of a lot of commented stuff around them Here are the correct ISR.
/*********Interrupt function for timer 1****************
This interrupt is always on and is 100us*/
void t1_isr(void) interrupt 3
{
SYSTIME++; //increament the SYSTIME variable used for fire timing
if (SYSTIME>firedly && firecount && ttbit && onfire)
{
FIREPORT=!FIREPORT; //Put the fire pulse
firecount--; //Reduce remining pulse counter.
}
else
FIREPORT=1; //Make fire pin 1 to keep transistor off.
ttbit=!ttbit; //fwbit to make firing pulse 200us
}
/*ISR for PCA modules 0 This interrupt is always ON*/
void cf_isr(void) interrupt 6 using 2
{
TR1=0;
TF1=0;
TL1=0x7c; //system timer ticks once 100us.
TR1=1;
firecount=6; //set 6 pulses to be sent.
fwbit=!fwbit;
if (fwbit)
cycles++; //Increament cycles every 2 half cycles.
ioport=OPSTATUS; //Refresh Output ports.
SYSTIME=0x00; //Reset SYSTIME variable.
CCF0=0; //clear the interrupt flag.
}
Thanks & Regards, Prahlad Purohit |



