Jump to content
43oh

zeke

Members
  • Content Count

    1,782
  • Joined

  • Last visited

  • Days Won

    102

Reputation Activity

  1. Like
    zeke reacted to vinicius.jlantunes in Use of Timer A interrupts   
    Just to close the loop - @@roadrunner84 was spot on about my mistake - after fixing that the ISR was executed for all timer interrupts. However, the TAIV switch statement still didn't work, TAIV kept being reset so its value was always zero and neither of the case statements ever got executed.
     
    I then found this article that explains that TAIV, being a read only register, is reset when read; the debugger was therefore resetting it before the switch statement had a chance do to anything useful. That's what I understood at least.
     
    The fix was to use intrinsic __even_in_range. Here is the final ISR code for blinking the LP LED's, one every CCR0 overflow, the other every CCR1 overflow.
     
    p.s.: here is some information on the intrinsic. The first parameter is the string, the second is the last case value in the range.
    #pragma vector = TIMERA1_VECTOR __interrupt void Timer_A1 (void) { switch (__even_in_range(TAIV,10)) { case 2: // CCR1 { P1OUT |= BIT0; P1OUT &= ~BIT6; } break; case 4: // CCR2 { // } break; case 10: // CCR0 { P1OUT &= ~BIT0; P1OUT |= BIT6; } break; } }
  2. Like
    zeke reacted to Rickta59 in Saving flash space, by making use of infomem   
    You can avoid overwriting the infoa segment, which is where most of the precalibrated values are stored by using:

    __attribute__((section(".infob")))

    __attribute__((section(".infoc")))

    __attribute__((section(".infod")))
     
    each .infox section is 64 bytes. If you avoid .infoa you don't have to worry about what might be stored there.
     
    [EDIT]
     
    -rick
  3. Like
    zeke got a reaction from bluehash in 43oh Server Slow Responsiveness.   
    Way to hijack a thread @@bluehash!    
     
    Cheers for both a faster server and a lifetime of marital bliss! 
     
    WOOT!
  4. Like
    zeke got a reaction from bluehash in New post test   
    And now for Steve in Weather...
     
    IT'S GONNA BE HOT!
     
    Thanks Steve.
  5. Like
    zeke reacted to ElectricCowboy in Question about I2C, DriverLib and MSP-EXP430F5529LP   
    SUCCESS!
    I added 10k-ohm pull-up resistors to the SCL and SDA lines on both sides of the level shifter.
    I updated this thread with code, an updated schematic and a snapshot of my dev board including one test pattern showing Green, Red and Yellow pixels.
    Many thanks to zeke and SvdSinner for their help and replies to this thread.
    For me, this is a nice little accomplishment for a variety of reasons: TI Code Composer Studio, TI MSP430 LaunchPad, reuse of an 8x8 Bi-Color Matrix device, and using I2C (albeit via library APIs).
     
    Onwards! 
     
    I plan to expand this DIY project by adding timers for LED animation, adding additional LED matrices, and possibly employing the LaunchPads other I2C interface.  I would also like to explore the TI RTOS at a later time in 2015.  I would also like to employ switch debouncing and implement different animation modes, and harden the hardware design as suggested.  Perhaps I'll update my progress as progress is made...
     
    Electric Cowboy
    20141212 - TI MSP430 I2C Diagram 8x8 BiColor LED Matrix.pdf

    main.c
  6. Like
    zeke got a reaction from spirilis in Mini CC3200 Breakout   
    I intuitively knew the module pricing claim was too good to be true.
  7. Like
    zeke reacted to roadrunner84 in What am I going to do with ...   
    @@zeke embed them into lego bricks and make a "match" game for kids (like: a shoe matches a foot, a 3 matches three pips on a die, etc)
  8. Like
    zeke got a reaction from RobG in What am I going to do with ...   
    One of my clients was clearing out old electronics stock. They invited me to come down and claim whatever I wanted out of the recycling bin.
     
    Of the many things that I found, this is what 229 Atmel ATMEGA16L-8AU processors look like:
     

     
    Now I have to figure out what to make with them.
  9. Like
    zeke got a reaction from KyleNguyen in Help for design robot talk!   
    I would attempt to port over a library created for Arduino usage.
     
    For example, you could port over the speech synthesizer part of WebBotLib.
  10. Like
    zeke reacted to roadrunner84 in What am I going to do with ...   
    Build a cluster computer
    Maybe you can use them for small home control nodes?
  11. Like
    zeke reacted to pabigot in What am I going to do with ...   
    Set them in grout to make a coffee-table top.
  12. Like
    zeke reacted to igor in What am I going to do with ...   
    Keycaps?
  13. Like
    zeke reacted to spirilis in What am I going to do with ...   
    @@zeke This just needs to happen ;-)
  14. Like
    zeke reacted to SixSixSevenSeven in What am I going to do with ...   
    229 little swarm robots
  15. Like
    zeke reacted to Druzyek in What am I going to do with ...   
    Use them as IO expanders for your MSP430 projects.
  16. Like
    zeke reacted to SvdSinner in Question about I2C, DriverLib and MSP-EXP430F5529LP   
    Schematic Issues:
    1)  No pull-up resistors.  Start by adding 10k pull-ups to both lines.  (Shouldn't matter which side of the level shifter you add them, but I'd try the 5v side first.)
    2)  No decoupling capacitors.  Add in caps between the 3v & 5v lines and GND.  Otherwise a spike/lull cuased by your LED matrix can cause all sorts of wierd issues.  Better safe than sorry.
    3)  You have no way to reset your slave device.  I'd recommend you use a GPIO with a transistor (high side switch) to allow your program to power-cycle the LED driver.  I haven't used that specific device, but I've seen other I2C devices get stuck holding down the SCL, and if you can't  power cycle it, it will block all I2C communications.  Remember that your slave doesn't reboot each time you restart your program.  Ideally, put the pull-up resisters after the switch, because some devices can function with the juice from the data lines long enough to not reset when you cut their Vcc line.
    4)  Consider adding points on your line to put an I2C sniffer.  (Hopefully, you have access to a logic analyser)  What you don't want is to have your lines getting wiggled every time you hook-up/remove testing tools.  
     
    Suggestions:***
    1)  Make sure everything is held securely while you get it working.  I use a chunk of cardboard and hot glue everything down to it.  You want to make sure nothing unexpected gets pulled out when things get bumped and cords get swapped.
    2)  Don't assume ANYTHING is working like you think it is.  Test your wiring connections for continuity.  Test all four lines with a VMM.  Test any pins/sockets/headers to make sure every pin has good contact. Huge amount of "problems" with I2C are just basic wiring problems.  
    3)  If you are starting from scratch, I'd recommend using the Energia code base and it's port of wire.h for I2C.  The TI I2C libraries are quite buggy (There are function in the driver library that simply don't work on an MSP430F5529 and will hang your program) and have an over-complicated programming model.  I'm currently trying to get wire.h to compile with the TI compiler, because I have some code that uses it 
    4)  Unit test every I2C call you expect to make.  Make a project that atomically does each function so you can prove the basics work before you integrate them into your code.  It is a bit of work, but much less work than trying to debug a program when you don't know which of the components are actually doing what you think they are.
    5)  Document every time things work correctly, preferably with source control.  If/when you break something as you add to the code, you want a clear place to return to if you don't like how your change turned out.
    6)  If you find a loose connector, etc.  Toss it out and use a better one.  Just because you can wiggle it and get it to work again for the moment, doesn't mean you won't spend more time & effort testing and wiggling it than it is worth.  (This advice might be more for me than you.  Can't tell you how many times I've been dumb enough to throw a bad connecter back into my parts bin so that I get to have the same problems again the next time I pull it out.)
     
    ***These suggestions mostly come from experiencing the pain of not using them.  Hope they help.  Troubleshooting I2C can be maddeningly complex if you don't work hard to ensure that your building blocks are solid.
     
  17. Like
    zeke got a reaction from ElectricCowboy in Question about I2C, DriverLib and MSP-EXP430F5529LP   
    @ElectricCowboy: Your schematic looks good to me. 
     
    I agree with @@SvdSinner that you need to put pullup resistors on the SDA and SCL lines.  But here's the catch, you have to put pullup resistors on both sides of the level translator to make it work.
     
    I agree that 10K pullups will do the job well.
     
    Do you have a logic analyzer? I use a Saleae Logic. It's the cat's meow.
     
    My experience with TI's sample I2C is also negative so I wrote my own Bit Bang I2C Master routines. It ended up looking a lot like the Energia routines but more raw and not at all C++ like.
     
    Don't worry about being perfect. Just enjoy the process of exploration. Ask us lots of questions. We're here to share the adventure.
  18. Like
    zeke reacted to ElectricCowboy in Question about I2C, DriverLib and MSP-EXP430F5529LP   
    Hello,
     
    I purchased a 4x bi-directional level-shifter from Adafruit (http://www.adafruit.com/products/757).
    I soldered the header and mounted it and the 8x8 LED Matrix to an experimenter board.
    I created the attached schematic diagram, 20141210 - TI MSP430 I2C Diagram 8x8 BiColor LED Matrix.pdf, to this thread.
    I believe the electrical connections are correct.
    I added blue wires (really, they are blue!).
    I attempted to enable I2C communications in mid-November. 
    Although my software was not correct, I did see that the 8x8 LED Matrix was "alive", because some of the LEDs in the Matrix illuminated; this is certainly a good sign.
    I will continue to try changes to my software and will update the thread soon.  (Full-time job takes precendence over hobbies...)
     
    Is anyone in the community willing to eye-ball and check my attached schematic diagram? Thanks in advance.
     
    Electric Cowboy
  19. Like
    zeke reacted to RobG in MSP430 Nixie Clock   
    @@zeke, I have this uncomfortable feeling that I missed your order, let me check my post office slips.'
     
    UPDATE: will ship on Monday, sorry about the delay
  20. Like
    zeke reacted to Rickta59 in Simple debug capability through serial in CCS - noob question   
    There is also the Console I/O output which doesn't require any UART code. http://processors.wiki.ti.com/index.php/Printf_support_for_MSP430_CCSTUDIO_compiler
  21. Like
    zeke got a reaction from xxx1 in Happy Thanksgiving,   
    Happy Thanksgiving!
  22. Like
    zeke got a reaction from abecedarian in Happy Thanksgiving,   
    Happy Thanksgiving!
  23. Like
    zeke got a reaction from spirilis in Happy Thanksgiving,   
    Happy Thanksgiving!
  24. Like
    zeke got a reaction from abecedarian in One Wire Controller booster   
    Hi Guys,
     
    Today, I put some serious effort into my One Wire Master board. Here's a screen grab of the results.
     
      
     
    I've designed the board so that it can operate by itself (it has an FR5969 on it) or it can operate as a booster board. 
     
    When operating as a booster board, it will appear as an I2C Slave to whatever LaunchPad you plug into it.
    When operating as a LaunchPad, it will just do its thing (whatever I program it to do).
     
    I have also started working on a development support board that will give this board a USB UART, 3V and 5V power, a Reset button and a LiPo battery backup (kind of like a UPS).
     
    That layout isn't done yet but this is what it looks like at the moment.

     
    It will stack underneath the OWM Booster board.
     
    I intend on plugging this device into a server running node.js, collecting the sensor data on a schedule, storing it into a database then displaying that data to a User in a pleasant manner.
  25. Like
    zeke got a reaction from bluehash in test3   
    Roger B#! This here is Rubber Duck. We got ourselves a Convoy!
×
×
  • Create New...