SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By gcay
#196386
Hi everyone,

I am trying to control 8 LEDs by demultiplexing with CD74HC4067. Here is my connections.

Image

I am using Arduino IDE to program Edison and Arduino library of MUX (DEMUX). Here is my code:
Code: Select all
/**
 * This example demonstrates how to write digital signals
 * It assumes there are LEDs+resistors with the positive lead of the LEDs
 * connected to the 16 channels of the 74HC4067 mux/demux, respectively
 * 
 * For more about the interface of the library go to
 * https://github.com/pAIgn10/MUX74HC4067
 */

#include "MUX74HC4067.h"

// Creates a MUX74HC4067 instance
// 1st argument is the Arduino PIN to which the EN pin connects
// 2nd-5th arguments are the Arduino PINs to which the S0-S3 pins connect
MUX74HC4067 mux(7, 8, 9, 10, 11);

void setup()
{
	// Configures how the SIG pin will be interfaced
	// e.g. The SIG pin connects to PIN 3 on the Arduino,
	//      and PIN 3 is a Digital Output
	mux.signalPin(3, OUTPUT, DIGITAL);
}

// Writes to the 16 channels a HIGH value, one after the other
void loop()
{
	for (byte i = 0; i < 16; ++i)
	{
		// Connects to channel i and writes HIGH
		mux.write(i, HIGH);
		delay(25);
	}
	
	mux.disable();  // Disconnects the SIG pin from any channel
	delay(800);
}
It is working properly with Arduino Uno but when I connect it to Edison, it acts weird. I could not figure out what is wrong with Edison?

Can anyone help me?

Thanks in advance!
By gcay
#196444
Now it is working with Edison Arduino Board.

I am trying to use Edison Breakout Board. As you might know, the breakout board gives 1.8V as output, so it is not enough for DEMUX. I am using 2N2222 transistors. I connect Edison pin to base with 1k resistor and DEMUX to collector with 220 ohm resistor. But when I run the program, there is no voltage on collector. What can be the reason?

Thanks.