What's the fastest way to toggle a bit1 in MPASM for the 14-bit enhanced instruction set? (I'm working with a PIC16F1829)
The code has to be standalone – I mean that it can be called on any moment, without knowing the value of the bit on that moment.
Key criteria is speed here: a program with fewer instruction cycles is better. The number of instructions cycles is calculated as the number when the bit is 0 + the number when the bit is 1, divided by 2.
1: with toggle I mean that the code has to be similar to
pin=!pin in C