Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

Help with Labjack U12/Labview project


  • Please log in to reply
5 replies to this topic

#1 zacharslo

zacharslo
  • Members
  • 4 posts

Posted 15 August 2012 - 09:48 AM

So I'm trying to use a breadboard to build a system in which I can control multiple LEDs through the Labjack U12, with fewest possible inputs. So far I have used charlieplexing to create a system of 6 LEDs, controlled by 3 pins. The problem here, however, is that I need to be able to run combinations of LEDs, which I believe can't be done using my strategy. Any help would be hugely appreciated. Zach

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 15 August 2012 - 09:56 AM

I think the only way to provide total control of 8 LEDs, with fewer than 8 IO lines, is to use serial communication.

For digital expansion or multiplexing, we and customers have used a port expander IC. We have used the MCP23S17 before:

http://ww1.microchip...eDoc/21952b.pdf

This would let you use 2-4 IO lines to control 16 LEDs.

#3 zacharslo

zacharslo
  • Members
  • 4 posts

Posted 16 August 2012 - 07:01 AM

Would this allow any combination of the LEDs to be turned on at a time? Zach

#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 16 August 2012 - 09:42 AM

Yes, all 16 I/O can be individually controlled and are not exclusive, so you can have all output-high, all output-low, all input, or any combination of those. In addition, you can easily expand with more ICs. If you use the SPI version, you just need 1 extra I/O line per IC to control CS, and if you use I2C there is addressing so you can do up to 8 ICs with no extra I/O.

#5 zacharslo

zacharslo
  • Members
  • 4 posts

Posted 21 August 2012 - 08:59 AM

Okay so I'm still working on this project. I understand that I could use a Port Expander. Is there a reason that Charlieplexing wouldn't work though? Also, I see that the U12 allows tri state pins like I need, however, I do not know how to set this third state. In other words, boolean true/false correspond to on/off. What input is necessary for the 3rd, high impedance state?

#6 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 21 August 2012 - 09:11 AM

I understand that I could use a Port Expander. Is there a reason that Charlieplexing wouldn't work though?

I had never heard of Charlieplexing, but when I looked it up it seems to turn on one load at a time. See the "Operation Table" here:

http://pcbheaven.com...Charlieplexing/

Also, I see that the U12 allows tri state pins like I need, however, I do not know how to set this third state. In other words, boolean true/false correspond to on/off. What input is necessary for the 3rd, high impedance state?

The U12/U3/U6/UE9 all have tristate digital I/O. The 3 states are output-high, output-low, and input. So, set the line to input to get your 3rd state.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users