New tutorial - Arduino and the 74HC4067

If you're interested in the 74HC4067 16-Channel Analog Multiplexer Demultiplexer and how it can be controlled with the Arduino, check out our new tutorial:

Thanks for sharing,

one remark: void setPin(int outputPin) could be

void setPin(uint8_t outputPin)  // use smallest datatype possible
// function to select pin on 74HC4067
{
  PORTD =  controlPins[outputPin] | (PORTD & 0x0F);  // keep the state of the lower 4 pins.
}

or without controlPins array

void setPin(uint8_t outputPin)  // use smallest datatype possible
// function to select pin on 74HC4067
{
  PORTD =  (outputPin << 4) | (PORTD & 0x0F);  // keep the state of the lower 4 pins.
}