Jump to content

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.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 72 results

  1. 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.
  2. I am using energia for my MSP430F5529LP microcontrolller when using delay(1000); in reality the delay becomes comes as 3.3 seconds. and my serial monitor was not working so i changed buad rate to 32000 and it worked as 9600*3.3= 31,680. The Microcontroller was working properly before. Is it because I used 3.1 as input , that pin is also a UCB0SOMI pin. or because i did't remove the jumper wires while using external supply. How can store the timer to original clock rate. Hope the issue is resolved
  3. Hello, I have been working with the MSP4305229 Launchpad and have been trying to work with Bluetooth. I'm using HC-06 module. Currently use energia to programmed the code. During the compiling, it produce the error code. I have been trying use others code and still produce the same error. Do you have any ideas to solve the error? Kindly seek your assistance. Thank you. Here the message of error. Energia: 1.8.7E21 (Windows 10), Board: "MSP-EXP430F5529LP" C:\Users\Harizazmi\Desktop\energia-1.8.7E21\hardware\energia\msp430\libraries\SoftwareSerial\SoftwareSerial.cpp:81:2: error: #error This version of SoftwareSerial supports only 16MHz processors C:\Users\Harizazmi\Desktop\energia-1.8.7E21\hardware\energia\msp430\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)': C:\Users\Harizazmi\Desktop\energia-1.8.7E21\hardware\energia\msp430\libraries\SoftwareSerial\SoftwareSerial.cpp:251:31: error: 'table' was not declared in this scope C:\Users\Harizazmi\Desktop\energia-1.8.7E21\hardware\energia\msp430\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'virtual size_t SoftwareSerial::write(uint8_t)': C:\Users\Harizazmi\Desktop\energia-1.8.7E21\hardware\energia\msp430\libraries\SoftwareSerial\SoftwareSerial.cpp:319:26: error: 'XMIT_START_ADJUSTMENT' was not declared in this scope exit status 1 Error compiling for board MSP-EXP430F5529LP. This is the coding. // define TROUBLESHOOT #include <SoftwareSerial.h> SoftwareSerial bluetooth(P3_4, P3_3); // RX, TX int i; int j; int min; int max; float rms; float totalF; float a0; float a1; float b1; float a2; float b2; float a3; float b3; float a4; float b4; float a5; float b5; float a6; float b6; float rmsac; float h1; float h2; float h3; float h4; float h5; float h6; float thd; float total; float multiply=1.459; uint16_t adc[180]; float timer; char data=0; void setup() { Serial.begin (9600); bluetooth.begin(9600); //bluetooth } void loop() { i=0; timer=millis(); while(millis()-timer < 20) //Get sample ADC in 20ms { adc=analogRead(A0); i++; } j=0; min=1023; max=0; total=0; #if defined (TROUBLESHOOT) Serial.println(i); #endif for(j=0;j<i;j++) { #if defined (TROUBLESHOOT) Serial.println(adc[j]); #endif if(adc[j]>max) max=adc[j]; if(adc[j]<min) min=adc[j]; total+=adc[j]*adc[j]; } total=total/i; rms=sqrt(total); total=0; for(j=0;j<i;j++) { total+=adc[j]; } a0=(float)total/i; totalF=0; for(j=0;j<i;j++) { totalF+=adc[j]*cos(2*PI*j/i); } a1=(float)2*totalF/i; totalF=0; for(j=0;j<i;j++) { totalF+=adc[j]*sin(2*PI*j/i); } b1=(float)2*totalF/i; totalF=0; for(j=0;j<i;j++) { totalF+=adc[j]*cos(2*2*PI*j/i); } a2=(float)2*totalF/i; totalF=0; for(j=0;j<i;j++) { totalF+=adc[j]*sin(2*2*PI*j/i); } b2=(float)2*totalF/i; totalF=0; for(j=0;j<i;j++) { totalF+=adc[j]*cos(2*3*PI*j/i); } a3=(float)2*totalF/i; totalF=0; for(j=0;j<i;j++) { totalF+=adc[j]*sin(2*3*PI*j/i); } b3=(float)2*totalF/i; totalF=0; for(j=0;j<i;j++) { totalF+=adc[j]*cos(2*4*PI*j/i); } a4=(float)2*totalF/i; totalF=0; for(j=0;j<i;j++) { totalF+=adc[j]*sin(2*4*PI*j/i); } b4=(float)2*totalF/i; totalF=0; for(j=0;j<i;j++) { totalF+=adc[j]*cos(2*5*PI*j/i); } a5=(float)2*totalF/i; totalF=0; for(j=0;j<i;j++) { totalF+=adc[j]*sin(2*5*PI*j/i); } b5=(float)2*totalF/i; totalF=0; for(j=0;j<i;j++) { totalF+=adc[j]*cos(2*6*PI*j/i); } a6=(float)2*totalF/i; totalF=0; for(j=0;j<i;j++) { totalF+=adc[j]*sin(2*6*PI*j/i); } b6=(float)2*totalF/i; rmsac=sqrt(rms*rms-a0*a0); h1=sqrt((a1*a1+b1*b1)/2); h2=sqrt((a2*a2+b2*b2)/2); h3=sqrt((a3*a3+b3*b3)/2); h4=sqrt((a4*a4+b4*b4)/2); h5=sqrt((a5*a5+b5*b5)/2); h6=sqrt((a6*a6+b6*b6)/2); thd=100*sqrt(rmsac*rmsac-h1*h1)/h1; #if defined (TROUBLESHOOT) Serial.println("MIN="+String(min)); Serial.println("MAX="+String(max)); Serial.println("RMS="+String(rms)); Serial.println("A0="+String(a0)); Serial.println("A1="+String(a1)); Serial.println("B1="+String(b1)); Serial.println("A2="+String(a2)); Serial.println("B2="+String(b2)); Serial.println("A3="+String(a3)); Serial.println("B3="+String(b3)); Serial.println("A4="+String(a4)); Serial.println("B4="+String(b4)); Serial.println("A5="+String(a5)); Serial.println("B5="+String(b5)); Serial.println("A6="+String(a6)); Serial.println("B6="+String(b6)); Serial.println("H1="+String(h1)); Serial.println("H2="+String(h2)); Serial.println("H3="+String(h3)); Serial.println("H4="+String(h4)); Serial.println("H5="+String(h5)); Serial.println("H6="+String(h6)); Serial.println(); #else Serial.print("RMS:"+String(multiply*rmsac)+","); Serial.print("H1:"+String(multiply*h1)+","); Serial.print("H2:"+String(multiply*h2)+","); Serial.print("H3:"+String(multiply*h3)+","); Serial.print("H4:"+String(multiply*h4)+","); Serial.print("H5:"+String(multiply*h5)+","); Serial.print("H6:"+String(multiply*h6)+","); Serial.print("THD:"+String(thd)+";"); Serial.println(); if(data=='C') { bluetooth.print("RMS:"+String(multiply*rmsac)+"A"); bluetooth.print("THD:"+String(thd)+"B"); bluetooth.print("H1:"+String(multiply*h1)+"C"); bluetooth.print("H2:"+String(multiply*h2)+"E"); bluetooth.print("H3:"+String(multiply*h3)+"F"); bluetooth.print("H4:"+String(multiply*h4)+"G"); bluetooth.print("H5:"+String(multiply*h5)+"I"); bluetooth.print("H6:"+String(multiply*h6)+"J"); } #endif if(bluetooth.available()) { data=bluetooth.read(); } delay (1000); }
  4. I used MSP430F5529 lunch pad in my project and developed program in Energia but I can’t access some pins in map430f5529 through Energia and I’ve already developed program with Energia and made one PCB prototype now I am having problem to access some pins . I tried to modify variant in pin map by just adding those pin to the text file in the same way of other pins but it didn’t work, if someone can help me and tell me step by step how to add more pins
  5. I would like to trigger the sampling from a timer, but somehow cannot find the required information about the ADC12SHS bits in the ADC12CTL1 register. The family manual tells me to look in the specific device datasheet for that information, but I can't find it there (the MSP430F5529 datasheet). Also looked into the mspware C examples, but none uses timer triggered A/D. Where should I look for that info (which timers can be used, and how to set ADC12SHS bits to use them)?
  6. What I'm trying to do: We have been developing a project for school on a MSP430F5529 LaunchPad. We now want to move our project to a custom PCB for the final part. My partner has been using the UCB0 SPI module available through the LaunchPad to communicate to a sensor while I have been separately (as in a completely different sketch) using the same module to run the CC3100MODBOOST Boosterpack. Because no one on my team has much programming experience, we are using Energia to develop the project. We first tried to start with CCS, but we were in way over our heads. Now that we have our different subsystems working, we are using an evaluation board to test out our circuit before going to a PCB. In order to run the SPI module and the sensor at the same time, I want to move the SPI communication with the CC3100 to the UCA1 SPI module. I think I figured out to set up and access all of the pins through pins_energia.h. I created a new board for our setup and added it to Energia. I used some LEDs to check that I could access GPIO pins that weren't accessible on the LaunchPad, and they would all light up when I wanted them to. (I used the digitalWrite() function to check that I actually set up the pins_energia.h file correctly. I didn't directly send the pins high with "P1DIR |= BIT0; P1OUT |= BIT0;" style assignments.) My next step was to switch communication with the CC3100 from UCB0 to UCA1 so my partner could keep using UCB0 for communication with his sensor. This is where I got really lost. I know that the code I have is using the SPI library included with Energia, but I don't know how to modify to do what I want it to do. So my main question ultimately is: "How do I get the Energia sketch to use UCA1 instead of the default UCB0 SPI module for communication with the CC3100?" Secondary to that, I am hesitant to change the installed libraries for Energia. Is there a way that I can reference copies of those libraries where my changes will be made? What I've tried: Looking through the code, I think that for the F5529, Energia is using the functions defined in utility/usci_spi.cpp. For this file at least, it seems to be hardcoded that the MSP will use UCB0. I tried to go through the file and replace every instance of "UCB0" with "UCA1", but that didn't work. I've also tried to look through some other posts about using alternate SPI ports on the F5529, but either I couldn't understand them or they didn't have solutions posted. Hardware: LaunchPad - MSP-EXP439F5529LP Rev 1.6 MCU - MSP430F5529IPN Evaluation board - MSP-TSP430PN80USB Boosterpack - CC3100MODBOOST Rev 1.0 Software IDE - energia-1.8.7E21 OS - Windows 10 Pro Other 43oh posts I've looked at (or at least the most relevant ones): https://forum.43oh.com/topic/5844-f5529-using-alternate-spi-and-i2c-interfaces/ https://forum.43oh.com/topic/5174-getting-i2c1-ie-usci_b1-to-work-on-f5529-launchpad/ Thank you so much for y'alls help with this. I've been trying for a while now to get this on my own, but I keep hitting a wall. This is my first post here, so please let me know if I need to provide any additional info or if there was a different way I should have posed this question. Thank you! Edit: typos/grammar
  7. Good Afternoon, I am using the launchpad MSP430F5529 + Boosterpack CC3100 and the software Energia version 1.6.10E18 with the OS - Windows 10. I am having problem with the update. I must update multiple time for work my serial print. I would like to know the reason for the problem. I am using in a code a lot complex but when I use in a code more simple like a "Blink" I have the same problem. I already look the "device manager" of my PC like the figure that I attachment("COM12") and already try used both selection of debugger (dslite - or mspdebug) and the problem keeps. I am use this simple blick bellow for test and I have the same problem. I would like a answer please.
  8. Hemavathi

    Mouse

    I am trying to design 3D Space mouse with functions such as tilt,pan,zoom with msp430f5529 and accelerometer What accelerometer would be better to use ??
  9. I am unable to reconnect to my WPA wifi access point after disconnecting. Using the code posted in the link: Problem in Reconnecting with CC3200 I was able to successfully run the code with a Launchpad CC3200 device I was NOT able to run the code with a Launchpad MSP430F5529 and CC3100 Boosterpack When I use this setup, I connect the first time, disconnect, and fail to reconnect. My serial screen outputs the following: Attempting to connect to Network named: MXET .......................................... You're connected to the network Waiting for an ip address ............... IP Address obtained SSID: MXET IP Address: 192.168.137.93 signal strength (RSSI):-58 dBm Waiting... 9999 Waiting... 8997 Waiting... 7997 Waiting... 6996 Waiting... 5996 Waiting... 4995 Waiting... 3994 Waiting... 2994 Waiting... 1993 Waiting... 992 Disconnecting from WiFi....Disconnected Waiting... 9426 Waiting... 8424 Waiting... 7424 Waiting... 6423 Waiting... 5422 Waiting... 4422 Waiting... 3421 Waiting... 2421 Waiting... 1420 Waiting... 419 Attempting to connect to Network named: MXET ............................................................ reconnectWiFi.ino
  10. As an electrical engineering student at John Brown University, we were tasked with creating a useful product or service using the combined skills gained through our embedded systems class. As someone who likes interior decorating and hates mismatched paint, I came up with the idea to make an RGB color sensor attachment for a camera. Of course converting RGB data to paint colors is not conventional, it is something that could potentially be viable. To make things interesting and for the experience of working with a Raspberry Pi, I used a raspberry Pi camera to act as the base for the project. A KMASHI 10,000mAh power bank was used as the power source to make it portable and act as a psuedo case to strap all of the components together. It is definitely not elegant in any way, shape, or form, but it is more experience for me and hopefully you can find an interesting tid bit here or there in my documentation! Enjoy! RGBColorSensorAttatchmentRPI.docx
  11. This is a fun project that was created for my embedded systems class at John Brown University that allows you to create your own quiz wizard similar to the jeopardy game show system. The main portion of this code is run on an MSP430F5529 launchpad, and nRF24L01 transceiver modules were used to obtain the wireless functionality. It makes use of the Enrf24.h library to operate the transceiver modules, and the user interface is output to the serial monitor of the energia IDE. Four buttons wired into the MSP430F5529 then allow the user to interact with the system. The wireless module was created by using an MSP430G2553 launchpad, button, and LED for indicating power on. The LCD display can be integrated although an Arduino MEGA is needed to have it be fully functional with the rest of the system, so the code for this portion of the project was not uploaded. Enrf24_RXdemo.ino Enrf24_TXdemo.ino Rough Circuit Schematic.pdf
  12. Hi, I'm trying out some UART communication proyects on an MSP430F5529. My question is, what number should I put instead of the x in UCAxCTL0? And where could I find this information next time (already tried the User Guide)? Thanks.
  13. Hello, Pardon for my direct approach. I saw an example in Energia forum on Problem Sampling Rate MSP430F5529 May I know what is readADC();? Because you do not create any void called readADC(); on your sample code. For right now I am trying implement it on MSP430F6989LP, which also has 12bit ADC. Would you kind share with me? I appreciate your help. Thank you very much. Best Regards, Lukman your example code is as below: #if defined(__MSP430_HAS_ADC12_PLUS__) #define REFV_MAP(x) ((x>>8) & 0x70) #define REF_MAP(x) (x & 0xB1) #define ADCxMEM0 ADC12MEM0 #define DEFAULT_READ_RESOLUTION 12 #endif #if defined(__MSP430_HAS_ADC12_PLUS__) #define DEFAULT (ADC12SREF_0 << 8) #define INTERNAL1V5 ((ADC12SREF_1 << 8) | REFON | REFMSTR | REFVSEL_0) #define INTERNAL2V0 ((ADC12SREF_1 << 8) | REFON | REFMSTR | REFVSEL_1) #define INTERNAL2V5 ((ADC12SREF_1 << 8) | REFON | REFMSTR | REFVSEL_2) #define EXTERNAL (ADC12SREF_2 << 8)#endifuint16_t analog_reference = DEFAULT; #define NUM_READS 10000 void setup() { Serial.begin(115200); Serial.println("Setup done"); setupADC(A0); } uint32_t mark, time_it_took; uint16_t i; void loop() { // Serial.println(readADC()); mark = millis(); for(i = 0; i < NUM_READS; i++) { readADC(); } Serial.print("Time: "); Serial.println(millis() - mark); Serial.println(readADC()); } uint16_t setupADC(uint8_t pin) { uint8_t channel; // Check if pin is a special analog pin (A10 = temp sensor, A11 = Vcc/2, etc.) if (pin >= 128) channel = pin - 128; else channel = digitalPinToADCIn(pin); // Check if pin is valid if (pin == NOT_ON_ADC) return 0; #if defined(__MSP430_HAS_ADC12_PLUS__) ADC12CTL0 &= ~ADC12ENC; // disable ADC ADC12CTL1 = ADC12SSEL_2 | ADC12DIV_0; // ADC12OSC as ADC12CLK (~5MHz) / 5 while (REFCTL0 & REFGENBUSY); // If ref generator busy, WAIT if (pin == TEMPSENSOR) {// if Temp Sensor REFCTL0 = REF_MAP(INTERNAL1V5); // Set reference to internal 1.5V ADC12MCTL0 = channel | REFV_MAP(INTERNAL1V5); // set channel and reference } else { REFCTL0 = REF_MAP(analog_reference); // Set reference using masking off the SREF bits. See Energia.h. ADC12MCTL0 = channel | REFV_MAP(analog_reference); // set channel and reference } ADC12CTL0 = ADC12ON | ADC12SHT0_4; // turn ADC ON; sample + hold @ 64
  14. Hi, Little question : is SPI1 available on F5529 ? It's mentionned on pinmapping http://energia.nu/Guide_MSP430F5529LaunchPad.html but when I try to use it, no signal is generated, and when I look in librairies and core, I don't find where it's configurated (setModule() is only for EUSCI peripheral). Regards
  15. I am working with the MSP430F5529 Launchpad w/the Pervasive Display Gen2 EXT2 board and various eInk displays (BW, BWR). There seems to be a wide array of official(?) and unofficial SDKs, FW dev kits, boosterpacks, etc. available with varying degrees of compatibility with this particular LaunchPad. I am looking for some basic pointers on creating a simple GUI tool for sending images to the display. I can compile the latest 1.21 FW (via CCS using PDI Apps as target), flash the FW and run the (precompiled) PDI Apps Ver 1.21.exe GUI tool to send images to display, however it seems there is no source code for this GUI tool provided(?). Or, am I just not looking in the right place? Is there a project and/or document that explains/demonstrates creating a simple GUI or command line to interface with the hardware (for example making calls to the PDI_apps_drivers command handlers) to send an image to the display. So far I have found two projects which seem to have potential for good starting point(?): CCS IDE and EPD Extension Board Gen2 (EXT2)_v1.21 using the PDI Apps target _preferable_ (or the MSP430F5529 specific example target). Energia IDE (or Visual Micro MSVS plugin) and EPD_Demo.ino with the Pervasive_EPD_BoosterPack2 (I'd prefer to use C++, but not completely opposed to python if necessary as starting point.) Thanks for any pointers in the right direction.
  16. 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
  17. I have a program that used to compile correctly under the Energia IDE, but it now gives the error: failed MSpanList_Insert 0x30d000 0x504f9a602be9 0x0 fatal error: MSpanList_Insert I'm running Energia 1.6.10E18 on Mac OS High Sierra 10.13.3, with version 1.0.3 of the Energia MSP430 boards. Any suggestions?
  18. Hello, I wrote a code for calculating VCO frequency and divider values for a PLL from the given output frequencies. For now I am printing the values in the console to debug my code and it is working properly. But now I want to move the values from stack to registers available in MSP430f5529. In the image below you can see that freq_VCO value is stored in stack memory location 0x04382. How do I move this value in one of the registers? Pleas help!
  19. I'm trying to interface sd card module to msp430f5529 using Energia. I tried these methods https://43oh.com/2013/12/interfacing-the-launchpad-to-an-sd-card-a-walkthrough/ and download sd library from GitHub. both are giving errors. can anyone help me out with this errors?
  20. Hello everyone, I'm working on a project which is based on the MSP430F5529 MCU. As the progrom is growing up in size, i tried to upload it to the MCU but suddenly i got an error message that the .txt memory area overflowed by 64 bytes. I've searched for this problem and tried to modify the Memory file with no good results. Any help is welcome and thank you in advance.
  21. I'm using the FRC Gamepad Tool to load the TI-supplied firmware for a USD HID joystick with a KMA210 magnetic angle sensor. I have a voltage divider taking the KMA210's 5V max output to 3.3V, and when plugging in the MSP and checking the windows game controllers, an axis does respond when I turn a magnet near the sensor, but the reading is all over the place. Bouncing back and forth by 40% of the whole angle range. I've tried using an external 5V supply, tried changing the sampling on the ADC, the Vref, the clock multiplier, the wires, the input pin, just about everything. Does anyone have any advice?
  22. Hi, I was working on interfacing my MSP430 with a 4x4 keypad and I stumbled upon this application report. Then I looked into the specific low power modes of the F5529 and noticed that there was a LPM4.5. The application report uses LPM4 as it isn't the same device, and I was wondering if it was possible to use LPM4.5 as the device was waiting for keypad input as my goal is to minimize power usage.
  23. Hi I am a newbie to MSP430 have coded on AVR and Arduino and trying out MSP for thr first time. Currently working on a project involving keypad, LCD, Ethernet. I have managed to find libraries of keypad and LCD and they seems to be working. But there is very few resources of ethernet and could not find anything. i have seen a post regarding W5200 but i unable to understand it, also RobG booster pack and library for W550 is great but i dont have the module and is out of stock. If anybody have any links on how to create the library for a newbie would be great and if they have a library for lets say Web client it would be awesome Thanks
  24. Hi I am a newbie to MSP430 have coded on AVR and Arduino and trying out MSP for thr first time. Currently working on a project involving keypad, LCD, Ethernet. I have managed to find libraries of keypad and LCD and they seems to be working. But there is very few resources of ethernet and could not find anything. i have seen a post regarding W5200 but i unable to understand it, also RobG booster pack and library for W550 is great but i dont have the module and is out of stock. If anybody have any links on how to create the library for a newbie would be great and if they have a library for lets say Web client it would be awesome Thanks
  25. Hello, I am looking for an enclosure for a Launchpad MSP430F5529 with a AAA batteries pack. Someone know about a distributor which sell some? Thanks
×
×
  • Create New...