05-13-2013 07:41 PM
Hello,
The MCP23017 is a 16-Bit I/O Expander with Serial Interface (s2C) and the 74HC4051
is an analog multiplexer/demultiplexer.
I have written an Arduino sketch to drive 2x MCP23017 and 2x 74HC4051.
For the MCP23017 I have used the Adafruit library.
The configuration is used to read voltages from several sources and drive different relays.
Since the sketch is rather long, please follow this link: MUXREV1. You can also find more details
regarding the PCB design and the schematic here: Arduino I/O Expander with MCP23017 and 74HC4051
I like to use the same PCB assembly with an Arduino Uno and Labview.
Since I am new to Labview I would welcome any tips and advice how to create the VIs for these two
multiplexers, e.g. how to integrate the existing library for the MCP23017 in the Arduino interface
or how to create a VI in Labview, are there already similar applications in Labview that I could utilize?
Thanks a lot.
Christoph
05-14-2013 03:23 AM
So, what advantages does this have over just an Arduino Mega?
Since the MCP23017 uses I2C you can use the LIFA I2C functions (VIs). However, this means basically rewriting (aka porting) the Adafruit library in LabVIEW.
05-14-2013 09:28 PM
Hi Nathan,
Thanks for your feedback.
Of course the Arduino Mega will do the job, may be even better.
I have several Arduino Unos, the PCB, components and a working sketch readily available,
but the more important part here is to use this as an learning/training example
and be able to apply the outcome to other projects.
07-07-2013 11:39 AM
Hi. I am a newbie and not an EE. I was able to "read" and "write" to MCP23017 using Labview and arduino over i2c. My demo circuit include writing to MCP23017 "bank-A" for lighting up some LEDs and reading from "bank-B" to read digital output from an ADC0804. Essentially, I followed steps of http://tronixstuff.wordpress.com/2011/08/26/tutorial-maximising-your-arduinos-io-ports/ . All the Hex values were converted to integers.Here is my VI. It is currently working with a Arduino Mega 2560 but not and on a Uno.
Message was edited by: geotech_bd
07-08-2013 01:25 AM
Did you remember to change the settings in the VI for the Uno?
07-08-2013 10:58 AM
I checked. Still does not work with Uno, but works smoothly with Mega. Will update if I can find the error.
07-08-2013 12:56 PM
Could you attach the VI that you are using when you try to run it with the Uno?
07-08-2013 01:28 PM
Here it is: https://decibel.ni.com/content/docs/DOC-30201
07-08-2013 01:44 PM
That doesn't work. You should attach it to your post (as an attachment) and not create a document. When you reply to me, click on the link that says "Use advanced editor" and then you will be able to upload files to your post.
07-08-2013 11:34 PM
Here is the VI.
Message was edited by: geotech_bd