Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    GeekDoc reacted to Lgbeno in Buying an oscilloscope, need some advice.   
    Mention eevblog to tequipment and they will give a discount. That's where I got my Rigol from.
  2. Like
    GeekDoc reacted to oPossum in Buying an oscilloscope, need some advice.   
    TEquipment.net ships to Canada and is reputable.
  3. Like
    GeekDoc reacted to abecedarian in RandomElectrons LP10062   
    Personally, I think you should look at this like it could be a game controller, where the BP headers are oriented parallel to the short sides instead of the long. Imagine 8 position joysticks left and right of the capsense BP or something like an NES controller. F5529 could even enumerate as an HID and expose those to the computer.

    like this (not to scale): /------------------------------------------------------------------------\ |0 [PWR / USB / SBW on bottom] 0| | | | oo oo | | oo +----------+ oo | | oo | MSP 430 | oo | | oo | | oo | | oo | goes | oo | | oo | | oo | | x oo | here | oo x | | | oo | | oo | | | x--+--x oo +----------+ oo x--+--x | | | oo oo | | | x x | |0 0| \------------------------------------------------------------------------/Just a thought.
  4. Like
    GeekDoc reacted to simpleavr in [Group Buy-19][O] TMS0803/5 Emulating Calculator With Bubble Display   
    Every single time!! I sent off my Elecrow order for 10 Version 2 boards. And discovered spelling mistakes on the silkscreen. I spell DataMath as DataMatch. Oh well.
    I should be getting these within 10 days (gauged by my last order). I also ordered a different button cell holder this time. The original one is too thick (9.6mm), This one should look better
    The new PCB will accommodate this and we should have a thinner profile.
    I check against the PCB traces and they look OK to me, but if you are not in a rush and want to use the new layout, you can wait until I assemble one and validate everything.
  5. Like
    GeekDoc reacted to oPossum in Tiny printf() - C version   
    This code was written when the MSP430 Lauchpad shipped with chips that had 128 bytes of RAM, 2k of flash, and no hardware serial port. So it was important to keep code very compact and a software UART was needed.
    Your F6137 chip has many hardware UARTS - so it would be wise to use them rather than software UART. Just write a putc() function that sends a char to the UART and you don't need the assembly code.
  6. Like
    GeekDoc reacted to RobG in 43oh badge   
    Here's the badge mounted to my bike's wheel.

  7. Like
    GeekDoc reacted to pabigot in Newbie general C code question   
    I see that happening more and more; I blame it on injudicious application of MISRA rule 6.3.
    It's absolutely the case that types with specific sizes should be used when the range is potentially beyond the native word size of the processor or data is exchanged over a communication link, including via a file.
    I have yet to see a cogent argument why specific-size types should be used in preference to "int" and "unsigned int" for indexes and offsets where the native word size is appropriate, or when you're manipulating a processor peripheral that is known to be that native word size.
    On one hand, you might select a type that's too large for a target processor, impacting portability. TI did this recently to the CC3000 host interface, changing it so every parameter is a uint32_t even if its value range is less than one octet. This unnecessarily bloats code and hampers performance on the MSP430. Sure, when it goes out over SPI it needs to be 4 octets: but that's an encoding issue and should not propagate up to the library API.
    Or you might go too small, and select uint8_t. Two problems: (1) it's a pain if you wrote code to index over an array, and somebody increases the array size above 255. (2) A uint8_t value will promote to the signed type int when used in expression calculations. I've got some discussion of this on my blog; the non-C++ stuff related to uint8_t is at the end. tl;dr: -x doesn't mean what you probably think it does.
    The advice @@roadrunner84 gave is better, though if the "appropriate type" argument is applied consistently one should use size_t for all variables used as indexes as well as sizes. Which will hurt you badly on the MSP430 if you're using a memory model that supports objects larger than 64 kiBy, so I prefer unsigned int there too.
    Note: If you are going to use the size-specific types, get in the habit of explicitly including either <inttypes.h> or its lesser cousin <stdint.h>. Yes, for MSP430 and ARM the vendor headers provide it for you, but if you don't remember that it comes from the C library, not the C language, you'll be confused when you graduate to host platforms where it's not part of the null context.
  8. Like
    GeekDoc reacted to Rei Vilo in Newbie general C code question   
    May I suggest using uint8_t instead of int?
    As a matter of fact, the definition of int differs from one MCU to another. It could be a 16-bit or a 32-bit integer.
    int{8|16|32|64}_t is much cleaner than unsigned char, char, unsigned int, int unsigned word, word, unsigned long, long, unsigned long long, long long and alike. It also ensures you have the exact same number of bits whatever the MCU.
  9. Like
    GeekDoc reacted to oPossum in request: ultrasonic example   
    #include <msp430.h>
    #include <stdint.h>
    static const unsigned long smclk_freq = 16000000UL; // SMCLK frequency in hertz
    static const unsigned long bps = 9600UL; // Async serial bit rate
    static uint32_t upd = 0; // Ultrasonic Pulse Duration (500 ns resolution)
    #pragma vector = TIMER1_A1_VECTOR // Timer 1A vectored interrupt
    __interrupt void timer1_a1_isr(void) //
    { //
    static uint32_t rise = 0; // Pulse rise time
    static uint32_t fall; // Pulse fall time
    switch(TA1IV) { // TA0IV must be read to reset interrupt
    case 0x02: // 0x02 == CCR1 (capture/compare)
    if(TA1CCTL1 & CCI) { // - Rising edge
    rise = TA1CCR1; // Save rise time
    fall = 0; // Reset fall time
    } else { // - Falling edge
    if(rise) { // Make sure rising edge has occurred
    // Handle possible pending overflow interrupt
    if((TA1CTL & TAIFG) && (TA1CCR0 < 0x1000))
    fall += TA1CCR0; //
    fall += TA1CCR1; // Get fall time, add to overflow time
    if(!upd) upd = fall - rise; // Update time if mainline code is ready for it
    rise = 0; // Clear rise time to ensure next rising edge is used
    } //
    } //
    break; //
    case 0x0A: // 0x0A == TAIFG (overflow)
    fall += TA1CCR0; // Update overflow time
    break; //
    } //
    } //
    void putc(const unsigned c) // Output single char to serial
    { //
    while(!(IFG2 & UCA0TXIFG)); // Wait for ready (not busy)
    IFG2 &= ~UCA0TXIFG; // Reset busy flag
    UCA0TXBUF = c; // Tx char
    } //
    void puts(const char *s) { while(*s) putc(*s++); } // Output string to serial
    void print_u32(uint32_t n, const unsigned dp) // Print 32 bit unsigned with optional decimal place
    // 6 decimal digits (0 -> 999999)
    { //
    unsigned c; //
    c = '0'; while(n >= 100000UL) n -= 100000UL, ++c; putc(c);
    if(dp == 5) putc('.'); //
    c = '0'; while(n >= 10000) n -= 10000, ++c; putc(c);
    if(dp == 4) putc('.'); //
    c = '0'; while(n >= 1000) n -= 1000, ++c; putc(c);
    if(dp == 3) putc('.'); //
    c = '0'; while(n >= 100) n -= 100, ++c; putc(c);
    if(dp == 2) putc('.'); //
    c = '0'; while(n >= 10) n -= 10, ++c; putc(c); //
    if(dp == 1) putc('.'); //
    c = '0'; while(n) --n, ++c; putc(c); //
    } //
    void main(void) //
    { //
    WDTCTL = WDTPW | WDTHOLD; // Disable watchdog reset
    DCOCTL = 0; // Run at 16 MHz
    BCSCTL1 = CALBC1_16MHZ; //
    P1DIR = BIT2; // Setup GPIO
    P1SEL = BIT1 | BIT2; // UART
    P1SEL2 = BIT1 | BIT2; //
    P2OUT = 0; //
    P2DIR = BIT0; // Timer 1 capture/compare IO
    P2SEL = BIT0 | BIT1; //
    P2SEL2 = 0; //
    const unsigned long brd = (smclk_freq + (bps >> 1)) / bps; // Bit rate divisor
    UCA0CTL1 = UCSWRST; // Hold USCI in reset to allow configuration
    UCA0CTL0 = 0; // No parity, LSB first, 8 bits, one stop bit, UART (async)
    UCA0BR1 = (brd >> 12) & 0xFF; // High byte of whole divisor
    UCA0BR0 = (brd >> 4) & 0xFF; // Low byte of whole divisor
    UCA0MCTL = ((brd << 4) & 0xF0) | UCOS16; // Fractional divisor, oversampling mode
    UCA0CTL1 = UCSSEL_2; // Use SMCLK for bit rate generator, release reset
    // Timer 1 compare 0
    TA1CCR0 = (16000000UL / (8 * 2 * 20)) - 1; // 20 Hz (50 ms)
    TA1CCTL0 = OUTMOD_4; // Toggle mode
    // Timer 1 capture 1
    TA1CCTL1 = CM_3 | SCS | CAP | CCIE; // Rising and falling, sync, capture, interrupt
    // Timer 1 config
    TA1CTL = TASSEL_2 | ID_3 | MC_1 | TAIE; // SMCLK, /8, count up, overflow interrupt
    _enable_interrupts(); // Enable interrupts
    for(; { // For-ever
    if(upd) { // Check for pulse duration measuement available
    // Calculate inches
    const uint32_t in = ((upd * 5534) + (upd >> 1)) >> 14;
    // Calculate mm
    const uint32_t mm = (upd * 5623) >> 16;
    print_u32(in, 2); // Print inches
    puts(" in "); //
    print_u32(mm, 0); // Print mm
    puts(" mm"); //
    puts("\r\n"); //
    upd = 0; // Ready for next
    } //
    } //
    } //

  10. Like
    GeekDoc reacted to cubeberg in 43oh badge   
    This project was a collaboration with Texas Instruments.  I've kept it hush-hush so far, but as of yesterday - it's finally out in the wild!  Yesterday at the SF Maker Faire, Texas Instruments started giving away boards at their booth.  If you're visiting the Maker Faire today - please drop by booth 220!
    Thanks a ton to TI for sponsoring and feedback on the design.  Will Cooper, Adrian Fernandez, Mark Easley, Dung Dang and Rachel Platis were all involved - this wouldn't have happened without them.
    Also - Elecrow did a wonderful job on the boards and initial kitting (I added the batteries and MCU once back in the US).  
    Badge page on 43oh - http://43oh.com/badge/  (drop by this page for more info and an intro video).
    Github with schematics, sample code, etc. : https://github.com/dd430/430RocketBadge
    The board is intended to be easy to solder - parts were kept to a minimum.  It showcases several features of the MSP430G line.  The board has a Cap Touch slider as well as 5 LEDs.  The pre-programmed demo starts in a POV mode.  If you swing the badge in a circle, you'll see the pre-programmed messages written in the air.  My favorite part of the project though - has to be the ability to update the message on the badge via the light sensors on the board.  You may have seen similar projects.  One sensor is used for the clock, another for the data.  A simple web page allows design of a message and then uses two squares on the page to trigger high/low values on the light sensors.  You can find it at the 43oh badge page above.
    All in all - we were able to get 500 kits created.  Hopefully these will be given away at events that TI is attending for quite a while.  I'll post back if I hear they're going to show up for an event.  Hopefully we'll also have a few to give away to forum members as well.  
    BTW - I will say - creating 500 kits of something is a significantly different endeavor than just a handful
    Boards after manufacture:

    500 kits arrived at my house:

    I started with several ideas for the board initially - but we ultimately ended with the POV design.  V1 of the design used a shift register to control the LEDs and took significantly longer to solder.  Not the best for a beginner kit  Not to mention getting the clock working with the shift register was a bit squirly for some reason.
    V1 badge vs V2

  11. Like
    GeekDoc reacted to sq7bti in MSP430 Quadrotor ***attempt***   
    The first four looks like some web-mail referenced links. Just take a look at the beginning:
    https://mail.jbu.edu/owa/redir.aspx?C=f89ce17e5c8847cea19d0f2fb00cbfae&URL=http%3A%2F%2Fwww.ebay.com%2Fitm%2F10DOF-IMU-HMC5883L-ITG3205-BMA180-BMP085-Sensor-Module-For-MWC-Arduino-%2F321180164174%3Fpt%3DLH_DefaultDomain_0%26hash%3Ditem4ac7d4604e  Great project by the way.
  12. Like
    GeekDoc reacted to greeeg in 120 LED Ring Clock   
    They are mentioned in this thread, back a few pages.
    I am working on a new version. It will fix the (superficial) errors on the last revision. This will also add a more powerful MSP430.
    Also there might be a version in the 430 store in the near future. Stay tuned.
  13. Like
    GeekDoc reacted to TI_Trey in Quadcopter BoosterPack   
    Hi 43oh!
    Some of you may have seen me over at c2kcentral, but I'm mostly a lurker here.  For a while now, I've been working on developing a low cost quadcopter.  Well that quadcopter is nearly done!  Boards are being manufactured as I type this, and I plan to have it flying at the Bay Area MakerFaire in May.
    Here's a picture of the top of the motor driver board:

    Personally, I would like to see this manufactured and sold, but before I invest the effort to do that I need to ensure there is a demand for such a board.  The finished quad will be about 1 square foot in size, will cost ~$200, and will be able to carry a small payload (I've got my fingers crossed we'll have enough thrust for a Go Pro).  If you would please take a second to answer the poll as to whether or not you would be interested in purchasing one.
    This is all very preliminary, but I appreciate any feedback you may have.
    Moving some of the information regarding the setup up here:
    4x TMS320F28027F + DRV8312 make up the ESC.  That is the bulk of what is on the board which you can see on the first post.
    1x C2000 LP acts as the brain.  This board decodes the control signals and sends torque commands to each of the ESCs via a PWM signal.  This LaunchPad runs the open source AeroQuad firmware on top of Energia...which also means other LaunchPads could be used as the brain.
    Control Inputs come via a standard RC 2.4GHz radio and receiver.  Because the LaunchPad doesn't have 1 million capture inputs I am using a receiver which supports S.Bus.
    3 axis accelerometer, gyro, magnetometer, barometer and GPS
    Update 4/16:
    Got the IMU board in today.  Here's a picture:

    Yellow - TC6000GN - CC4000 based GPS
    Red - MPU6000 - 6 axis IMU
    Blue - HMC5983 - 3 axis Mag
    Purple - MS5611 Barometer
    Update 4/21:
    Got in a car accident and have been dealing with insurance, so instead of working on this I've been dealing with BS.  Good news is that all that is finally taken care of and the motor boards are here!  These are by far the most complex and visually appealing boards I've even designed.  Take a look:

    I'm still waiting on a few structural pieces to arrive which are being water cut.  I expect I'll have them later this week.  I'll post some more pictures once I get the boards assembled.
    Update 4/22:
    Motor boards are assembled and basic functionality checks out.  Next checks will include JTAG connectivity, and then motor drive capability.  The design is based off an earlier prototype that was proven out, so I expect everything to work splendidly on this board.

    If you're not already, follow me on twitter for up to the minute project updates! @yertnamreg1218
    Update 4/24:
    The 4 InstaSpin Piccolos are all in a JTAG chain.  Initially I had a little trouble getting CCS to connect, but after a little re-soldering of the ICs JTAG started working.  I now have all 4 device programmed with the motor control software.  I was also able to verify operating on a battery and the serial data link between the receiver and main microcontroller.

    Yes, I'm aware my desk is a mess right now. :-P
    Update 5/6:
    Lots of work has been going into the AeroQuad firmware I'll be running on the LaunchPad.  The two main contenders for firmware were Arducopter and Aeroquad.  The reason Aeroquad was chosen over Arducopter was their use of the standard Arduino IDE to build their firmware.  Arducopter uses a hacked together one off build system.  Since Energia is based off Arduino, getting the AeroQuad project to build was much easier than Arducopter would have been.  
    With that said, I'm happy to announce that today I was able to compile AeroQuad successfully for the C2k LaunchPad in Energia.  This is a huge milestone!

    As you can see it didn't link, but that's an easy problem to fix.  With MakerFaire less than 2 week away, the pressure is on!  Will Trey get the quadcopter flying in time or will Murphy raise his evil head and sabotage the project?  Stay tuned to find out!
    Update 5/23:
    After my last update I had to really focus on getting the thing done in time for MakerFaire, so I slacked off on project updates.  Sadly, Murphy paid me a visit and threw a few wrenches into my plan.
    Problem #1: Everything on the motor drive boards appears to be working as planned with the exception of the current feedback circuitry for the motors.  The old board can spin the motors just fine, but on the new board the current feedback isn't behaving nicely which is causing us problems with the motor control software.  The boards are based on the same schematic, but the original developer changed some of the components in the feedback circuitry.  I have a list of the changes and the new board has incorporated those changes, but still has problems.  I'm unsure if the issue is layout or component related and will be doing some experiments in the coming weeks to determine and fix the cause.
    Problem #2: I pulled a special favor to get the structural materials (i.e. frame) for the quadcopter cut on a waterjet.  I kicked this off in early April, but because it was a favor and there were other users of this machine my parts didn't end up getting cut in time.  I'm currently looking for a place in town that can do CNC routing and drilling to get these parts cut.
    MakerFaire was still a big success and I was able to talk to a ton of people about LaunchPad, Energia, and the quadcopter.  I even met a few 43oh members while I was there!  I also talked to the creators of the Aeroquad firmware and they are very excited about this project.  Once the C2000 port is more stable I will be merging my changes upstream to the main Aeroquad repository.  
    I also talked to them about structural materials for the frame.  The Aeroquad guys use a material called DiBond.  Its a composite aluminum/polyethylene laminate which is less dense than FR4 with comparable material properties.  It is commonly used in signage applications, but also makes for an excellent quadcopter frame.  At MakerFaire the AeroQuad team participated in an event called the "Game of Drones".  This event pitted two quadcopters against eachother in air to air combat.  Take a look at this video showing off some of the fights: 

    After seeing how well they performed in the competition I am considering switching to use DiBond as the structural material in my quadcopter as well.
    Update 8/19
    It took me a while to find someone to cut the frame at a reasonable price, but I finally did.  I just received the frame back from the fabricator and it looks great.  I'll still need to tweak the design a bit due to machining tolerances, but that's something that's easily accomplished.  Without further ado, here are the pics:


    There are some spars that connect the two pieces together that should also be here, but the fabricator was confused and thought they were scrap.  I should be able to fully assembled the quad after I get back the tweaked version of the frame.
    I also was lucky enough to be a guest on "The Amp Hour" this week.  Be sure to tune in!  I talk about my experience in college at Rose-Hulman, my first job after college with Simma Software, and I reveal a new job I've accepted at TI!!!!
  14. Like
    GeekDoc reacted to jsolarski in Im back   
    im back, been really busy with life and work. (the quick update, lost a job, got a job, had a baby, adopted a family, moved...etc, basicly went from me to having me and 4 others in my household)
    looks like I missed a lot. now time to catch up on all the new posts.......
  15. Like
    GeekDoc reacted to jrychter in 120 LED Ring Clock   
    Hey, some quick notes having taken a look at the schematic:
    The caps around MMA8453Q should probably be larger (a mistake in the value in the schematic?): C15 is normally 100nF, while C16 at least 1
  16. Like
    GeekDoc reacted to greeeg in 120 LED Ring Clock   
    Thanks Bluehash,
    dpharris asked for the schematic for the ledRing controller board.
    I had thought I uploaded it, but I was mistaken. Also my altium license has expired, and I can't open the schematic. Tomorrow I'll be at uni, so I'll open it up there and export as a pdf for you guys.
    For now here is the code that I have developed. The capSense library takes up a fair bit of ram, static and stack space, ~120bytes so tweaking would be required to reduce this to fit with a full 120 LED framebuffer, I'm sure it can be done. I somehow managed to damage one of the LED on the inner ring, so my clock is only running with 60 LEDs.
    Warning, it's not very pretty.
  17. Like
    GeekDoc reacted to greeeg in 120 LED Ring Clock   
    Yes, there is a small test program on then MCU. it should show accelerometer data with one moving pixel over 6 of the LEDs and then the other 6 show a rainbow.
    this was the programming jig I made.

    But then later just soldered a connector, it's not a perfect fit unfortunately. It was hard to find a small connector that wouldn't obscure parts on the other-side of the PCB.

    Maybe a future revision could use tagConnect? ;P

    I finally mounted the clock, I think it's looking quite fine.

    And I made a write up here, included lots of photos from the physical side of the project.
  18. Like
    GeekDoc reacted to JBUKarl in MSP430 Quadrotor ***attempt***   
    Hello fellow bloggers!
    My name is Karl Anderson, I am a junior at John Brown University, studying electrical engineering. I have been working with a colleague, David Bird (also a junior EE major at JBU) on a quadrotor project for the past six weeks. Below you will find a table with the parts we used:
    5g Brushless Motors * 4
    Turnigy Plush ESC 6A * 4
    10DOF Sensor Board
    Zippy 800 maH LiPo
    TX & RX
    Frame Tubing
    (window screen tubing)
    MSP430G2553 LaunchPad
    3.3V Regulator
    20 Pin DIP Socket
    20 Pin IC Breakout
    10k? Resistors * 3
    Jumper Wires
        Paid Total
    Complete Total
    Key: Paid/Donated
    And their links if purchased online:
    Hobby King
     (Had the charger for this battery already)
    RX & TX:
    The inspiration and foundation of our project was from another blogger, thanhTran, and below is a link to his completed project. We could not have gone as far as we did without him.
    Our plan was first to use thanhTran
  19. Like
    GeekDoc got a reaction from bluehash in [Group Buy-18][D] WS2812 SMD RGB LEDs with integrated driver chip   
    @bluehash:  Title still showed as [O]pen, so I changed it to [D]one.
  20. Like
    GeekDoc reacted to rockets4kids in homemade trainer lab -and- MSP430 vs ATX question :)   
    If you don't add current limiting to a PC power supply you *will* regret it at the worst possible time.
    The simplest way to do this is to regulate the 5V rail down to your desired voltage with a linear regulator that does current limiting such as the LM1117.
  21. Like
    GeekDoc got a reaction from chicken in Your last beer   
    I have actually found a domestic (USA) beer that I like for an everyday beverage: Miller's Fortune.  I prefer Guinness (from can, not bottle), but it's quite expensive here.
  22. Like
    GeekDoc reacted to TI_Trey in Quadcopter BoosterPack   
    Thanks for the comment.  I'm actually a pilot so I appreciate aircraft safety probably a little more than the average person.  This is just a prototype board right now, so I chose to use blue and green LEDs because I think they are pretty.  If we go to production, I'll consider switching out to red/green and adding a strobe.
  23. Like
    GeekDoc reacted to Fred in Drilling mounting holes in MSP430 PCB   
    I'd still use nylon machine screws just in case.
  24. Like
    GeekDoc reacted to greeeg in 120 LED Ring Clock   
    an update.
    I've never encased a full electronics project in clear resin before, but thought it would make the ring look more professional.

    I've got to wait a day or two to make sure it's fully cured, then I have to find out how to remove it safely from my mold.

    It'll either be awesome, or a complete failure.
  25. Like
    GeekDoc reacted to StupidPig in 2.2" Color LCD Booster Pack with Touch   
    @@PTB, Yeah this screen is great. It is strange that I just use the same (195,1859) range as the original lib y axis range for the x axis, and it works great, let me try the (156,1874) range tonight. And I think I just take it one step further by supporting the touch with all 4 screen orientation.
    BTW, here is what I used the screen with...... So many threads about making the MSP430 reflow oven kit, but almost none of them available for purchase, so I just got to make my own.

  • Create New...