Pages: [1]   Go Down
Author Topic: New tutorial - Arduino and the 74HC4067  (Read 6296 times)
0 Members and 1 Guest are viewing this topic.
Melbourne, Australia
Offline Offline
Jr. Member
**
Karma: 6
Posts: 93
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
http://tronixstuff.com/2013/08/05/part-review-74hc4067-16-channel-analog-multiplexerdemultiplexer/
Logged

Check out my Arduino tutorials at http://tronixstuff.com/tutorials - Order my  Arduino book from http://nostarch.com/arduino

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13739
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for sharing,

one remark:  void setPin(int outputPin)   could be

Code:
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

Code:
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.
}
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: