Jump to content


Popular Content

Showing most liked content since 12/16/2017 in all areas

  1. 3 points

    Congrats for reaching level 430

    Shouldn’t there be a special badge on 43oh for earning 430 reputation points? Well, congrats to my dear friend @Fmilburn for having crossed that line of 43oh awesomeness
  2. 3 points


    Hello Everyone, I would like to wish all of our members and visitors a wonderful new year. Thank you for contributing and answering posts. Keep posting and wish you all the best.
  3. 3 points
    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. https://github.com/agaelema/LCD16x2_MSP43x
  4. 3 points

    RFC: CNC BoosterPack

    I have recently been working on a CNC BoosterPack that I will make available on Github when completed later in the spring. Current specifications: Support for my HALified version of GRBL (based on 1.1), currently drivers has been made for MSP432 (black version), Tiva C and MSP430F2955. NOTE: firmware is built with CCS 6.1, MSP432 driver is 100% CMSIS based. Opto-coupled inputs, NC switches recommended. Opto-coupled outputs with 200mA open drain drive for spindle on, spindle direction, flood and mist. Can drive most relays and solenoids directly. Output section can be powered from internal 3V3 or 5V source, or from external source. If powered from external source outputs can be made opto-isolated via jumper setting. PWM-output for spindle speed currently directly connected to MCU pin (could be changed to open drain). I2C (IIC) interface with selectable voltage level (3V3 or 5V) via level shifter, dedicated interrupt input. I2C pinout compatible with my 4x4 keyboard project, supports jogging etc. Optional EEPROM for configuration settings for MCUs with no internal EEPROM. Polulu 8825 motor driver breakout board compatible. Fault signal routed to GPIO input. Considered for later revision: Break out SPI interface and add full support for Trinamic motor drivers. Optional (SPI) DAC for motor speed (laser power) control. This might require a 4-layer PCB and also solving the pinout cabal... --- Anything you want changed? Terje
  5. 3 points
    I originally posted about this in October, but wanted to report that I've updated the G2553 special BSL entry code to fix a bug. Everything is included in my Github repository: https://github.com/gbhug5a/MSP430-BSL To review, this project deals with the MSP430G Value Line processors, and was prompted by the idea of embedding a CP2102 USB-to-Serial adapter in a project's circuit rather than hooking one up through a pin header, or using the Launchpad for JTAG flashing. So all you would need to flash new firmware is a USB cable and the right software. A detailed description of what's involved is in the long-winded PDF file. The PDF deals with the much-despised BSL password in the G2553 ROM-based BSL, and offers a couple ways around it, including special boot code that fits entirely in the INFOA segment along with the existing calibration data, and lets you run BSL with INFOA protected from erasure, which means you can flash new firmware without knowing the password, and without erasing the calibration data. There's also a complete custom BSL system for the lowly G2231, which has no built-in BSL. Included are installers for the chip and the PC software to drive the process. And there's a discussion of circuit design for using embedded adapters or modules containing them. The installers for the chips use the Naken assembler, and the PC software uses the LCC compiler. But the repo includes both the source code and the executables for everything, so assembler-phobes can just flash the hex files. There are two small bonuses - a VBScript for Windows that converts an IntelHex file to TI-TXT format, and as part of the BSL installation for the G2231, the calibration values for 8, 12 and 16 MHz are derived from the existing 1 MHz calibration value, with no crystal required, and saved in the usual places in INFOA (based on original work by Steve Gibson). I did the original work on this for a project, and decided I might as well write it up in case it might be useful to others at some point. The Value Line processors are kinda old school now, but are still available in DIP, and are still pretty popular. And the circuit design portion may be more generally useful. Of course I'd like to know about any bugs or errors anyone may find. Hope this will be useful.
  6. 2 points
    @energia Sorry for the delay following up on this - had some family medical issues that I had to be present for. If it is okay, I'm posting my version here in case somebody else needs to do the same thing, will save them a few steps I basically combined the sketch you linked to with the WPA example - this allowed me to get details about the board (mac, IP) and do basic troubleshooting. Switched the Ethernet client to WiFi and plugged in my own values for SMTP and email addresses. I put a comment in indicating which lines somebody who wants to use this would need to change. My next step is to combine this with the "test" firmware I wrote for my PCB, and, if everything works on the Launchpad, upload the bin using Uniflash. Will let you know how that works out! Code from attached Sketch: //combines the WPA WiFi example with the Arduino "panic email" sketch - uses WiFi client in place of Ethernet - WPA client shows data about your board and connection in serial monitor // //replace the variables on lines 8, 10, 12, 15, 17, 18, 67, 71, 75, 82, and 84 (for your board and your SMTP server) // //If all variables are correct, board connects to router then waits until SW3 is pressed, then sends email. // #include <SPI.h> #include <WiFi.h> WiFiClient client; //the Pin for SW3 on a launchpad int buttonPinSW3 = 3; //your router's SSID char ssid[] = "YourSSID"; //your router's password char password[] = "YourPassword"; boolean statusCheck=false; //your board's mac address byte mac[] = { 0xDA, 0xE5, 0x13, 0x25, 0x47, 0xB8 }; //your SMTP server char server[] = "mail.send.com"; int SMTPport = 25; void setup() { Serial.begin(115200); Serial.print("Attempting to connect to Network named: "); Serial.println(ssid); WiFi.begin(ssid, password); while ( WiFi.status() != WL_CONNECTED) { Serial.print("Attempting to connect to Network named: "); Serial.println(ssid); Serial.println("."); delay(300); } Serial.println("\nYou're connected to the network"); Serial.println("Waiting for an ip address"); while (WiFi.localIP() == INADDR_NONE) { Serial.print("."); delay(300); } Serial.println("\nIP Address obtained"); printCurrentNet(); printWifiData(); pinMode(buttonPinSW3, INPUT); } void loop() { if(digitalRead(buttonPinSW3)==HIGH && statusCheck==false) { if(sendEmail()) Serial.println(F("Email sent")); else Serial.println(F("Email failed")); statusCheck = true; } else if (digitalRead(buttonPinSW3)==LOW) { statusCheck = false; } } byte sendEmail() { byte thisByte = 0; byte respCode; if(client.connect(server,SMTPport)) { Serial.println(F("connected")); } else { Serial.println(F("connection failed")); return 0; } if(!eRcv()) return 0; // change to your public ip client.println(F("helo []")); if(!eRcv()) return 0; Serial.println(F("Sending From")); // change to your email address (sender) client.println(F("MAIL From: <sender@send.com>")); if(!eRcv()) return 0; // change to recipient address Serial.println(F("Sending To")); client.println(F("RCPT To: <reader@readme.com>")); if(!eRcv()) return 0; Serial.println(F("Sending DATA")); client.println(F("DATA")); if(!eRcv()) return 0; Serial.println(F("Sending email")); // change to recipient address client.println(F("To: You <reader@readme.com>")); // change to your address client.println(F("From: Me <sender@send.com>")); client.println(F("Subject: Panic Alarm!\r\n")); client.println(F("The panic button was pressed!!!")); client.println(F(".")); if(!eRcv()) return 0; Serial.println(F("Sending QUIT")); client.println(F("QUIT")); if(!eRcv()) return 0; client.stop(); Serial.println(F("disconnected")); return 1; } byte eRcv() { byte respCode; byte thisByte; int loopCount = 0; while(!client.available()) { delay(1); loopCount++; // if nothing received for 10 seconds, timeout if(loopCount > 10000) { client.stop(); Serial.println(F("\r\nTimeout")); return 0; } } respCode = client.peek(); while(client.available()) { thisByte = client.read(); Serial.write(thisByte); } if(respCode >= '4') { efail(); return 0; } return 1; } void efail() { byte thisByte = 0; int loopCount = 0; client.println(F("QUIT")); while(!client.available()) { delay(1); loopCount++; // if nothing received for 10 seconds, timeout if(loopCount > 10000) { client.stop(); Serial.println(F("\r\nTimeout")); return; } } while(client.available()) { thisByte = client.read(); Serial.write(thisByte); } client.stop(); Serial.println(F("disconnected")); } void printWifiData() { // print your WiFi IP address: IPAddress ip = WiFi.localIP(); Serial.print("IP Address: "); Serial.println(ip); Serial.println(ip); byte mac[6]; WiFi.macAddress(mac); Serial.print("MAC address: "); Serial.print(mac[5], HEX); Serial.print(":"); Serial.print(mac[4], HEX); Serial.print(":"); Serial.print(mac[3], HEX); Serial.print(":"); Serial.print(mac[2], HEX); Serial.print(":"); Serial.print(mac[1], HEX); Serial.print(":"); Serial.println(mac[0], HEX); } void printCurrentNet() { Serial.print("SSID: "); Serial.println(WiFi.SSID()); byte bssid[6]; WiFi.BSSID(bssid); Serial.print("BSSID: "); Serial.print(bssid[5], HEX); Serial.print(":"); Serial.print(bssid[4], HEX); Serial.print(":"); Serial.print(bssid[3], HEX); Serial.print(":"); Serial.print(bssid[2], HEX); Serial.print(":"); Serial.print(bssid[1], HEX); Serial.print(":"); Serial.println(bssid[0], HEX); long rssi = WiFi.RSSI(); Serial.print("signal strength (RSSI):"); Serial.println(rssi); byte encryption = WiFi.encryptionType(); Serial.print("Encryption Type:"); Serial.println(encryption, HEX); Serial.println(); } WiFi_Email_Example.ino
  7. 2 points
    Rei Vilo

    Energia Hybrid Code

    For production, I'm using Energia for rapid prototyping. If some parts need to go faster, then I use the DriverLib on ROM, and eventually the registers for further optimisation (I get useful help from this very forum on how to use HWREG). However, the more optimised the code is for speed , the less portable the code is across MCUs. As a matter of facts, most prototypes are "good enough" even for final product. The killer feature of C++ (and thus Energia) is OOP, making maintenance really easy. That's how I've built the LCD_screen Library Suite for the screens supported by the LaunchPads. Adding a new screen only requires defining a couple of functions. Now, there is no secret: different programming methods just move the difficulty from one part to another. It is always interesting to compare different solutions, so students can weight the pros and the cons of each of them (e.g. One Example, Three Environments), and discover that previous analysis is key, whatever the solution. I did the same with RTOS: I completed the Real-Time Bluetooth Networks: Shape the World — MOOC edX UTAustinX UT.RTBN.12.01x MOOC and built the kernel of an RTOS from scratch. Now, I'm very happy to use TI-RTOS or Energia MT directly, with the ease of RTOS elements packaged as objects with the Galaxia library for Energia MT.
  8. 2 points

    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...
  9. 2 points
    Rei Vilo

    Energia Hybrid Code

    I completed the MOOC Embedded Systems: Shape The World — MOOC edX UTAustinX UT.6.02x and learnt how to define an analog input "the real way". Real way // Declare analog input PE2/A1 SYSCTL_RCGC2_R |= 0x00000010; GPIO_PORTE_DIR_R &= ~0b00000100; GPIO_PORTE_AFSEL_R |= 0b00000100; GPIO_PORTE_DEN_R &= ~ 0b00000100; GPIO_PORTE_AMSEL_R |= 0b00000100; SYSCTL_RCGC0_R |= 0x00010000; SYSCTL_RCGC0_R &= ~0x00000300; ADC0_SSPRI_R = 0x0123; ADC0_ACTSS_R &= ~0x0008; ADC0_EMUX_R &= ~0xf000; ADC0_SSMUX3_R &= ~0x000f; ADC0_SSMUX3_R += 1; ADC0_SSCTL3_R = 0x0006; ADC0_ACTSS_R |= 0x0008; // Read value form PE2/A1 ADC0_PSSI_R = 0x0008; while ((ADC0_RIS_R & 0x08) == 0); result = ADC0_SSFIFO3_R & 0xfff; ADC0_ISC_R = 0x0008; Energia way pinMode(A1, INPUT); uint16_t value = analogRead(A1); It is interesting the first time, but laziness made me use the Energia way the times after. Remember laziness is how developers survive :).
  10. 2 points
    Sorry being a newbie to 430oh.com if this is a no-no posting to old threads. But did get the Neopixel Library working with an MSP432 Launchpad (some tweaking of the Cortex-Mx assembly required. Much thanks to the WS2811 driver mentioned here: Only problem is I am not the greatest C++ programmer and had to hardcode the GPIO somewhat in Adafruit_NeoPixel.cpp : //jg 12/5/17 P1.0 is pin 78. 0x40004C02 YELLOW_LED //jg 12/5/17 P2.0 is pin 75. 0x40004C03 RED_LED //jg 1/3/18 P3.0 is pin 18. 0x40004C03 - Gets Neopixel off LED jumper on MSP432 LP But hooks are in Adafruit_NeoPixel.cpp if someone knows PIN_TO_BASEREG array from \Energia15\packages\energia\hardware\msp432\3.8.0\system\driverlib\MSP432P4xx\gpio.c Please see attached 3 files (hopefully all you need to test. The Adafruit_NeoPixel.h file has a very minimal but key change ) and let me know if it works for you. Adafruit_NeoPixel.cpp Adafruit_NeoPixel.h strandtest_joe.ino
  11. 2 points


    Hi guys, The new Launchpad MSP-EXP432P111 was released some days ago. I bought one and it arrived today . 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.
  12. 2 points
    Rei Vilo


    @agaelema Have a look at my project of Low Power Weather Station. The LCD library designed for the MSP430FR4133 and MPS430FR6989 shouldn't be difficult to port to the MSP432P111.
  13. 2 points
    For the pins map, see https://embeddedcomputing.weebly.com/launchpad-cc3200-wifi.html With Energia, use pin numbers instead of port.bit names. The latter aren't supported.
  14. 1 point
    My understanding is that the software serial is only supported in the value line MCUs under energia. However, the 5529 has two hardware serial ports available under energia. I have used both ports on the 5529 with energia in past projects.
  15. 1 point

    Energia Hybrid Code

    I think what you are doing is fine for pedagogical purposes and for that matter development. I too have been frustrated at times by not knowing what is going on in Energia and the time it takes to hunt it down. Nonetheless, I found it useful especially when starting out. Note that when you use DriverLib it is possible to hover the cursor in CCS and see what is going on underneath.
  16. 1 point

    Sd card interface with msp430

    You have the PFatFs library files twice in the Energia's searching path, once in the library/PFatFs folder and once in the sketch folder.
  17. 1 point

    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
  18. 1 point

    Hello from Azerbaijan

    Hello everyone, Yesterday I've got my new MSP430FR2433 Launchpad and I'm planning to launch myself into low-power MSP world with it. Wanted to check out what other enthusiasts and professionals are doing here. Would love to join the community and will definitely try to participate actively. Cheers from Baku, Azerbaijan. Orkhan (azerimaker)
  19. 1 point

    Energia Hybrid Code

    Another approach with a simplified API is drverlib which is provided by TI and the use of #define. For example, to blink a LED: #include "driverlib.h" #define RED_LED GPIO_PORT_P1,GPIO_PIN0 #define DELAY_CYCLES 104500 //-------------------------------- m a i n ----------------------------------- void main(void) { // setup WDT_A_hold(WDT_A_BASE); // stop watchdog timer GPIO_setAsOutputPin(RED_LED); // set red LED port and pin to output direction // loop for(;;){ GPIO_toggleOutputOnPin(RED_LED); // toggle the red LED _delay_cycles(DELAY_CYCLES); // delay a while } }
  20. 1 point

    TM4C1294 ethernet library crashes

    2018: warming up my old thread ;-) good news: not a single crash in the last 4 months, 24/7 operation. I changed ISP and router box back in September. So I guess the TM4C1294 did not like my old router. With the new Fritzbox 7360 it works like a charm.
  21. 1 point
    Rei Vilo


    Both CCS Cloud and CCS standard support Energia.
  22. 1 point
    Attached is a lightweight package. Unzip and place in <Sketch Folder>/hardware/. If the hardware folder does not exist, create it. If you do not know the location of your Sketch folder, go into Energia->Preferences and it is listed under "Sketchbook location" Your directory structure should now look like the below. You can now edit pins_energia.h to match that of your board. hardware/ └── xeebot └── cc3200 ├── boards.txt ├── platform.txt └── variants └── XEEBOT ├── part.h └── pins_energia.h xeebot.zip
  23. 1 point

    Sd card interface with msp430

    It happens to be that DIR is defined in a driverlib header file for the F5529 in msp430f5xx_6xxgeneric.h. The library was originally tested on the G2553 which did not have this define. The work around is to edit the file pff.h in the libraries utility folder. Look for: #define _FATFS The just underneath that add: #ifdef DIR #undef DIR #endif There is one other file which unfortunately has a hardcoded path to SPI.h. Edit the file pfatfs.h and then change the include of SPI.h to #include <SPI.h> like the below: #if _SoftSPI < 1 #include <SPI.h> #endif With those changes it compiles for me but don't have the hardware right now to test it on the F5529. Robert
  24. 1 point
    Can anyone send me a copy, please? I have the SDK installed, so the board shows properly in Device Manager, but I get a compile error in Energia. Prior to this, I did a clean install of Energia on a new install of Windows and when I went to grab the CC3200 drivers, they're not available: http://energia.nu/guide/guide_windows/ The link to http://energia.nu/files/cc3200_drivers_win.zip shows: Oops! Our 404 is showing... That page can’t be found. Nothing was found at this web address. Click your back button, use the menu tabs, or try a search?
  25. 1 point
    I missed this when I answered the Pm yesterday! There are 10 GPIOs (1 ADC, 1 PWM, 2 UART) GPIO 0 PIN 44 ADC - EN (voltage measurement) GPIO 1 PIN 46 TX (UART) GPIO 2 PIN 47 RX (UART) GPIO 4 PIN 49 VMEAS_BAT (voltage measurement) GPIO 5 PIN 50 ADC - DRV5053 - omnidirectional Hall sensor GPIO 10 PIN 3 PWM - Piezo GPIO 12 PIN 9 LED GPIO 13 PIN 10 DRV5032 bi-directional Hall sensor GPIO 14 PIN 5 LED GPIO 28 PIN 19 LED Is that too many to remap an existing board?
  26. 1 point

    MSP430FR2433 LCD16x2

    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. - http://forum.43oh.com/topic/12976-yet-another-lcd-16x2-library-easy-to-configure/ 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.
  27. 1 point
    Rei Vilo


    The LCD library presently works for the MSP430FR4133 and MPS430FR6989 but shouldn't be difficult to port to the MSP432P111. The LCD library is called LCD_Launchpad and included in the Energia 18 distribution for MSP430 boards.
  28. 1 point


    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
  29. 1 point

    MSP430F5529 USB HID Example for Energia

    There is C open source TI USB stack with examples (with one that you need is included)... http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430_USB_Developers_Package/latest/index_FDS.html Supported by CCS or IAR, not Energia.
  30. 1 point

    Hello from Azerbaijan

    Nice man, me too. Trying to get started with MSP here. Good luck from Brazil.
  31. 1 point
    I've submitted three projects at Hackters.io about Energia Multi-Tasking and the Galaxia library. Multi-Tasking with Energia MT with Galaxia Library How to run multiple tasks on a LaunchPad? We're using two different solutions, one standard and another based on the Galaxia library. By Rei Vilo . Manage Single Resource with Energia MT and Galaxia How to manage a single resource across multiple tasks? Semaphores come to the rescue. By Rei Vilo . Send Data Across Tasks with Energia and Galaxia How to send data across tasks? Mailbox can help! By Rei Vilo . Feel free to click on Respect Project!