Hi all,
I'm playing with a PIC18F45K20 using MPLAB IDE and Sourceboost C compiler, and would like to set multiple outputs (from different registers) simultaneously, if possible. I am using the following as outputs:
RD0, RD1, RD2, RD3
RC4, RC5, RC6, RC7
As an example, I would like to set RD0, RD1 and RC5 to output high at the same time. I know I can do it individually with very minimal delay:
set_bit(latd,0);
set_bit(latd,1);
set_bit(latc,5);
Or have the contents of one register set and then the other:
latd = 0b00000011;
latc = 0b00100000;
But I would like to have them all set high at the same time if possible. Can it be done?
I'm playing with a PIC18F45K20 using MPLAB IDE and Sourceboost C compiler, and would like to set multiple outputs (from different registers) simultaneously, if possible. I am using the following as outputs:
RD0, RD1, RD2, RD3
RC4, RC5, RC6, RC7
As an example, I would like to set RD0, RD1 and RC5 to output high at the same time. I know I can do it individually with very minimal delay:
set_bit(latd,0);
set_bit(latd,1);
set_bit(latc,5);
Or have the contents of one register set and then the other:
latd = 0b00000011;
latc = 0b00100000;
But I would like to have them all set high at the same time if possible. Can it be done?