Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


NurseBob last won the day on December 7 2017

NurseBob had the most liked content!

1 Follower

About NurseBob

  • Rank
    Level 2
  • Birthday 09/09/50

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    St. Helena, CA

Recent Profile Visitors

1,056 profile views
  1. Nrf24l01 communication from MSP430 to Arduino

    Google is your friend... Try here, for example
  2. Nrf24l01 communication from MSP430 to Arduino

    >Also which of MOSI or MISO should be used for one direction communication ? MOSI = MASTER OUT SLAVE IN (frequently seen as SIMO) MISO = MASTER IN SLAVE OUT (again, often seen as SOMI)
  3. Setting up timers/ccr MSP430G2152

    > I'm assuming that the clock source is the internal low frequency oscillator More likely it's running off the main clock. The low frequency oscillator is not being called or set up, and is not the default. Also, in the ISR the cpu is running off the main clock - so the main or submain clock is more likely. I'm assuming you are compiling and running under CCS or IAR? In which case you can put a __no_operation() call in the ISR to see which clock is configured/enabled by inspecting the clock registers. You can also bring out all the various clocks to the designated port pins and put an oscilloscope to see who's running. Agreed, the manuals are not an easy resource for where you are. Howevr, there are numerous code examples (including TI's) on detecting switches and configuring as well as handling clock interrupts. Don't despair - there are lots of resources, all free, out there to let you dive into the code and figure it all out.
  4. Setting up timers/ccr MSP430G2152

    Hi @Cloudberry, Well, based on a quick review of the code it appears that the Port1_ISR (based on a button press) starts a timer, and then based on the Case statement, enters a wait state: while (!(P1IN & BIT1) && !(TA0CCTL0 & CCIFG)) until the timer interrupt is triggered. From an MSP430 programming style perspective, this is not a good coding practice for a few reasons. 1) ISRs should be as short as possible, since there may be other interrupts pending. So, get in, set a flag (often) get out and in the main routine evaluate and process flag states. 2) This is NOT a well designed interrupt-driven program with the incorporated wait states. 3) The ISR runs the CPU to execute its code, and is therefor a power draw - shortens battery life. 4) __delay_cycles is clock dependent, thus not a safe means of waiting for a defined time. You will need to read the docs regarding TA0 - There appears to be virtually no configuration of the timer, so what ever its defalts are??? It's running in Up mode and rolling over (probably at FFFF counts - and time to execute counts is dependent on the selected clock source, could be cpu - running at what?) to generate an interrupt. How long does that take? Without configuring the timer, good question... While it's not often popular advice, time to RTFM on timers and clocks for the SPECIFIC '430 you are using. HTH
  5. > No, 5529 is not 16-bit device. I stand corrected. Though there still no way to store a 64-bit value in a single register, as the OP seemed to desire. FWIW, When I look at TI's marketing for the device: "16-Bit Ultra-Low-Power Microcontroller"
  6. First I don't use a Mac, so I'm ignorant... But a quick Google of the term "MSpanList_Insert" seems to point to a Mac OS version or configuration related issue. I'm guessing it's not specific to the MSP430F5529 you're working with. Sorry I can't help more, but it looks like Google might be your friend here...
  7. The '5529 is a 16-bit device, with 16-bit registers, so it's not possible to use a single register to store a 64-bit value. Perhaps storing the address of the 64-bit value? But I don't see any real rationale for doing that... Others, far smarter than I, may offer better suggestions.
  8. Msp430 software serial error

    Use the hardware serial to communicate, not software serial. As dubnet noted, post your code.
  9. Problems with Energia on MSP430 LaunchPad

    > Has anyone found a solution? Maybe this will help??? https://github.com/energia/Energia/wiki/Common-error-messages
  10. Sd card interface with msp430

    For USB access you'll need to use CCS/IAR or similar and the TI MSPWare USB libraries for the communication (look in particular at the both HID and CDC protocols), and you will have to code the interface between the USB messaging protocol to transfer data between the PC and the MSP430<->SD card. I don't think there's an Energia-based way to use the USB connection, and to transfer data between USB and UART would require you writing that code as well.
  11. Energia Hybrid Code

    Rei, You are clearly demonstrating the benefits of a deeper level of knowledge, which allows you to pick your battles (so to speak), and focus on the production of both code and devices that are efficient not only when they run, but also during the development process. Thanks for sharing your insights. Bob
  12. Energia Hybrid Code

    BTW, I didn't intend to imply that OO design and coding require a less demanding level intrinsic/background knowledge. Having worked in that world, I KNOW it's easily as complex as medical fields.
  13. Energia Hybrid Code

    First, an in-depth answer to your request is above my pay grade. That said... Energia (Arduino) targets an audience of non-programmers, as you're well aware. Students have fundamentally different needs & requirements. Further, regarding OO, a couple of decades back I overheard this brief exchange between a junior and senior engineer: Question - I thought OO was supposed to make everything transparent? Answer - Transparent to the user, opaque to the programmer. OO is a complex world. So is Nursing, which is what I teach. There are parallels in that both require a substantial level of "background" information and understanding. In Nursing, it's a basis in biology, physiology, chemistry, biochemistry, pathophysiology, bacteriology, psychology, anatomy, and more. With OO, there are the basic concepts of "Is" and "Has," which have a "fractal" relationship to their final implementations, the deeper you go, the deeper you can go... I find one of the main challenges with OO design is figuring out where to stop diving down. So, how to accomplish your goal? getting students (I assume at the very early stages of entry level) on board with enough background and intrinsic knowledge so that they can start moving forward exploring the more creative aspects of software applications and implementations. I suspect that your choices are: 1) Write your own example code. Time consuming, to say the least. 2) Use the existing tools and code, which entail their own levels of complexity and obfuscation. For my own edification I have pursued the second route, followed by attempting the first as I try to implement what I THINK I may have learned. So, for example: 1) Start with an Energia implementation of Blink the LED. 2) Import the Energia project in to CCS, which will allow stepping through the code at varying levels of detail, first the loop(), then start looking at how the device is configured and the LED toggled. 3) Use the TI Blink example C code for the device to see a raw C implementation based on delay cycles. (This is also easily "ported" to an IAR kickstart version). 4) Look at an interrupt-based Blink application, introduces timers, ISRs and event-driven programming. (Either CCS or IAR). 5) For a not-really-OO implementation, use the driverlib from TI. I doubt the above accomplishes what you want, but an old adage applies here: If it was easy, anyone could do it... Best, Bob
  14. Energia Hybrid Code

    Agreed. I have no idea of the hundreds of hours I saved by using published code snippets in pursuit of both deadlines and laziness. Interesting that in virtually any other field the "copy/paste" approach could be plagiarism... Laziness vs real way vs driverlib/Energia: I often adopt "lazy" for initial prototyping - get it to work! Then run in a debugger to see what's happening "under the covers." That allows for some analysis regarding efficiency - e.g. battery life (most of my work is not timing dependent, so battery life matters most). I started coding on '430 devices using the TI code examples, and still lean towards the "real way" since it helps me see/understand what's happening, when and why. An Aside Re: TI code examples and Launchpad code - There seems to have been little communication between the various developers. When it come to comms, be it I2C, Serial, USB, working TI examples seem to ALWAYS use different pin/port combinations and ISR handlers. Once I realized that, I found that search/replace usually allowed porting code example to the launchpads. (FWIW - when it dawned on me that there are two I2C handlers on the F5529, I realized I could code a "loopback" version of their I2C Master/Slave examples in one source code file with a pair of patch wires and a pair of 10K resistors. Simplifies debugging test code... Next step, add interrupt-driven serial output to those simple I2C loopback routines for the times I don't want to use a logic analyze or scope.) Ok, I've digressed. I find Energia useful for simple proof-of-concept prototypes, and useful after importing to CCS for step-by-step debugging (Note to self: Don't forget to disable serial output when debugging!!!). I've mostly abandoned the driverlib approach; honestly, I find it way too obscure AND in most instances, it avoids lowpower modes, using "while true" loops which can play havoc with both power management as well as handling communication problems - the apps tend to hang in a forever loop... BTW - great link to the MOOC - something to explore in the coming months. I can always use more structure...
  15. MSP430F5529 USB HID Example for Energia

    I doubt you'll find any Energia USB-CDC examples. For a USB SDK look at the MSP430Ware for the tools you will need. In addition to sample code for a CDC device, there's a primitive Java app that will give you a place to start for MSP430F55xx -> PC communication via USB. I was able to convert one of the HID sample apps in conjunction with the supplied JAVA libs into a data capture app that interfaces at up to 1 KHz (on a good day, heading downhill with a tailwind). For my app, CDC was not an appropriate choice.