Author Topic: Arduino and ucs5903 PWM LED drivers  (Read 3712 times)

0 Members and 1 Guest are viewing this topic.

Offline fyrewurxTopic starter

  • Contributor
  • Posts: 16
Arduino and ucs5903 PWM LED drivers
« on: March 12, 2013, 10:52:45 am »
Hi everyone,

As the title says I am trying to use Arduino to control some ucs5903 led drivers. The info about these chips is almost nothing. The most useful thing I found is that they are very similar to d705. The first link if you google d705 is the datasheet. Using the shiftout function of the arduino I managed to get the 3 basic colors: red, blue, green using this code in the attachment. I managed to get similar results with the hardware SPI too. The main problem is that I don't understand how to get other colors (except using shiftOut(PIN_DATA, PIN_CLOCK, MSBFIRST, random(0,255);) and how to get dimmed colors. The final project is to create an ambilight using 25 of these controllers. The software I will try to use is lightpack prismatik.

Thank you,

Alex
 

Offline Harvs

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: Arduino and ucs5903 PWM LED drivers
« Reply #1 on: March 12, 2013, 11:45:57 am »
well a quick google search and here's the Chinese datasheet:
http://www.icdemi.com/manual/UCS5903P.pdf


which you can use google's translation on.  However, the timing and data diagram on page 4 is a graphic not text, so you'll need to convert it if you want to translate that bit (which sounds like it's most important to you.)


Or if you ask really nicely perhaps one of our Chinese speaking readers might translate the few words for you so it can make sense.


I imagine that will show what you need to do.
 

Offline fyrewurxTopic starter

  • Contributor
  • Posts: 16
Re: Arduino and ucs5903 PWM LED drivers
« Reply #2 on: March 13, 2013, 03:53:53 pm »
Thank you for your response Harvs.

I checked the datasheet you linked and I think is exatly the info from this datasheet http://www.leds.ru/pdf/D705_en.pdf (it's english). On page 3 is the timing and data diagram. I just don't understand how "The D705 next to the controller receives the first data frame, the frame contains one start bit of ‘1’ and three sets gray scale data of 5 bits for RGB" translates to actual code in Arduino.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Arduino and ucs5903 PWM LED drivers
« Reply #3 on: March 13, 2013, 08:59:51 pm »
The D705 pixel driver seems to use the same data format as the popular LPD6803.  I have used both.  There's plenty of example code out there for the LPD6803.

Basically the R, G & B are 5 bits each and are packed (with a start bit) into 2 bytes.  There is also the 32 bits (4 bytes) of zero at the start of each frame.

So it goes:
  • 4 bytes of zero
  • start bit + all of red bits + part of green bits
  • rest of green bits and all of blue bits
  • Repeat steps 2 and 3
  • All done
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf