How is software interrupt best generated on a PIC? Most reliable seem to make a pheripheral generate an interrupt i.e by loading a timer so it will wrap immediately/very soon, or manipulate the RB0/INT pin so that generates an interrupt. But I need the timers for other tasks, and manipulating RB0/INT violates the interrupt on change functions. An idea might be to directly set a pending flag (and of course the enable bit) for an else unused interrupt source. The manuals tell some of them are read/write :) My worry about that is that the BSF command is a read-modify-write opeartion, and what will happen if an interrupt flag get set by hardware between the read and write of the BSF. Probably that interrupt flag will be overwrittten with the previous state! Are there more reliable solutions? Some experience? Regards /Morgan Morgans Reglerteknik, HŠllekŒs, 277 35 KIVIK, SWEDEN tel +46(0)414-446620, fax -70331, mrt@iname.com