I am trying to write to a standard MSP430 I/O pin in the fewest number of clock cycles possible. Obviously for a single pin I can only drive a 1 or 0. The fastest that I've been able to write to these I/O pins is 3 clock cycles both for C and for assembly.
The C code is:
P6OUT = 1; P6OUT = 0;
The assembly code that I have tried is:
//Initialize asm(" MOV.B #1, R7"); asm(" MOV.B #0, R3"); ... //Each of these instructions takes 3 clock cycles asm(" MOV.B R3, &PCOUT_H"); asm(" MOV.B R7, &PCOUT_H");
My question is, can I write to an I/O pin any faster?