Jump to content
43oh

piglet

Members
  • Content Count

    21
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by piglet

  1.  

    Also, it is generally not good to parallel LEDs.

     

    Hmmm - I don't know how else I can do it! I'm very new to this. I thought msp430->shift register->darlington array as sink was an OK way to be able to turn on or off sets of 3 of 4 leds

     

    post-28718-0-47501600-1383523843_thumb.jpg

     

    I'm not surprised that ebay is a dumping ground for sub-par components. I'd have thought a seller specialising in LEDs wouldn't want the bother of the -ve feedback on duff things though.

  2. Do white LEDs die fairly quickly?

     

    I've had some running in my word clock for some months now, and the ones which are always on are becoming more yellow, and there is more variation in colour in some of the other than I'd like.

     

    One is starting to flicker occasionally, when others parallel in the same circuit are not.

     

    The LEDs were these. I'm running them @ 5v with 120 ohm resistors which should be more than enough.

  3. You can supply 5v & ground to the test points TP1 and TP3 beside the USB socket. 

     

    If you really don't want to power from the USB then you might have to doctor the micro-usb cable to remove the +5v pin (or cut the wire).  The only time I've had to do that was on a Raspberry pi - to prevent a badly regulated powered USB hub from back-powering the Pi.

  4. I'm mostly a lurker on this forum, and watch in somewhat bemused awe at the things you folks manage to create. I'm right at the bottom of a massive learning curve with very little time to climb up it.

     

    Still, I'm very happy with my first ever electronics or microcontroller project. 

     

    It's a word clock inspired by an image of a commercial product I bumped into on the internet.

     

    Parts list:

     

    1) A cheap frame from our local hobby shop

     

    2) An http://www.pvelectronics.co.uk/index.php?main_page=product_info&products_id=2'>

    post-28718-0-08858400-1380395915_thumb.jpg

    post-28718-0-10127900-1380395924_thumb.jpg

    post-28718-0-37668500-1380395929_thumb.jpg

    post-28718-0-00010600-1380395936_thumb.jpg

    post-28718-0-03953400-1380395945_thumb.jpg

    post-28718-0-68325600-1380395950_thumb.jpg

  5. Thank you. I went back through the project manually and corrected all the corruptions, finding a few lines I'd removed previously were now back in. Some lines changed and duplicated as I put the cursor on them which was rather worrying. I guess Code Composer had got into a real muddle.

     

    When I tried to compile it kept highlighting lines which weren't in error, with spurious error messages.

     

    project->clean, restart composer, move a few lines around and then back where they'd been in the first place and it compiled OK. Hurrah.

     

    Now to carry on with the real logic I wanted in the first place. I wish I had more than a few minutes a day to tinker. Work/wife/kids get first call on my time....

  6. Thank you all - much appreciated.

     

    I really don't know what I did wrong, but my code was very close to these examples and didn't work as I was expecting. With these pointers I got it working...if only for a few seconds...

     

    Using code composer I did a load of control-z to step back to see what I changed to try and let you know what I'd done that broke it, then stepped forward again by holding control-y to get the latest and it left the code completely muddled up and not working. *mutter*. Now I'm left with a corrupted project I didn't take a copy of when it was working!

     

    Oh the joys of software....

  7. MSP430G2553

     

    Sorry for what is probably a very basic question - but I've been trying over and over to get MCLK to 16MHz and the TIMERA using SMCLK on external clock crystal. Whatever I seem to do with the control registers I always seem to get the TIMERA on the higher frequency.

     

    I'm probably not understanding the user guide, and I can't find anything similar in code using google.

     

    Please could someone take pitty on me and paste me a C snippet to do this?

     

     

     

     

  8. Thank you. Yes - that works very nicely - but only after a change:

     

    from

     

        UCB0BR0 |= 0x04; // 1:4 - 16MHz/4 = 0.25us

     

    to

     

        UCB0BR0 |= 0x03; // 1:3 - 16MHz/3 = 0.1875us

     

    I guess this is because these WS2811 LEDs need it a little faster.

     

    Hmmm. I've never used SPI before. I'm still very new to this and have only done bit-banging in C using the timers. I've got some reading to do.

     

     

    My next challenge is to be able to put these LEDs into a particular state depending on time of day, while keeping accurate time using an external 32768Hz crystal. If this code needs 16MHz clock, and the clock part needs the 32768Hz crystal as clock am I stuck?  I just don't know enough.

  9. I tried the code in the first post in this thread last night on some of these, and the correct number of LEDs became active. The first LED in the chain cycled through the colours perfectly, but the rest of the lit LEDs flickered and didn't cycle the colours as expected.

     

    The chain works Ok with the "mini 3keys smart pixel controller" which I got with it, so it looks like a timing issue from the MSP430.

     

    It's a shame the seller doesn't provide a link to the data sheet....

     

    Do you have any pointers for how best to tweak the timing for these WS2811's, or is there some later code I should try?

     

    Thanks in advance

  10. As I put in my previous post I get the same thing on the launchpad directly - so it's definitely a power supply issue.

     

    The "failing" ones I was using were fairly weighty ones bought with brand-name switches, routers, and usb hubs. I'd have expected more than the usual cheap knock-off psu's with them - if for no other reason than it'd mean they'd get fewer returns & support issues that way which would cost them more money!

  11. Hurrah! I found a 12v 6A quality PSU which used to power my NAS. That hammer to crack a nut gives a supply that the crystal likes when plugged into the breadboard 12v->3.3v thing.

     

    That's what I call overkill.

     

    There's something about lower quality supplies that the crystal objects to.

  12. Thanks.

     

    I've just got home and tried on a bare launchpad. Nothing attached but the MCU and the can, and the onboard 1.0 LED.

     

    It again works when launchpad is powered from PC usb, and not when powered from a 5v mains adaptor.

     

    The two methods of powering both result in identical voltages at the launchpad 3.3v pins.

     

    I'm still stumped, but at least it rules out the rest of the circuit and the breadboard.

     

     

    Standard "Test your crystal" code from the web:

     

    #include 
    
    #define LED BIT0
    
    void main(void) {
       int i;                      // internal counter
       WDTCTL = WDTPW + WDTHOLD; // turn WDT off
       P1OUT = 0x00;
       P1DIR = LED;
       BCSCTL3 |= XCAP_3; // xtal has 12.5 pF caps
       TACCR0 = 16383*2; // f_xtal / 2 - 1 gives 2 Hz
       TACTL = TASSEL_1 + MC_1 + TACLR; // ACLK + Up Mode + Clear timer
    
       for (; {
           while ((TACTL & BIT0) == 0) { // wait for timer to reach TACCR0
       }
       TACTL &= ~BIT0;       // reset TAIFG
       P1OUT |= LED;                 // LED on
       for (i=0; i<0x314; i++) { // short delay
       }
       P1OUT &= ~LED; // LED off
       }
    
    } // main
    

  13. Hi Gordon,

     

    Yes, everything else is working fine when the crystal isn't. The buttons do what they should, the lights light up like they should. All that doesn't occur is the crystal's interrupt .

     

    I'll see if I can find that blog. *edit* I can't find it - please could you point me in the right direction (I'm new to the site and don't know my way around!)

     

    The crystal specs are there on the "Specification" tab. Nothing too interesting. It doesn't give an ESR. It also doesn't paste well into here!

     

    3.2768MHz Divide by 2n, 16 times for 50Hz

    Freq Can Adjust Temp Load

    Style Tol Stability Cap

    32.768kHz TC38

  14. Hi,

     

    I'm new to the forums, the MSP430 range - and electronics generally, so please be gentle with me ;)

     

    I have a nicely working circuit and code based around an MSP430G2553 with a 32K crystal and some shift registers to display output. I've moved the MCU from the TI Launchpad to a breadboard - and am now trying to work out how to (mains) power it and am hitting problems I cannot work out how to fix.

     

    The issue:

     

    When I use a mains powered transformer the crystal does not oscillate.

     

     

    Symptoms:

     

    1) It works perfectly when powered from my PC's USB, into the launchpad and 3.3V pins to the breadboard.

    2) It works perfectly when directly powered from a couple of AA rechargable batteries in series.

     

    3) The crystal does NOT start when powered from a 5V usb hub power supply, into the launchpad and 3.3V pins to the breadboard.

    4) The crystal does NOT start when powered from a reasonable quality 3.4V regulated mains power supply to the breadboard.

    5) The crystal does NOT start when powered from a A1117-3.3 based 12V to 3.3v MB102 Breadboard Power Supply on the breadboard.

     

    With both 3) and 4) the crystal does start, and the circuit runs for about 3 seconds on residual power when the PSU is switched off and the circuit is draining the PSU Caps! Turning back on again before the juice stops...the crystal stops again.

     

    In each case 3 to 5 everything else works. The MCU reacts to button presses, and controls the shift registers as expected. The only thing that isn't happening is the clock "tick".

     

    Things I've tried to see if I can kick the crystal into life:

     

    I've tried three different crystals (of the same type). All work as described above.

     

    I tried telling the microcontroller to use 10pF caps rather than 12.5pF - the crystal still works with PC power, not with hub power. I reverted to 12.5pF caps for the following tests.

     

    I've tried a 10pF capacitor from XIN to GND - no apparent difference - the crystal still works with PC power, not with hub power

     

    I've tried a large resistance from +v to XIN (5*470K in series ~= 2.35M as this is the largest my little electronics kit had!) - the crystal still works with PC power, not with hub power.

     

    I've tried putting large and small electrolytic capacitors across the power inputs in an attempt to smooth the power, with no apparent effect.

     

     

     

    I really am stumped. As I'm going to be running a reasonable number of bright LEDs all the time I do want to power this from a mains adapter.

     

    As I'm a new user the forum will not let me link to the crystal and breadboard power supply circuit:

     

    w w w emartee com Attachment.php?name=41960.pdf - breadboard PSU circuit

    w w w maplin co uk timing-crystals-480 - the crystal I'm using

     

     

    Please can you give any help to get this working? Thanks in advance.

×
×
  • Create New...