Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by agaelema

  1. Hi,

    I wrote an article (in Portuguese) about how to use the SD16 ADC of MSP43F2013, and to show one practical application I transformed the MSP430F2013 in an I2C 16-bit ADC, similar to ADS1115.

    In the example, I read the data using one Arduino Nano.


    Comparing the conversion of SD16 and ADS1115:


    More details about the project can be found in my Github:

    The project is open to further improvements/optimizations and functions.


  2. Hi,

    I think not because there are is no launchpad using the MSP430F6736, this device is for a specific niche.

    The Energia project focus on devices used on common development board, like the Arduino project.

    But you can use the DriverLib to facilitate the programming of the device.

  3. Hi, 

    I posted a question on e2e but I found interesting to ask here too.

    I'm trying to port the Adafruit MCP4725 library to MSP430 using the Driverlib. I'm testing with launchpad EXP43FR2433 running at 1MHz and I would not want to use interruption to keep the code more portable.

    The sequence to write some value on DAC is relatively simple.
    - Set address -> send start -> send write cmd -> send upper byte -> send lower byte -> send stop.

    Using the following code one byte of the value is lost.

        msp43x_I2C_setSlaveAddress(EUSCI_B0_BASE, _i2caddr);
        msp43x_I2C_masterMultiByteNext(EUSCI_B0_BASE, controlBits);         // write cmd
        msp43x_I2C_masterMultiByteNext(EUSCI_B0_BASE, dataBits / 16);         // Upper data bits (D11.D10.D9.D8.D7.D6.D5.D4)
        msp43x_I2C_masterMultiByteNext(EUSCI_B0_BASE, (dataBits % 16) << 4);  // Lower data bits (D3.D2.D1.D0.x.x.x.x)



    But if I insert some dummy code (__delay_cycles) the transmission starts to work.

    #define I2C_Delay   5
        msp43x_I2C_setSlaveAddress(EUSCI_B0_BASE, _i2caddr);
        msp43x_I2C_masterMultiByteNext(EUSCI_B0_BASE, controlBits);         // write cmd
        msp43x_I2C_masterMultiByteNext(EUSCI_B0_BASE, dataBits / 16);         // Upper data bits (D11.D10.D9.D8.D7.D6.D5.D4)
        msp43x_I2C_masterMultiByteNext(EUSCI_B0_BASE, (dataBits % 16) << 4);  // Lower data bits (D3.D2.D1.D0.x.x.x.x)



    Someone knows what's happening?

    It looks like the library is not checking if the transmission was correctly performed.


  4. Hi @biza

    This two conversions are quite simple to do.

    Decimal to BCD (considering a number between 0 and 99)
    - Divide the number by 10
    - take te result and shift left 4 places
    - take the modulo of division (%) by 10
    - add the reminder to the left shifted value

    BCD to Decimal (considering a number between 0 and 99)
    - Shift right 4 places and multiply by 10
    - apply a "AND" opperation between the number and "0xF" to isolate the lowest nible, then, add to last number

    This video show this:

  5. Hi @Tauronts

    After read your post I updated an old library (I think it's similar to your library).

    It's available in this Thread.

    It works fine on new FR2433 launchpad. My lcd worked with 3.3v, but the contrast is very poor. You can power it with 5V from launchpad, but it can be dangerou without a level converter. If you want to test at your own risk, simply connect the RW pin to GND, so it will always work in write mode, but it's good use a level converter avoiding troubles.

  6. Hi guys,

    To train the use of some macros I decided to update/improve a 16x2 lcd library (HD44780) that I adapt many years ago.

    Possible there are other libraries shared here, but I liked how I managed the configuration of ports and pins using some macros. The use of macros made the library more versatile and easy to adap to new projets without the need to change tons of code lines.

    The same simples example of use is runnig on MSP430G2553 (old value line launchpad) and MSP430FR2433 (the new value line launchpad).

    I hope it's useful.


  7. Thanks @bluehash

    The main objective is to use this launchpad as part of the embedded system of my thesis related to smart metering.

    I can solve two problems
    - A simples interface, like the LCDs present in energy meters
    - A good amount of flash and mainly of RAM to run signal processing and other things

  8. Hi guys,

    The new Launchpad MSP-EXP432P111 was released some days ago. I bought one and it arrived today :biggrin::ph34r:.


    The board use the XMS432P1111 (pre-production version of MSP432) microcontroller, a Cortex M4 with 48MHz, 2MB of flash, 256KB of SRAM (very impressive), 14bit ADC and many other peripherals, like the LCD driver.

    Apparently, the LCD is the same of other launchpads (eg.: EXP430FR6989), very interesting to understand how to use the LCD driver and develop some projects.


    The Out-of-Box demo has two modes:
    - Blink LED, where you can controll the frequency of blink pressing the button S1 and controll the color by pressing the button S2.
    - Temperature mode: Show the temperature based in the internal sensor (pressing S2), or based in an external temperature sensor (pressing S1), a LMT70, but it's necessary to put a jumper in R8, powering the sensor.

    There is a online GUI enabling to control other parameters like special characters in the LCD.


    The finishing of PCB's is impeccable, as always.



  9. Hi,

    I'm working in this library with some useful DSP and math functions (ideally focusing on embedded systems). Currently it's in the initial version with few functions, but I hope to add more in the next update.

    I prefered to use some structs to save parameters and use just one function to various instances of filters (very versatile).

    - High Pass Filter (Single pole): Float, fixed and fixed extended version (with more bits to fractional part)
    - Low Pass Filter (Single Pole): Float, fixed, fixed extended and fixed fast (with some limitations related to cuttof frequency, but more efficienty.
    - RMS value: calculate RMS value of an array or sample by sample. Currently using square root function of math.h, but in the next update I will add a optimized version.

    I hope this can be useful. Feel free to test, share and contribute with this project.

    Github: https://github.com/agaelema/DSP_and_Math


  10. Hi @spirilis

    I'm not a specialist, but traditionally designers use tools like Matlab to select coefficients and test. If I'm not wrong, the CMSIS coefficients were calculated using matlab (providing the code).

    Octave is a free tool with same syntax and similar functions. 

    This link show an example using matlab/octave

    Bellow there are some links to tools (but I have not tested)


  11. Hi,

    These after read this thread about how to use temperature calibration data, I tried to use TLV register to obtain the "real" voltage reference value and increase the ADC conversion by compensating the gain and offset.

    The test was performed in a Launchpad EXP430FR6989, but can be applied to other launchpads compatible with MSP430Ware driverlib.

    The increase in the accuracy is very interesting.

    in the table (sorry by the comma instead of point, brazilian notation).

    • HP 3478A - value measured with DMM
    • ADC_correct1 - value measured with MSP430 without any correction
    • ADC_correct4 - with all corrections using float variables
    • ADC_correct5 - using mainly integer


    Here there is an article about this test and the Github with the example.



  12. I am developing a timeout / soft timer library for the MSP43x and would like to share it with you.

    It's still in the initial version, but all the functions are working. I'm developing and testing on MSP430F6736, but it worked fine on launchpad EXP430F5529LP.

    The library uses a timer to periodically generate ticks. In the base version developed by Felipe Lavratti, the timer-tick occur every 1us through a 32-bit timer (ARM Cotex). To avoid overloading the CPU I modified the code to accept longer time intervals and also functions to automatically calculate the Capture / Compare value of the timer.

    I also tried to isolate the timer configuration in a separate file, so in the future it would allow to select from more than one timer source or different devices, perhaps with compatibility with the old Value Line uCs.

    How the objective is not to give a perfect time base in us, I'm using ticks of 100us (10kHz) and works very well.

    The library has delay, getTime, and Timeout functions, the latter two of which are interesting for managing tasks without holding down processing like a normal delay.

    The example using the EXP430F5529LP use delay_Ms function to toggle 4 times both leds, geTime_ms() to toggle LED1 every 234ms and timeoutCheck_ms() to toggle LED2 every 1s.

    Feel free to leave your opinions and contribute to the project
    - Github of project

    Thank you.


  • Create New...