Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 278723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T01:16:59+00:00 2026-05-12T01:16:59+00:00

I’ve just bought a Rainbowduino to control a load of individual LEDs (NOT an

  • 0

I’ve just bought a Rainbowduino to control a load of individual LEDs (NOT an RGB matrix). All the documentation so far is aimed towards controlling RGB arrays which is not what I’m after.

If you’re unfamiliar with the Rainbowduino it’s an Arduino clone with 24 constant current channels of 120 mA, 8 super source driver channel of 500 mA each and a wide output voltage adaption from 5 V – 12 V DC. Perfect for driving LEDs. The product webpage is here: http://www.seeedstudio.com/blog/?page_id=187

I’ve connected up 16 LEDs and want to be able to turn each one on and off individually with digitalWrite(). I’ve uploaded some demo code to the board which isn’t really working. I’ve worked out that the 8 driver source channels are easily controllable with digitalWrite() on pins 3-11. However controlling the other 24 sink channels is more difficult. Apparently they are controlled by 3 shift registers (one each) which I can only access with shiftOut. I’ve got no idea how this works. Can somebody help point me in the right direction?

Half the LEDs are wired into Blue 1-8 and the other half are wired into Green 1-8. The positive legs are wired into VCC1-2 which have been set to HIGH. I’m confident the circuit is wired up correctly, it’s the programming I’m having issues with.

I’ve looked over the sample code which is shipped with the Rainbowduino, but I can’t make sense of it. How can I fix this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T01:16:59+00:00Added an answer on May 12, 2026 at 1:16 am

    The use of a shift register to multiplex (or de-multiplex, depending on your point of view) inputs/outputs is very common in digital electronics.

    Basically, you trade saving pins on your controller for having to include another chip (the shift register) in the design.

    In this case, the register works as a serial-to-parallel converter; it has a serial input line, which is fed with bits from your CPU. It also has 8 parallel outputs, connected to an 8-bit memory that is loaded serially from the CPU. Using this, you can “shift out” 8 bits of data on a single pin (plus one pin for clocking, typically), which are then stored in the shift register and can drive 8 LEDs in parallel.

    In this particular case, you need to figure out which AVR port pins the shift registers (the MBI5168 constant-current sink drivers contain the shift registers, here) are connected to. They ought to be chained to a pair of outputs, one for data and one for clock. Once you know those pins, you should be able to drive them yourself using the ShiftOut command.

    Digging a bit further, this sample “sketch” contains the following definitions, in the file called “Rainbow.h”:

    //MBI5168
    #define SH_DIR_OE    DDRC
    #define SH_DIR_SDI   DDRC
    #define SH_DIR_CLK   DDRC
    #define SH_DIR_LE    DDRC
    
    #define SH_BIT_OE    0x08
    #define SH_BIT_SDI   0x01
    #define SH_BIT_CLK   0x02
    #define SH_BIT_LE    0x04
    
    #define SH_PORT_OE   PORTC
    #define SH_PORT_SDI  PORTC
    #define SH_PORT_CLK  PORTC
    #define SH_PORT_LE   PORTC
    

    This is of course total digital “hearsay” (I don’t own the device, I’ve never programmed on any kind of *duino), but I’d say this is the particle-spewing bullet delivery system you’re looking for.

    I interpret this like so:

    • PORTC is the one connected to the shift registers, all control pins are in PORTC.
    • Four pins are dedicated (rather than the optimistic two I mentioned above).
    • The clock is pin PORTC:2 and the data is PORTC:1.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a JSP page retrieving data and when single or double quotes are
I'm looking for suggestions for debugging... If you view this site in Firefox or
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.