RobG 1,892 Posted November 3, 2012 Author Share Posted November 3, 2012 Rob, how much is shipping? Your shipping is free, I will just ship them with other stuff. bluehash 1 Quote Link to post Share on other sites
soma4all 0 Posted November 6, 2012 Share Posted November 6, 2012 If I counted correctly, you have 30 LEDs left - I'd like to claim them, if possible. Thanks! Quote Link to post Share on other sites
RobG 1,892 Posted November 8, 2012 Author Share Posted November 8, 2012 Just FYI, parts are here, strips were tested and are OK. I didn't expect them to arrive so quickly, so I am not sure if I will be able to ship tomorrow. Those are very cool LEDs BTW, one wire 24bit color! bluehash and GeekDoc 2 Quote Link to post Share on other sites
RobG 1,892 Posted November 9, 2012 Author Share Posted November 9, 2012 5050/WS2811 code example.Can be used for any number of LEDs, default is 30 (0.5m strip.)For faster updates, change data to u_char and send all bytes one by one. #include <msp430g2553.h> typedef unsigned char u_char; typedef unsigned int u_int; typedef struct { u_char r; u_char g; u_char b; } RGBLED; #define DATA_OUT_PIN BIT7 void sendRGB(u_char numberOfLEDs); RGBLED data[30] = { 0, }; // 0.5m strip void main(void) { WDTCTL = WDTPW + WDTHOLD; BCSCTL1 = CALBC1_16MHZ; DCOCTL = CALDCO_16MHZ; // setup USIB P1SEL |= DATA_OUT_PIN; P1SEL2 |= DATA_OUT_PIN; UCB0CTL0 |= UCCKPH + UCMSB + UCMST + UCSYNC; // 3-pin, 8-bit SPI master UCB0CTL1 |= UCSSEL_2; // SMCLK UCB0BR0 |= 0x03; // 1:3 - 16MHz/3 = 0.1875us UCB0BR1 = 0; UCB0CTL1 &= ~UCSWRST; u_char c = 0; while (c < 30) { data[c].r = c << 3; data[c].g = 255 - (c << 3); c++; } sendRGB(30); } void sendRGB(u_char numberOfLEDs) { u_int c = 0; u_char led = 0; u_char leds[3]; u_char d; while (c < numberOfLEDs) { leds[0] = data[c].g; leds[1] = data[c].r; leds[2] = data[c].b; while (led < 3) { u_char b = 0; d = leds[led]; while (b < 8) { while (!(IFG2 & UCB0TXIFG)) ; (d & 0x80) ? (UCB0TXBUF = 0xF0) : (UCB0TXBUF = 0xC0); d <<= 1; b++; } led++; } led = 0; c++; } _delay_cycles(800); // delay 50us to latch data, may not be necessary } The function below is for faster updates u_int c = 0; while (c < numOfIndividualLEDs) { u_char b = 0; u_char d = data[c]; while (b < 8) { while (!(IFG2 & UCB0TXIFG)) ; (d & 0x80) ? (UCB0TXBUF = 0xF0) : (UCB0TXBUF = 0xC0); d <<= 1; b++; } c++; } //_delay_cycles(800); // delay 50us to latch data GeekDoc 1 Quote Link to post Share on other sites
RobG 1,892 Posted November 9, 2012 Author Share Posted November 9, 2012 Shipped: Rickta59 oPossum Touch (you will get 2 envelopes, my fault :-( ) Mtlevine Soma4all thanhtran thanhtran 1 Quote Link to post Share on other sites
touch 34 Posted November 9, 2012 Share Posted November 9, 2012 Awesome Rob, Thanks! Quote Link to post Share on other sites
RobG 1,892 Posted November 11, 2012 Author Share Posted November 11, 2012 Booster Pack anyone? Suggestions? Quote Link to post Share on other sites
bluehash 1,581 Posted November 11, 2012 Share Posted November 11, 2012 Booster Pack anyone? Suggestions? Don't you already have one,.. RGB lamp? Quote Link to post Share on other sites
mtlevine0 14 Posted November 11, 2012 Share Posted November 11, 2012 Booster Pack anyone? Suggestions? I'd be interested in a couple. Quote Link to post Share on other sites
GeekDoc 226 Posted November 12, 2012 Share Posted November 12, 2012 Booster Pack anyone? Suggestions? You know I'm always down for booster packs. :grin: Quote Link to post Share on other sites
Rickta59 589 Posted November 12, 2012 Share Posted November 12, 2012 Thanks for organizing this Rob! Just grabbed my 1m strip from my PO Box. So can i drive the DataIn pin with 3.5volts and power with 5volts with a common ground between them? -rick Quote Link to post Share on other sites
RobG 1,892 Posted November 12, 2012 Author Share Posted November 12, 2012 Yes, you can power with 5V and drive with lower voltage. 0.5m (and even 1m) strips can be powered directly from LP, though I would do it just for testing. Quote Link to post Share on other sites
touch 34 Posted November 13, 2012 Share Posted November 13, 2012 Got my LED's today. Got any strips left? I got my LED's today and now wish I ordered some strips. Quote Link to post Share on other sites
cubeberg 540 Posted November 13, 2012 Share Posted November 13, 2012 RobG - Does this use a standard eagle part, or did you create one? A simple BOB would be pretty cool - especially since I only ordered a handful. Something like this. I need to start on a wearable 430 board sometime - I've thought about it a couple of times. My kids would probably get a big kick out of it. Quote Link to post Share on other sites
RobG 1,892 Posted November 13, 2012 Author Share Posted November 13, 2012 Created one.(Updated 12/12, added package with longer pads) 5050WS2811.lbr cubeberg, bluehash and thanhtran 3 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.