Jump to content
43oh

spreng37

Members
  • Content Count

    33
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by spreng37

  1. Oooh, ok. I knew Xin and Xout could be used as I/O but didn't know they were considered P2. MOSI is SIN...also did not know. Cool, thanks!!
  2. Awesome! Couple questions... You have MOSI and DCPRG both defined to BIT7, commenting that DCPRG is P2. Since the 2231 doesn't have a Port 2 and the 5940 doesn't have a pin labelled MOSI I assume BIT7 just goes to DCPRG and MOSI is simply for the programming. I have it all on the breadboard but first attempt wouldn't produce any output - I'm sure there's something I'm missing. Should SIN, SOUT and/or XERR be brought low? High? Just to be clear, P1.0 to VPRG, P1.1 to XLAT, P1.2 to BLANK, P1.4 to GSCLK, P1.5 to SCLK and P1.7 to DCPRG.
  3. Currently using an MSP430G2231 controlling two TLC5916s. I'd like to use one TLC5940 to save on space but I'm having a hard time editing the code for use with a 5940. I've studied many examples here but they all seem to use the G2553 and I don't know what parts of the code will or will not work for the G2231. Here's the current code I'm using for two TLC5916s (thanks to the awesome RobG): #include "msp430G2231.h" #include "pattern.h" #define OE BIT6 #define SDI BIT5 #define CLK BIT4 #define LE BIT0 // 16 levels of brightness const char lut[16] = { 0, 3, 6, 10, 20, 30, 40, 60, 80,
  4. Remade my breadboard after some coffee and a shower... now it works flawlessly Thanks all!
  5. Have RST to Vcc, that's what I meant. VPRG and DCPRG are @GND; 100uF cap on the power rail. I'll rebuild from scratch, see what happens. I haven't had any coffee yet, maybe that's the problem! lol
  6. I do actually have a 0.1uF cap for the TLC, just forgot to include it in the photo. As for the RST, I am dumb...that's what I get for doing that at 1am. Was told elsewhere that VPRG needs to be connected to ground and DCPRG needs to be low. Did this and the LEDs aren't going crazy anymore but the sequence isn't working (Out0 is lit steady). Anything else I'm missing?
  7. Trying a sample knight rider LED code using MSP430G2231 and TLC5940. MSP, TLC and LEDs powered at 3.3V, 47k ohm resistor on MSP RST, 750 ohm on TLC IRef. 0.1uF cap on MSP Vcc/GND. Got everything connected on the breadboard and applied power. Not only did the sequence not work, the LEDs were going crazy...flashing at different PWM frequencies, sometimes not on at all, sometimes fully bright, etc. Double checked my connections, no change. Tried powering the TLC at 5V, no change. Tried another TLC5940, same result. Tried another MSP, same. Tried another breadboard, same. Tried a different Lau
  8. Here's the end result: 80 Osram PointLEDs, MSP430G2231, 2 x TLC5916. Still want to try the the 5940 to reduce components.
  9. That did the trick! Is there a RobG fund I can donate to? :clap:
  10. Thanks again Rob. I'm still having a helluva time with the pattern though. Rather than a single while loop, I need to use a for loop that only gets executed once then a while loop for the rest of the pattern. Example: for (patternIndex = 0; patternIndex < 7;) { patternIndex++; patternCounter++; } while (1) { for (patternIndex = 7; patternIndex < 14;) { patternIndex++; patternCounter++; } }; I tried using those loops instead of the if else but it did not work. I tried quite a few things, actually. What am
  11. Next question (I just won't stop, will I?): Now that I have it working on my breadboard, I've been making the pattern to how I'd like but I can't seem to figure out how to make it behave the way I had before. In my original design the first five steps were executed with a for () loop "for (CurStep = 0; CurStep < 6; CurStep++)" then the remaining steps were executed repeatedly with a while (1) and a nested for () "for (CurStep = 6; CurStep < 15; CurStep++)". I see in your code where the magic happens with the 'if' condition in the interrupt. How could I change this to behave t
  12. Looks like the caps did the trick. Everything works as it should now. Those 0.1uF caps are more important than I realized!!! Thanks again Rob, you da man. By the way, where do you have your PCBs manufactured?
  13. LEDs have a typical 70mA rating (Lumiled SuperFlux) I have 15, drawing 390mA total. I was able to get it working reliably using a pot set to ~1.7k ohms. I do not have the capacitors on my breadboard because all I have are SMT. I'll desolder the M-M headers from my LP and put the M-F ones on tomorrow and then use the MSP from the LP to see if anything changes. Also pick up some through-hole capacitors
  14. Thanks again Rob! Same result, unfortunately With your pattern it works great but if I change lines 2,4,6 for full brightness it does not work. I can get it to work with only line 2 at full brightness only using one TLC (if I connect the second, it freaks out and just starts flashing). edit: I'm not using the external crystal on my breadboard. Could that have anything to do with it?
  15. Weird. I'll try a different MSP... edit: Tried a new MSP430G2231 and still no dice. How strange... I'm using two cascaded TLC5916s if it matters.
  16. Everything is on a breadboard. LEDs are powered by 3.3V from my PSU, Rext is 560ohm. It works great with your original pattern or using my original (non-PWM) code. If I change the pattern to the one I posted all LEDs either on constant, on but dim, or not on at all (changes each time I reset the MSP). Here's a video showing the breadboard and my original pattern: http://www.youtube.com/embed/KGCC3TQcBeo
  17. So far this is all I've done: /* * pattern.h * * Created on: Aug 14, 2012 * Author: RobG */ #ifndef PATTERN_H_ #define PATTERN_H_ // 16 patterns, 16 LEDs, 16 brightness levels const char pattern[16][16] = { // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 }, // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 }, // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 1
  18. It works great if I leave the original pattern. If I change it to mimic my original pattern it does not work. Ex: { 0, 0...0, 0 } { 15, 15...15, 15 } { 0, 0...0, 0 } { 15, 15...15, 15 } etc. Maybe there's something I don't quite understand about it?
  19. Works like a champ, though I had to define OE. Thanks again Rob!
  20. Wow Rob, you sure are awesome. I'll set them up tonight...mainly study and learn from your code!
  21. Lights are on constant with the added IE1 |= WDTIE;
  22. Thanks Rob for all your help! I loaded the code onto the MSP and it did not work but I haven't looked at it in detail. I've actually decided to go with the TLC5940 for this project. What I should have done from the beginning... I'll study the 5940's D.S. but I'm sure I'll have even more questions regarding implementing my design with the new device. Thank you again!
×
×
  • Create New...