Hi, ,i am an arduino beginner. i have a programming problem. Is there any efficient way to do the digital parallel output. While programming directly to AVR, we only need to give the data to PORTXn.
I use the following function to do so. But it may take a little long to finish writing. So i hope somebody can help me.
Thanks.
int Dpin[]={3,4,5,6,7,8,9,10};
void sendPin(byte j)
{
    for (int n=0;n<8;n++)
   {
      if((0x01&j) < 0x01)
        {digitalWrite(Dpin[n],LOW);}
        else
        {digitalWrite(Dpin[n],HIGH);}
      j>>=1;
   }
}