It is possible to control pic microcontroller outputs easy with array? For example, i want to control RA0, RA1 and RA2 outputs only and set RA0 to 0, RA1 to 0 and RA2 to 1. I will create variable:
unsingned short int PORT[3]={PORTA.B0, PORTA.B1, PORTA.2}.
Is any way simply to set desired RA0, RA1 and RA2 low or high, like:
PORT[3]={0, 0, 1}.
or i must to set each output separately, like:
PORT[0]=0;
PORT[1]=0;
PORT[2]=1;
unsingned short int PORT[3]={PORTA.B0, PORTA.B1, PORTA.2}.
Is any way simply to set desired RA0, RA1 and RA2 low or high, like:
PORT[3]={0, 0, 1}.
or i must to set each output separately, like:
PORT[0]=0;
PORT[1]=0;
PORT[2]=1;