Search the Community

Showing results for tags 'msp430f5529'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Found 49 results

  1. Hello guys i have a project at my school were i need to make an energy metter with a msp430f5529 and a hardware part i did all the code myself and the hardware part (current metters,voltage divider etc), (i know is rudimental and ineffective) , the code and the montage works well and does everything i need it to do.Now my professor asked me to save "energie1" and "energie2" so when my microcontroler runs out of battery this 2 variables are saved , i read a lot of threds but i can't figure it out.Here is the code if it helps ( i can provide you with hardware montage if needed). #include <Wire.h> #include "LiquidCrystal_I2C.h" byte address = 0x27; // LCD I2C address int columns = 20; // number of columns on LCD int rows = 2; // number of rows on LCD LiquidCrystal_I2C lcd(address, columns, rows); long previousMillis = 0; long previousMillis1 = 0; int timp; int sensorPin = 23; int sensorValue = 0; float volt; byte newChar1[] = { B11111, B10001, B10001, B10001, B10001, B10001, B10001, B11111 }; byte newChar2[] = { B00000, B00000, B11100, B11100, B11100, B11100, B00000, B00000 }; byte newChar3[] = { B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111 }; int sensorPin1 = 24; int sensorValue1 = 0; float amp1; int sensorPin2 = 25; int sensorValue2 = 0; float amp2; float putere1; float total_putere1; float energie1; float media_puteri1; float putere2; float total_putere2; float energie2; float media_puteri2; long interval = 1000; long interval1=270; const int buttonPin = PUSH2; int buttonPushCounter = 0; int buttonState = 0; int lastButtonState = 0; void setup() { lcd.init(); pinMode(buttonPin, INPUT_PULLUP); lcd.createChar(0, newChar1); lcd.createChar(1, newChar2); lcd.createChar(2, newChar3); } void loop() { buttonState = digitalRead(buttonPin); sensorValue = analogRead(sensorPin); sensorValue1 = analogRead(sensorPin1); sensorValue2 = analogRead(sensorPin2); unsigned long currentMillis = millis(); unsigned long currentMillis1 = millis(); timp=currentMillis/1000; if(currentMillis - previousMillis > interval) { previousMillis = currentMillis; volt=sensorValue; volt=(volt*3.3)/4096; volt=volt*8.51; amp1=sensorValue1; amp1=(amp1*3.3)/4096; if(amp1<0.5) amp1=0; amp1=amp1/0.5; amp2=sensorValue2; amp2=(amp2*3.3)/4096; amp2=amp2/0.05; if(amp2<1.25) amp2=0; putere1=volt*amp1; putere2=volt*amp2; total_putere1=putere1+total_putere1; total_putere2=putere2+total_putere2;} if (buttonState == LOW) { lcd.backlight(); } else lcd.noBacklight(); if(currentMillis1 - previousMillis1 > interval1) { previousMillis1 = currentMillis1; if(buttonPushCounter==1){ lcd.clear(); lcd.setCursor(0,0); lcd.print("Battery Voltage"); lcd.setCursor(0,1); lcd.print(volt); lcd.print(" V");} if(buttonPushCounter==2){ lcd.clear(); lcd.setCursor(0,0); lcd.print("Solar Current"); lcd.setCursor(0,1); lcd.print(amp1); lcd.print(" A");} if(buttonPushCounter==3){ lcd.clear(); lcd.setCursor(0,0); lcd.print("Pump Current"); lcd.setCursor(0,1); lcd.print(amp2); lcd.print(" A");} if(buttonPushCounter==4){ lcd.clear(); lcd.setCursor(0,0); lcd.print("Solar Energy"); lcd.setCursor(0,1); lcd.print(energie1); lcd.print(" Wh");} if(buttonPushCounter==5){ lcd.clear(); lcd.setCursor(0,0); lcd.print("Pump Energy"); lcd.setCursor(0,1); lcd.print(energie2); lcd.print(" Wh");} if(buttonPushCounter==6){ lcd.clear(); if(volt>12.6){ lcd.clear(); lcd.setCursor(0,1); lcd.write(2); lcd.write(2); lcd.write(2); lcd.write(2); lcd.write(2); lcd.write(1); lcd.setCursor(0,0); lcd.print("State Of Charge"); lcd.setCursor(6,1); lcd.print("100"); lcd.print("%");} if(volt<12.45 && volt>12.21){ lcd.clear(); lcd.setCursor(0,1); lcd.write(2); lcd.write(2); lcd.write(2); lcd.write(2); lcd.write(0); lcd.write(1); lcd.setCursor(0,0); lcd.print("State Of Charge"); lcd.setCursor(6,1); lcd.print("80"); lcd.print("%");} if(volt<12.20 && volt>11.91){ lcd.clear(); lcd.setCursor(0,1); lcd.write(2); lcd.write(2); lcd.write(2); lcd.write(0); lcd.write(0); lcd.write(1); lcd.setCursor(0,0); lcd.print("State Of Charge"); lcd.setCursor(6,1); lcd.print("60"); lcd.print("%");} if(volt<11.90 && volt>11.60){ lcd.clear(); lcd.setCursor(0,1); lcd.write(2); lcd.write(2); lcd.write(0); lcd.write(0); lcd.write(0); lcd.write(1); lcd.setCursor(0,0); lcd.print("State Of Charge"); lcd.setCursor(6,1); lcd.print("40"); lcd.print("%");} if(volt<11.59){ lcd.clear(); lcd.setCursor(0,1); lcd.write(2); lcd.write(0); lcd.write(0); lcd.write(0); lcd.write(0); lcd.write(1); lcd.setCursor(0,0); lcd.print("State Of Charge"); lcd.setCursor(6,1); lcd.print("20"); lcd.print("%");}} if(buttonPushCounter>6) buttonPushCounter=1;} if (buttonState != lastButtonState) { if (buttonState == HIGH) { buttonPushCounter++;}} lastButtonState = buttonState; media_puteri1=total_putere1/timp; energie1=media_puteri1*timp/3600; media_puteri2=total_putere2/timp; energie2=media_puteri2*timp/3600; }
  2. I would like to know if anyone used the Sparkfun GPS logger on MSP430. The example used by the library from Github is legit for arduino only 3.3v, rx, tx, and ground. When we connect them to MSP430 it doesn't work.
  3. Helllllo World!
  4. hello all, i am working currently with MSP430F5529 launch pad and looking for SD card library for data logging purpose. i already checked out few libraries which are given on Github. i have added one library to my Energia software. and got following errors In file included from C:\Users\hp-pc\Documents\Energia\libraries\SD-master/utility/Sd2Card.h:26:0, from C:\Users\hp-pc\Documents\Energia\libraries\SD-master/utility/SdFat.h:29, from C:\Users\hp-pc\Documents\Energia\libraries\SD-master/SD.h:25, from C:\Users\hp-pc\Documents\Energia\libraries\SD-master\examples\Datalogger\Datalogger.ino:24: C:\Users\hp-pc\Documents\Energia\libraries\SD-master/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported. exit status 1 Error compiling for board MSP-EXP430F5529LP. can anyone help out for this.
  5. I've been developing a 'F5529 USB device and have a Java-based USB UI to control operating parameters. The intent with the java app is to allow "easy" access on both PCs and Macs (and of course, Linux too...). However, while I've got Windows and Linux machines here, I don't have any Mac devices. I'm seeing these older Mac notebooks for around $150.00, which doesn't break the bank. For those of you who are Mac literate, would one of these be a reasonable machine to test installation of both the HID aspects of the 'F5529 and functionality of the Java app? TIA! Bob
  6. I have a MSP430F5529 module and I have connected CC110 L module to it.. I have another CC3200 Module with CC110L. I wish to send the analog values measured by MSP430F5529 to the CC3200 through RF. Here is my transmitter code(MSP430F5539 and CC110L).. I tried to modify the existing Wireless example.. #include <SPI.h> #include <AIR430BoostFCC.h> #define CMD_OFF 0 #define CMD_ON 1 /** * sControl - control packet. */ struct sControl { unsigned char cmd1;unsigned char cmd; }; struct sControl txControl = { CMD_OFF }; // TX control packet struct sControl rxControl = { CMD_OFF }; // RX control packet int sensorpin=A0; int sensorvalue=0; int u=0,t=0,h=0; char ID[]="ABCD"; void printRxData() { // Print the last received command to the serial port. Serial.print("RX Command: "); Serial.println(rxControl.cmd1); } void setup() { Radio.begin(0x02, CHANNEL_1, POWER_MAX); Serial.begin(9600); pinMode(RED_LED,OUTPUT); } void loop() { if(Radio.receiverOn((unsigned char*)&rxControl,sizeof(rxControl),1000)>0) { if(rxControl.cmd==3) { digitalWrite(RED_LED,HIGH); sensorvalue=analogRead(sensorpin); sensorvalue=map(sensorvalue,0,4096,0,255); char ID[4]="C"; char b[4]; itoa(sensorvalue,b,10); strcat(ID,b); Serial.println(ID); Radio.transmit(ADDRESS_BROADCAST,(unsigned char*)&ID,sizeof(ID)); } digitalWrite(RED_LED,LOW); } } On My receiver side I have a CC3200 with a CC110L booster pack. When the receiver code sends a #include <SPI.h> #include <AIR430BoostFCC.h> // ----------------------------------------------------------------------------- /** * Defines, enumerations, and structure definitions */ #define CMD_OFF 0 #define CMD_ON 1 /** * sControl - control packet. */ struct sControl { unsigned char cmd1;unsigned char cmd; }; // ----------------------------------------------------------------------------- /** * Global data */ struct sControl txControl = { CMD_OFF }; // TX control packet struct sControl rxControl = { CMD_OFF }; // RX control packet int sensorpin=A0; int sensorvalue=0; int u=0,t=0,h=0; char ID[]="XXXX"; // ----------------------------------------------------------------------------- // Debug print functions void printRxData() { // Print the last received command to the serial port. Serial.print("RX Command: "); Serial.println(ID); } int i=0; void setup() { Radio.begin(0x02, CHANNEL_1, POWER_MAX); Serial.begin(9600); pinMode(RED_LED,OUTPUT); pinMode(GREEN_LED,OUTPUT); pinMode(YELLOW_LED,OUTPUT); digitalWrite(RED_LED,LOW); digitalWrite(YELLOW_LED,LOW); digitalWrite(GREEN_LED,LOW); } void loop() { txControl.cmd=i; Radio.transmit(ADDRESS_BROADCAST,(unsigned char*)&txControl,sizeof(txControl)); while (Radio.busy()); if (Radio.receiverOn((unsigned char*)&ID, sizeof(ID), 1000) > 0) { printRxData();digitalWrite(RED_LED,HIGH); } i++; if(i==4) { i=0; } } In receiver code I have a line txControl.cmd=i;.. When the value of i==3 it will ping the cc3200 transmitter to send the analog data back.. i=1 and i=2 are reserved for launchpads with MSP430G2553 and CC110L (They are working really fine).. But the MSP430F5529 is not sending the data back ... On t he Receiver side i will get the data in the format as A70 B30 C123 A is the Identity of the node and the numbers followed after that is the analog value of that node Please help
  7. Hello Everybody, I am using a MSP430F5529 Launchpad with Energia IDE in order to measure the current flowing on the motor. But I have a problem with sampling rate. The current that I want to measure has a 22kHz frequency and I have a 10kHz sampling rate. I would like to have a 200kHz sampling frequency. I found in an other topic that the sampling rate can be reduce because of the serial.print. So, I stored my values in a array before displaying them. i have a better sampling (10kHz) but not enough. Could you tell me how can I improve the sampling rate ? Attached the sketch. Thank you. Sketch Current Measurement .txt
  8. I am storing data in program memory using PROGMEM, and reading it using pgm_read_byte() and pgm_read_word(), to save RAM. However, the compiler gives warnings: In function 'int lookupnumber(int)': warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] I've read that it's not good practice to ignore these warnings, but I can't see how to eliminate them. A demonstration program is: const int numbers[] PROGMEM = { 2, 3, 5, 7, 11, 13, 17, 23 }; int lookupnumber (int i) { return pgm_read_word(&numbers[i]); } void setup() { Serial.begin(9600); } void loop() { Serial.println(lookupnumber(4)); for (;;); } Thank you.
  9. I am trying to set up a watchdog timer on the MSP430F5529 LaunchPad, and I can't seem to get it to work. My code is: void watchdogenable (int interval) { WDTCTL = WDTPW | WDTCNTCL | interval; } void watchdogreset () { WDTCTL = WDTPW | WDTCNTCL | (WDTCTL & 0x07); } void setup() { Serial.begin(9600); Serial.println("Start"); watchdogenable(1); } int count = 0; void loop() { Serial.println(count++); delay(1000); } It prints: Start 0 and then gets no further before being reset by the watchdog 8 seconds later. I would expect it to count up to 8. If I take out the delay() statement it seems to work properly. Any suggestions?
  10. Nick Gammon published an interesting post on using SPI on 16 MHz Arduinos to run WS2812 LEDs (aka neopixels) at: http://gammon.com.au/forum/?id=13357. He also provides a link with a lot of information about the NRZ protocol used by the WS2812 and tolerances: https://wp.josh.com/2014/05/13/ws2812-neopixels-are-not-so-finicky-once-you-get-to-know-them/. The tolerances are actually quite a bit looser than what I previously believed. So, I set out to do something similar with Energia and LaunchPads running at different speeds. Spoiler alert: It works. The previously linked articles provide all the background so minimal information is repeated here. NRZ is a one wire protocol that transfers information to the LEDs by varying the length of the signal when high. A longer pulse is used for a 1, and a shorter one for a 0. The timing, with tolerances, is shown in the figure below. The length between pulses cannot exceed about 5 us and most everything else is pretty loose. The protocol is implemented using SPI which I find pretty clever. A byte is sent out with the SPI module with the proper length to represent the desired bit for the protocol. The following must be determined and set to do this: Set proper SPI clock speed using SPI.setClockDivider() in Energia Determine the proper byte to send by SPI.transfer() in Energia to represent a 0 or 1 bit For example, using the MSP430F5529: Clock speed is 25.6 MHz Setting the SPI clock divider to 4 gives a SPI clock of 6.4 MHz and since the SPI block executes in one cycle (Arduino executes in 2), each bit in the byte is equivalent to 156.25 ns. Therefore, to send a pulse indicating a "1", a byte equal to 0b1111000 could be used which gives 4x156.25 = 625 ns. This is in the acceptable range of 550 to 850 ns. Similarly, for a 0 an acceptable byte would be 0b11000000 or 312.5 ns. A similar process can be used to determine acceptable values for the MSP430G2553. The sketch below is a simplification of the library presented by Nick which and includes the modifications described above to run on both the G2553 and F5529. The preprocessor is used to set appropriate values for the clock divider and long and short bytes. The functions are very nearly the same as posted by Nick. Note that interrupts must be disabled before sending data and then reenabled manually after. /* * WS2812 display using SPI on various TI LaunchPads with Energia * * Connections: * LaunchPad LED Strip * --------- --------- * 3V3 5VDC * Pin 15 (MOSI) DIN * GND GND * * How to use: * ledsetup (); - Get ready to send. * Call once at the beginning of the program. * sendPixel (r, g, ; - Send a single pixel to the string. * Call this once for each pixel in a frame. * Each colour is in the range 0 to 255. Turn off * interrupts before use and turn on after all pixels * have been programmed. * show (); - Latch the recently sent pixels onto the LEDs . * Call once per frame. * showColor (count, r, g, ; - Set the entire string of count Neopixels * to this one colour. Turn off interrupts before use * and remember to turn on afterwards. * * Derived from NeoPixel display library by Nick Gammon * https://github.com/nickgammon/NeoPixels_SPI * With ideas from: * http://wp.josh.com/2014/05/13/ws2812-neopixels-are-not-so-finicky-once-you-get-to-know-them/ * Released for public use under the Creative Commons Attribution 3.0 Australia License * http://creativecommons.org/licenses/by/3.0/au/ * * F Milburn November 2016 * Tested with Energia V17 and WS2812 8 pixel strip on launchpads shown below. */ #include <SPI.h> #if defined(__MSP430G2553) #define SPIDIV SPI_CLOCK_DIV2 // 16 MHz/2 gives 125 ns for each on bit in byte #define SPILONG 0b11111100 // 750 ns (acceptable "on" range 550 to 850 ns) #define SPISHORT 0b11100000 // 375 ns (acceptable "on" range 200 to 500 ns) #elif defined(__MSP430F5529) #define SPIDIV SPI_CLOCK_DIV4 // 25.6 MHz/4 gives 156.25 ns for each on bit in byte #define SPILONG 0b11110000 // 625 ns (acceptable "on" range 550 to 850 ns) #define SPISHORT 0b11000000 // 312.5 ns (acceptable "on" range 200 to 500 ns) #else #error This microcontroller is not supported #endif const unsigned int PIXELS = 8; // Pixels in the strip void setup (){ ledsetup(); } void loop (){ // Show a solid color across the strip noInterrupts(); // no interrupts while sending data showColor (PIXELS, 0xBB, 0x22, 0x22); // single color on entire strip interrupts(); // interrupts are OK now delay(1000); // hold it for a second // Show a different color on every pixel noInterrupts(); // no interrupts while sending data sendPixel(0xBB, 0x00, 0x00); // red sendPixel(0x00, 0xBB, 0x00); // green sendPixel(0x00, 0x00, 0xBB); // blue sendPixel(0xBB, 0xBB, 0xBB); // white sendPixel(0xBB, 0x22, 0x22); // pinkish sendPixel(0x22, 0xBB, 0x22); // light green sendPixel(0x22, 0x22, 0xBB); // purplish blue sendPixel(0x00, 0x00, 0x00); // pixel off interrupts(); // interrupts are OK now delay(1000); // hold it for a second } // Sends one byte to the LED strip by SPI. void sendByte (unsigned char { for (unsigned char bit = 0; bit < 8; bit++){ if (b & 0x80) // is high-order bit set? SPI.transfer (SPILONG); // long on bit (~700 ns) defined for each clock speed else SPI.transfer (SPISHORT); // short on bit (~350 ns) defined for each clock speed b <<= 1; // shift next bit into high-order position } // end of for each bit } // end of sendByte // Set up SPI void ledsetup(){ SPI.begin (); SPI.setClockDivider (SPIDIV); // defined for each clock speed SPI.setBitOrder (MSBFIRST); SPI.setDataMode (SPI_MODE1); // MOSI normally low. show (); // in case MOSI went high, latch in whatever-we-sent sendPixel (0, 0, 0); // now change back to black show (); // and latch that } // end of ledsetup // Send a single pixel worth of information. Turn interrupts off while using. void sendPixel (unsigned char r, unsigned char g, unsigned char { sendByte (g); // NeoPixel wants colors in green-then-red-then-blue order sendByte (r); sendByte (; } // end of sendPixel // Wait long enough without sending any bits to allow the pixels to latch and // display the last sent frame void show(){ delayMicroseconds (9); } // end of show // Display a single color on the whole string. Turn interrupts off while using. void showColor (unsigned int count, unsigned char r , unsigned char g , unsigned char { noInterrupts (); for (unsigned int pixel = 0; pixel < count; pixel++) sendPixel (r, g, ; interrupts (); show (); // latch the colours } // end of showColor The timing, when checked on a logic analyzer, checks out with the calculations above (hooray for math). The "gaps" between pulses are within tolerance and largely set by code overhead as well as the byte being sent. And here it is showing the strip lit up in one color. I tried this on several other LaunchPads I had handy and here is a summary: FR6989 - I had never noticed, but Energia defaults to 8 MHz. Doing the math, there isn't a good match to the WS2812 requirements without changing processor speed (which I did not try). MSP432 - there was behavior I couldn't explain, probably due to RTOS and I didn't pursue this for long. In summary, the method works although I did limited experimentation. It would be even easier to implement outside of Energia with full access to clocks. It was an interesting exercise but alternative methods have been posted here on 43oh with tuned assembler and having used those successfully in the past, I will probably continue to preferentially use them in the future.
  11. My compact Lisp interpreter, uLisp, now supports the MSP430F5529 and MSP430FR5969 LaunchPads. As well as supporting a core set of Lisp functions, uLisp includes Arduino/Energia extensions, making it ideal as a control language for the MSP430. For more information see http://www.ulisp.com/.
  12. Hi i would like to do a nfc reader using dlp7970 and msp 430f5529. How do i get the library if i want to code in energia regards durga
  13. I am using DLP-7970ABP and MSP430F5529. I downloaded the example file from http://www.ti.com/tool/dlp-7970abp#Technical Documents. The target configuration of the source code and my board was different. When i attempt to change the target configuration, an error pops up. i am not sure how to rectify the error. Thanks
  14. Hello all I am almost done with my project due to all your help Posting probably the last query I am trying to download library for external eeprom connected using i2c to my msp430f5529 launch pad. The entire library is available on github As github recently updated the website i cannot download the new libraries. Can anyone help me out by providing some other sources for this library. Library i am searching is External eeprom using i2c for msp430f5529 launch pad Thanks and regards
  15. Hello Forums I am trying to use GUI Composer v2 (on the cloud) to create a GUI for a battery managment system, similar to the one in the SLAA478 Application Report, using the MSP-EXP430F5529LP and bq76PL536EVM-3. I've decided to use USB/Serial comms, which requires me to modify the code to send the information using JSON. I am following the example of using USB/Serial IO: https://dev.ti.com/gc/designer/help/Tutorials/Serial/index.html. The code given is as follows: #include <aJSON.h> // most launchpads have a red LED #define LED RED_LED //see pins_energia.h for more LED definitions void printled_statewithjson(int state){ aJsonObject* root = aJson.createObject(); if (root == NULL) { return; } aJson.addItemToObject(root, "LED", aJson.createItem(state)); char* string = aJson.print(root); if (string != NULL) { Serial.println(string); free(string); } aJson.deleteItem(root); } // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(LED, OUTPUT); Serial.begin(9600); } // the loop routine runs over and over again forever: void loop() { digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) printled_statewithjson(1); // print json object with LED status set to 1 to UART delay(1000); // wait for a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW printled_statewithjson(0); // print json object with LED status set to 0 to UART delay(1000); // wait for a second } I am trying to fully understand this example code, before implementing it into my program. Using CCS Cloud, I stepped through the program in debug mode. From what I understand, the loop() function is essentially the main function, which blinks the LED; setup() does as expected and initializes the MCU LED pin, and opening a serial port at 9600 baud rate. I cannot, however, understand the printled_statewithjson() function. How exactly does it work to be able to send the information? Regards
  16. Hello all I just joined this forum. I am working on aa product which requires rtc time stamp and flash to store some variables Can anybody provide me some libraries related to internal rtc of msp430f5529 and how to write integers to msp flash Also if anyone can provide me library to write anything flash like integers characters etc
  17. Energia and Arduino users eventually get to the point where they need more direct access to the hardware if they take on more complicated projects. In addition to the direct access of registers using the provided header files, TI offers DriverLib which contains abstractions for accessing the peripherals. To better understand the peripherals, and to check out DriverLib, I recently created 20+ short examples for my own edification. All of them were written for the MSP430F5529 LaunchPad and most of the peripherals are covered. In some cases pushbuttons, LEDs, resistors, potentiometer, etc. are required that you probably have on hand. A multimeter is required, and in some cases an oscilloscope and logic analyzer are instructive but not necessary. DriverLib SPI Example 13A_USCI_B_SPI_MCP41010_digiPot All of the examples are located here: https://github.com/fmilburn3/MSP430F5529_driverlib_examples It is necessary to have some understanding of the registers before using DriverLib because the DriverLib documentation doesn't describe how the peripherals and their registers work. The documentation for registers is located in the User
  18. Hello, I am trying to interface mlx90614 IR temperature sensor with MSP430f5529. Initially i interfaced this sensor with arduino uno without any problem. I could even fetch object and ambient temperature. But when it came to interfacing with MSP430 board using i2c. Kindly guide me for this. Regards.
  19. Hello! I am using Energia 17 & 18 to code for the MSP430F5529 and ADXL345. The following is the code I used. //Add the SPI library so we can communicate with the ADXL345 sensor #include <SPI.h> //Assign the Chip Select signal to pin 2. int CS = 2; //This is a list of some of the registers available on the ADXL345. //To learn more about these and the rest of the registers on the ADXL345, read the datasheet! char POWER_CTL = 0x2D; //Power Control Register char DATA_FORMAT = 0x31; char DATAX0 = 0x32; //X-Axis Data 0 char DATAX1 = 0x33; //X-Axis Data 1 char DATAY0 = 0x34; //Y-Axis Data 0 char DATAY1 = 0x35; //Y-Axis Data 1 char DATAZ0 = 0x36; //Z-Axis Data 0 char DATAZ1 = 0x37; //Z-Axis Data 1 //This buffer will hold values read from the ADXL345 registers. char values[10]; //These variables will be used to hold the x,y and z axis accelerometer values. long x,y,z; void setup(){ //Initiate an SPI communication instance. SPI.begin(); //Configure the SPI connection for the ADXL345. SPI.setDataMode(SPI_MODE3); //Create a serial connection to display the data on the terminal. Serial.begin(115200); Serial.println("GO!"); //Set up the Chip Select pin to be an output from the Arduino. pinMode(CS, OUTPUT); //Before communication starts, the Chip Select pin needs to be set high. digitalWrite(CS, HIGH); //Put the ADXL345 into +/- 4G range by writing the value 0x01 to the DATA_FORMAT register. writeRegister(DATA_FORMAT, 0x00); //Put the ADXL345 into Measurement Mode by writing 0x08 to the POWER_CTL register. writeRegister(POWER_CTL, 0x08); //Measurement mode } void loop(){ //Reading 6 bytes of data starting at register DATAX0 will retrieve the x,y and z acceleration values from the ADXL345. //The results of the read operation will get stored to the values[] buffer. readRegister(DATAX0, 6, values); //The ADXL345 gives 10-bit acceleration values, but they are stored as bytes (8-bits). To get the full value, two bytes must be combined for each axis. //The X value is stored in values[0] and values[1]. x = ((long)values[1]<<8)|(long)values[0]; //The Y value is stored in values[2] and values[3]. y = ((long)values[3]<<8)|(long)values[2]; //The Z value is stored in values[4] and values[5]. z = ((long)values[5]<<8)|(long)values[4]; //Print the results to the terminal. Serial.print(x); Serial.print('\t'); Serial.print(y); Serial.print('\t'); Serial.println(z); delay(100); } //This function will write a value to a register on the ADXL345. //Parameters: // char registerAddress - The register to write a value to // char value - The value to be written to the specified register. void writeRegister(char registerAddress, char value){ //Set Chip Select pin low to signal the beginning of an SPI packet. digitalWrite(CS, LOW); //Transfer the register address over SPI. SPI.transfer(registerAddress); //Transfer the desired register value over SPI. SPI.transfer(value); //Set the Chip Select pin high to signal the end of an SPI packet. digitalWrite(CS, HIGH); } //This function will read a certain number of registers starting from a specified address and store their values in a buffer. //Parameters: // char registerAddress - The register addresse to start the read sequence from. // int numBytes - The number of registers that should be read. // char * values - A pointer to a buffer where the results of the operation should be stored. void readRegister(char registerAddress, int numBytes, char * values){ //Since we're performing a read operation, the most significant bit of the register address should be set. char address = 0x80 | registerAddress; //If we're doing a multi-byte read, bit 6 needs to be set as well. if(numBytes > 1)address = address | 0x40; //Set the Chip select pin low to start an SPI packet. digitalWrite(CS, LOW); //Transfer the starting register address that needs to be read. SPI.transfer(address); //Continue to read registers until we've read the number specified, storing the results to the input buffer. for(int i=0; i<numBytes; i++){ values = SPI.transfer(0x00); } //Set the Chips Select pin high to end the SPI packet. digitalWrite(CS, HIGH); } The output is all -1,-1,-1. When I moved the ADXL345 module, they became 0,0,0 or some wired combinations like -1,0,-678234. Can someone help me to see what is wrong with the code? I changed the chip select pin numbers when I code for them and I am using USCIA port. This code is from other places. Thanks! Yutao Li
  20. Hello everybody, I would like to measure the speed rotation of a motor. For this, i use a photodiode. The signal waveform is given by the picture. I want to measure this signal frequency using the MSP430F5529 and Energia and display it in the serial monitor. I know i have to use the Timer A in Capture/Compare mode but I don't know how. I saw a lot of codes but they use CCS and the MSP430g2553 and it is not clear for me. How can I proceed to measure the frequency of my signal ? The frequency can vary from 50Hz to 500Hz. Thank you for your help.
  21. I like the boosterPack concept, but for my current project I needed access to all the pins on an F5529 as well as an F2013. So, I constructed a couple of boards to plug into an MSP-TS430PN80USB in a boosterpack fashion. As is probably obvious, I missed a couple of traces (GND lines), for which I had to add the little green wires. The top board has all my sensors, and the bottom is basically battery management and a sx1509 port expander to manage a number of LEDs. I don't actually need the extra ports, but I wanted the sx1509's built-in LED "breathe" capability. Saves coding... -lazy programmer I was a happy camper when I fired-up the system and was able to access and program both MCUs. I've found that I can choose between running two instances of IAR (or CCS) and debug both micros simulaneously. Handy for the comms and interrupt handing. So, let the fun begin... BTW - the TFT LCD is from buydisplay.com - 2.8" TFT with Cap touch (about $15.00 U.S.). It's using the ILI9341 controller for the LCD and the FT6206 controller for the cap touch. For proof of concept I was able to use the Adafruit sketches to connect with both, and the edits were limited to pin assignments, if I remember correctly.
  22. While trying to incorporate Adafruit's FT6206 library (capacitative touch for a TFT LCD) after calling the constructor: Adafruit_FT6206 ctp = Adafruit_FT6206(); a following call to: ctp.begin() would hang. While stepping in with the CCS debugger I finally found (after a couple of hair-pulling hours) in the call stack that there were a number of calls to Serial.print() to enumerate and display the registers and status of the FT6206. My solution, which leaves me wondering if there's not a better way, is to wrap their calls in a #ifdef/#endif regarding a debug console for the hardware serial port on my msp430F5529. So, is there a more elegant solution? Thx, Bob
  23. My wife wants to know that when I do my John Muir Trail trek starting on 7/26/2016 I've not fallen down and can't get up, or been eaten by a bear... So, I've been building my DIY "SpotMe" Iridium Network-based GPS-Satellite Comm device. I've gotten to the basic level of communication; It reports my position on a regular basis (the following is from a morning conditioning hike). To my surprise, when I set the deconstructed system up on my kitchen table, it managed to both get a GPS fix AND successfully transmit the data to an Iridium satellite. Given that there is really no "sky" visible from my kitchen, a better than expected performance! Why build it when I could buy similar? Well, why not??? Similar to Dave Jones' "take it apart" I'm a firm believer in DIY to figure out how something works, and can I make one... Future travel plans: I do "Iron Butt" rides on my 2005 ST1300 - now with 175,000+ miles (there's no typo there, I've really driven that far on my bike...), and I'm planning to do 300 mile sections of the Pacific Crest Trail for the next 10 years. So, again, keeping the wife happy and "in the know." So, this will be something I plan to use on a regular basis over the next several years. Once finished with the project I will publish all code, hex and design files for those who have an interest. Finally, thanks to all who have helped me. Especially Robert Woodruff, yyrkoon, and Spirilis. Bob http://www.nursebobsblog.org - currently stale content, updates planned for after the hike and teaching again... On 7/14/2016 at 09:01:47 PDT Bob was here: https://www.google.com/#q=%2B38.564295,-122.432641 -Aprx Elev.: 1676 ft On 7/14/2016 at 09:14:44 PDT Bob was here: https://www.google.com/#q=%2B38.572575,-122.428550 -Aprx Elev.: 1645 ft On 7/14/2016 at 09:25:53 PDT Bob was here: https://www.google.com/#q=%2B38.575296,-122.433725 -Aprx Elev.: 1644 ft On 7/14/2016 at 09:36:38 PDT Bob was here: https://www.google.com/#q=%2B38.580748,-122.431888 -Aprx Elev.: 1784 ft On 7/14/2016 at 09:50:50 PDT Bob was here: https://www.google.com/#q=%2B38.582575,-122.431873 -Aprx Elev.: 1743 ft On 7/14/2016 at 10:05:25 PDT Bob was here: https://www.google.com/#q=%2B38.574358,-122.427476 -Aprx Elev.: 1564 ft On 7/14/2016 at 10:16:14 PDT Bob was here: https://www.google.com/#q=%2B38.569375,-122.423606 -Aprx Elev.: 1740 ft No visible sky, from inside my kitchen: On 7/14/2016 at 11:34:57 PDT Bob was here: https://www.google.com/#q=%2B38.539415,-122.471001 -Aprx Elev.: 593 ft
  24. Since my only 5529LP was confirmed no longer functioning properly and the likely cause is the USB hub module, there have been some thoughts going through my mind to salvage the core 5529 device on the LP for some good use. And this weekend I have decided to give it a try. As the USB host part is confirmed not functioning, the first step is to verify the F5529 is still good. The easiest way is to try program it and check if it can run new program. With a good F5529 LP (the new replacement board ordered after the old one retired), I removed all the jumpers between the ez-FET and the target device, and then wired the GND, 5V, 3V3, RXD, TXD, SBW RST, and SBW TST from the good ez-FET to the 5529 side of the old LP. This will also power up the old board from the new one as the USB host on the old board is dead and no longer powering it. Soon after an example Energia sketch of SerialCallResponseASCII is uploaded through the new, good board, the good news is displayed on the Serial console confirming the 5529 device is still working flawlessly. At this point, I came into realization that this board can no longer be a handy development board as it once was but only good for deployment, possibly permanently, to some project because I have to rely on that good LP every time for programming. But wait, I recall recently from the forum there are some posts mentioning Forth interpreter for MSP430, one of which by monsonite with comprehensive information on various Forth offerings. However, a common requirement for Forth is serial communication for the console that my old LP is no longer capable to provide with a dead USB hub. Even though I don't have serial to usb converter to bypass the on-board hub for direct serial connection, I remember there is an old Arduino Pro Mini laying around without much used. Combining these two, I could probably build a utility development board that provide ad hoc programming capability (in Forth) on the 5529LP provide the console access required by Forth on the 5529LP via the Arduino Pro Mini (forward the serial communication from the Arduino UART to the 5529LP TX/RX) power the 5529LP via the 5V and 3V3 pin from the Arduino Pro Mini All in all, the goal is to take the Arduino Pro Mini as the controller or programmer of the 5529LP that is programmed to run Forth only. I picked the Mecrisp as it provided out of the box support for the 5529LP and pre-compiled hex file. So the build begin by first flashing the Forth hex file to the 5529LP. Again it required a good 5529LP and I used the latest MSPFlasher for the job. The following is the command line (for Windows). MSP430Flasher.exe -w "forth-mecrisp-5529.hex" -v -g -z [VCC] For a more decent looking of this utility development board, the Pro Mini is mounted to a medium sized breadboard on one end, and with four metal pins (pulled from left over connectors), the 5529LP is somehow "mounted" to the other end. This is enough for some structural support for the 5529LP Now for the Arduino side. Since there is only one set of UART on the Pro Mini, the program on it make use of the SoftSerial library that will emulate another serial port by two digital pins to relay the serial messages from the real UART to the 5529LP. Finally the moment of truth, the serial console to the Arduino is opened for a test. Apart from the line feed being weird, the expression run (1 2 + .<cr>) is successful, so is the programming of the blinky program Moving forward, the Arduino can be programmed in such a way that not only merely relaying serial message, but parse special commands to initiate specific Forth programming to the 5529LP (the Forth programs themselves stored as program in the Arduino). Hopefully this will make the whole package more versatile and practical.
  25. from now UIPEthernet library (v02) are available for MSP430F5529LP too please check on stellarisiti energia forum: http://forum.43oh.com/topic/7489-energia-library-stellarpad-uipethernet-enc28j60-library/