Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by Fmilburn

  1. Hi @@altineller


    I tried to reproduce your problem on my TM4C123G LaunchPad.  I hooked up the following with a 6V battery (reads 5.9 on my meter).  Is this your circuit?





    If so, I was able to get the expected readings using this sketch:

    void setup()
    void loop()
      float rawReading;
      rawReading = analogRead(28);
      Serial.print(" Raw Reading = ");
      float Voltage;
      // NOTE: 3.3 is used for conversion since we are
      // using the default internal voltage reference
      Voltage = 3.3 * rawReading / 4095.0;
      Serial.print("      Voltage = ");

    I did not get different readings when I put my meter across as you reported.  Do you have your circuit grounded to the LaunchPad?  Also, did you convert in your sketch using 3.3V or 6V?  Using 6V would give roughly the number you reported.


    Hope this helps.

  2. Hi @@colinives - I'm new to TI microcontrollers also but maybe my perspective is useful in that regard.  One of the really nice things I've noticed about TI is the application notes and boards like the ones that @@bluehash linked to above.  The 43oh community is also extremely helpful.  Although you might not want to use that board it gives you a good idea that the microcontroller can do the job and a starting place for your design.  Truth is, if an ATtiny85 can do it, I suspect any MSP430 could do it, and the low power modes and ability to run at low voltages are there. I'm experimenting with the MSP430FR5969 attached to a capacitor charged by a solar cell and they are certainly low power.  If you are wanting to stick with a DIP package you could look at the EXP430G2 line.  Good luck with your project.

  3. I have been recruited to help teach a class on robotics this summer that is using the MSP430F5529.  I'm a mechanical engineer by background so I've been studying hard so I'll at least be even with the kids when it comes to the microcontroller.  43oh is a great community - my thanks to all those that are helping us beginners out.

  4. I thought I would try the code from @@Nicu with some other LaunchPads.  I don't have a C2000.  Returning lots of zeros?  Here is what I got on other LaunchPads:


    FR5969 - mostly 2's with a rare 3

    F5529 - 2 about 2/3 of time, and 1 for 1/3 of time

    MSP432 - almost always 1 but the rare occasional 2048 or 2049                          <<< this should probably be checked also

    CC3200 - always 1

    Tiva TM4C123 - always 1


    By the way, on an Arduino Uno this gives mostly 1s, with an occasional zero and occasional 2.

  5. I have an Adafruit I2C RTC that I will try with the FR5969.  I thought I had used it successfully in the past but when I pulled it up again this evening I didn't get it going right off the bat.  Will try again and let you know if I am successful.




    I couldn't get the RTC to work when I tried again today - I do a Wire.begin() and then it calls a library where it freezes.


    I then tried with a LCD that has an I2C backpack.  I got it running on the F5529 and moved it to the FR5969.  It doesn't freeze completely but gives garbage on the LCD that changes from time to time.  I checked the wiring and it seems correct. 


    So I am unsuccessful getting I2C to work on the FR5969 as well.  I am using Energia E0015.

  6. There is an easy way to do this using Energia functions that was posted by spirilis elsewhere.  Here is an example:

      Demonstrates a way to utilize LaunchPad low power modes with the
      sleep(), sleepSeconds(), suspend() and wakeup() functions in
      Energia. The LaunchPad will blink the red LED 3 times and
      demonstrate sleep() and sleepSeconds().  It then goes into suspend()
      but will wake up and start over again if the button is pushed.
      sleep() and sleepSeconds() use LPM3. suspend() uses LPM4.
    void setup()
     pinMode(RED_LED, OUTPUT);                  // Make red LED an output
     pinMode(PUSH1, INPUT_PULLUP);              // Make push button input
     attachInterrupt(PUSH1, interrupt, FALLING);// Attach ISR to PUSH1
    void loop()
      // Flash the LED - use sleep and sleepSeconds to save power by going
      // into LPM3
      for (int i = 0; i < 3; i++)           
        digitalWrite(RED_LED, HIGH);
        sleep(200);                        // use sleep for millis
        digitalWrite(RED_LED, LOW);
        sleepSeconds(1);                   // use sleepSeconds for seconds
      // Suspend and go into LPM4
    void interrupt()
      wakeup();                            // wake up if button is pushed
  7. Hello @@johnrdorazio


    1) go to the File tab and use Open... Then navigate to energia-0101E0015/hardware/msp430/libraries/LiquidCrystal/examples/HelloWorld. You may have a different Energia version so adjust accordingly.

    2) go to Sketch tab and use Add File... to add LiquidCrystal.cpp and LiquidCrystal.h which are in the LiquidCrystal folder in step 1) above.

    3) change the line #include <LiquidCrystal> to #include "LiquidCrystal"


    I should add that you won't need to do all this if you put a copy of this in your library.

  8. Hello @@johnrdorazio


    I was curious about this after reading your post. I hooked up my CC3200 and after some investigation got the LiquidCrystal library to work by doing the following:


    1) go to the File tab and use Open... Then navigate to energia-0101E0015/hardware/msp430/libraries/LiquidCrystal/examples/HelloWorld. You may have a different Energia version so adjust accordingly.

    2) go to Sketch tab and use Add File... to add LiquidCrystal.cpp and LiquidCrystal.h which are in the LiquidCrystal folder in step 1) above.

    3) change the line #include <LiquidCrystal> to #include "LiquidCrystal"

    4) specify your pins by number instead of port. For example I am using the following in the instantiation:

    LiquidCrystal lcd(5, 6, 7, 8, 9, 10). You must hook up the LCD pins to match of course.


    What is happening here is that libraries for some LauncPads are in different places. A cc3200 library for LiquidCrystal is not present but the MSP430 library seems to work if you change the pins. Note that using ports, e.g. using P4_1 instead of 10, in the instantiation does not seem to work. This seems to be the case for some of the other LaunchPads as well.


    Hope this helps...

  9. I recently bought a 20x4 LCD with I2C backpack and got it working. I've posted a working library (taken from DFRobot.com) and an example. While I've only used it with the 20x4 LCD it should also work with a 16x2. It has been tested on the MSP430F5529, MSP432P401R, and CC3200. These LCDs need 5V to work and you will need bi-directional logic level conversion. I've posted two circuits that work - one using two BS170 MOSFETs and another with a converter module I bought from Addicore. You can find it here on github.


    EDIT: I recently tried this library with a 16 x 2 LCD and it works with that also. You will need to change the variables that hold screen size where indicated in the example.

  10. There is code with very detailed documentation and many examples for these RFID modules here: https://github.com/miguelbalboa/rfid


    The examples are more complicated than the example here but if you want to see just about everything the module can do I recommend it.  The examples include reading a card, writing to a card, dumping detailed information, changing the card user ID, etc.  The examples and code run without modification except for pin connections with MSP430 LaunchPads.  The pin connections I used are:

    Pin Connections
    RFID Module       LaunchPad        
    --------------    ----------------
    Pin 1  (SDA)      Pin 8  (CS)
    Pin 2  (SCK)      Pin 7  (SCK)
    Pin 3  (MOSI)     Pin 15 (MOSI)
    Pin 4  (MISO)     Pin 14 (MISO)
    Pin 5  (IRQ)      Not connected
    Pin 6  (GND)      GND
    Pin 7  (RST)      Pin 10
    Pin 8  (3V3)      3V3


    Change these lines in the example code if you use my pin mapping above and they should run:

    #define RST_PIN       10        
    #define SS_PIN        8

  11. Hello Larry,


    I find C a bit cryptic myself.


    "Enrf24 radio(P2_0, P2_1, P2_2);" passes the LaunchPad pins that are connected to CE, CSN, and IRQ on your transceiver.  You could change these pins if needed.


    The second question regards a statement in the TX example that is checking to see if anything has been received.  The contents, if any, are in the array inbuf defined by the statement "char inbuf[33];" which is higher up in the program.


    Hope this helps.

  12. Good stuff - I've been looking for a clean way to do this!  However, the wakeup() and suspend() functions don't appear to be documented on the language reference page of Energia.  I wouldn't have found them without seeing this post. Are they documented elsewhere?

  13. Thanks for the quick response...


    Channels and bitrate/datarate are the same.  I tried moving one radio into the next room and the rate of capturing the first packet quickly is higher now. 


    I've been working on it and here are a couple of new observations...


    * it sometimes will receive one or even two "on" transmissions and then the "off".  Of course at times it receives the "off" first.  Regardless, it doesn't seem to receive any more packets after the first "off"

    * If I reset the receiver, it will work again until it gets an "off"

    * I tried putting one in transmit mode on a quiet channel with only a 10 millis delay and then using the channel scanning on the other to see how strong it was and it barely registered. 

    * I tried swapping the transceivers in transmission and reception, sitll no luck

    * I went back and did a new install of the library - it got worse.  I made SPI.setClockDivider(8) and it seemed to get better again but kept stopping after receipt of the first "off" packet

    * Changed bit rate to 250000.  It still stops after the first "off" packet.

    * Changed bit rate back to 1000000 and changed to different channel that seemed quieter.  It still stops after the first "off" packet received.


    I'm out of ideas, only changing SPI clock divider and moving the radio away seemed to help.  I don't understand why it would successfully receive one or two transmissions and then stop.  Maybe one of the nRFs is bad, but I only have the two so can't swap one out right now.  Unfortunately I will be away for a few days and unable to work on my project but appreciate any other thoughts, especially if there is anything different you do for the F5529LP - i.e. change the SPI.setClockDivider since the MCU is running at 25MHz.

  14. Hi,


    I'm having a problem getting the MSP-EXP430F5529LP to work with this library.  Has anyone been successful using the nRF24 with the 430F5529?


    My hardware is:


    cheap nRF24L01 transceivers


    I am using the library examples and the following pins:

    nrf24l01          MSP430F5529
    Signal            LaunchPad
    -----------       -----------
      VCC               3V3
      GND               GND
      SCK               P3.2
      CE                P2.7
      CSN               P1.2
      IRQ               P1.3
      MISO              P3.1
      MOSI              P3.0
    Enrf24 radio(P2_7, P1_2, P1_3);    // CE, CSN, IRQ pins     MSP430F5529


    The serial monitor makes it appear that things are working.  For example, with the transmit example I get the following serial output repeatedly:


    Enrf24 radio transceiver status: DEEP SLEEP <1uA power consumption
    Sending packet: ON
    Enrf24 radio transceiver status: IDLE module powered up w/ oscillators running
    Sending packet: OFF
    Enrf24 radio transceiver status: IDLE module powered up w/ oscillators running
    Sending packet: ON

    For the receiver I get:


    Enrf24 radio transceiver status: DEEP SLEEP <1uA power consumption
    Enrf24 radio transceiver status: Receive Mode

    The problem is that the LED does not blink correctly and I don't get regularly serial messages about receiving a packet.  Rarely, it will recieve one packet, normally right after initializing.  The receiver and transmitter are located a few feet apart.  The channel scanning sketch shows some activity.


    I've tried the following without success:

    * set clock divider at 6 and 8, e.g. SPI.setClockDivider(6);

    * set radio.begin(250000);

    * checked wiring


    Am I doing something wrong or would the library need modification to work with the 430F5529?

  • Create New...