Search the Community

Showing results for tags 'MSP430G2553'.



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

  • Community Calendar

Found 106 results

  1. Seems to me that I2C is a fairly commonly used way to communicate between MSP430G2553 and various sensors. However, I cannot seem to find a standard library that implements it. There are many home spun implementations and there doesn't seem to be a standard I2C Library. I'm VERY NEW to the embedded development world, but have been a windows programmer for 20 years. I'm used to having standard reusable libraries that do the grunt work for me so I don't have to re-invent something that has been done by others 100 times already... Am I just missing something or are all embedded developers just masochists?? Surely not.. So, does anybody know where I can find a simple I2C library that works with my MSP430G2553 in Code Composer Studio 7? Any reason why it isn't just built in? Or is it? This is a huge paradigm shift for me, so please be patient. Any help would be appreciated.
  2. Overview dAISy (do AIS yourself) is a very simple AIS receiver that I developed from scratch. It is built around the Silicon Labs EZRadioPRO Si4362 receiver, using a Texas Instruments MSP430G2553 MCU for processing and the MSP-EXP430G2 v1.5 LaunchPad as development platform. The complete project source code and schematics are available on GitHub: https://github.com/astuder/dAISy Update 5/18/2015: A finished, self-contained AIS receiver based on this project is now available for purchase on Tindie. AIS, short for Automatic Identification System, is a standard for tracking ships. Ships advertise their position, course and other information with short transmissions on specific frequencies (161.975 MHz and 162.025 MHz). More on Wikipedia. An AIS receiver, like dAISy, receives and decodes AIS transmissions. It then re-packages the raw data into NMEA sentences (specifically formatted ASCII strings). Finally, using a serial connection, these strings are forwarded to more capable equipment for further processing. If you're the lucky owner of a tricked out boat, you could connect dAISy to your navigation computer. For land lobbers like me, a more common use case is to run naval mapping software that supports AIS data input on a PC. In the screenshot below I've connected dAISy to OpenCPN (link), an open source chart plotter and navigation software. On the top right you can see my setup war-driving at the Seattle waterfront as my lab is too far from the coast to receive anything. The LaunchPad sits on the dashboard with a white USB cable connecting to the notebook computer in the foreground. dAISy's data is fed into OpenCPN, bottom right shows a log of the serial data received. OpenCPN maintains a database of all the collected data (lower left) and visualizes nearby ships on a map (top center), including past and projected course. Hovering the mouse over a ship will display its name (text on yellow ground) and clicking it will reveal more detail (top left). Hardware I wanted to build my own, non-SDR, AIS receiver for a long time. There are a few projects floating around the internet (e.g. here) which refer back to an article by Peter Baston, published 2008 in Circuit Cellar magazine (copy available here gone.. google for Peter Baston Circuit Cellar to find other copies). Unfortunately, the CMX family of modem ICs by CMS Microcircuits (link) used in these projects are relatively expensive ($15+) and hard to find for hobbyists. In addition you'd need a radio to do tune into and down-convert from the ~162 MHz carrier frequency. So I was quite excited when earlier this year a parametric search on Mouser brought up a new IC that covered the required range (162 MHz) and modulation (GMSK). And best of all, available in single quantities for $3.56 $2.27 $2.22! (link) The Silicon Labs EzRadioPRO Si4362 (link) is a single chip receiver that covers frequencies from 142 to 1050 MHz and supports various modulations, including GMSK. It comes in a tiny 20-pin QFN package and the only external parts required are a 30 MHz crystal, an antenna with a few capacitors and inductors for impedance matching, and finally some decoupling caps and pull-down resistors. Time to whip up a breakout board. I used the opportunity to give KiCad a try and quite like it. Here's the schematic: And the layout: I used OSHPark to make the PCBs. At a smidgen over one square inch it cost $5.15 for 3 copies: http://oshpark.com/shared_projects/QUWi71r4 Note that the layout still has three issues that I already fixed in the schematic: GPIO0 and GPIO1 were flipped SDO required a pull-down resistor as the radio leaves it floating when not actively sending, which confused the hell out of me while trying to figure out the communication protocol. Lastly, the holes for the headers turned out to be slightly too small to comfortably fit the cheap breakout headers I had at hand. Edit: Here's Rev B where I fixed these issues: http://oshpark.com/shared_projects/WI6u3Qmk Which brings us to the BOM: Silicon Labs Si4362 (U1) 30 MHz crystal (X1)Si4362 datasheet specifies <11 pF load capacitance, but a crystal specified for 12pF load capacitance seems to work fine too Antenna/LNA matching network, calculated based on SiLabs AN643 (link, approx. values, +/- 5% shouldn't matter too much):75 ohm (dipole): 10 pF (CR1), 5 pF (CR2), 280 nH (LR1), 200 nH (LR2) 50 ohm: 12 pF (CR1), 6 pF (CR2), 240 nH (LR1), 160 nH (LR2) Decoupling caps:100 pF, 100 nF, 1uF (C1, C2, C3) Pull-down resistors100 k (R1, R2) First thing I noticed when I received the parts: The 20-pin QFN at 4x4 millimeters is tiny! I mounted it by first tinning the pads with a small quantity of solder. I then added flux and placed the chip on the pad. I then used a hot air station to carefully reflow the solder. Worked the first time around. After using jumper wires to figure out how to talk to the chip, I mounted the breakout board on a makeshift BoosterPack using perfboard, double-sided tape and wire (see picture at the top of the post). Here's how I ended up connecting the breakout board to the LaunchPad / MSP430G2553: SEL -> P1.4 (SPI chip select) SCLK -> P1.5 (SPI CLK) SDO -> P1.6 (SPI MISO) SDI -> P1.7 (SPI MOSI) GPIO0 -> P2.0 (I/O unused) GPIO1 -> P2.1 (I/O clear-to-send) GPIO2 -> P2.2 (I/O RX clock) GPIO3 -> P2.3 (I/O RX data) SDN -> P2.4 (shutdown / reset) IRQ -> P2.5 (I/O channel-clear) Software The software of dAISy consists of three major blocks: Radio configuration and control over SPI Packet handler, including a basic FIFO for received messages NMEA encoding and transmission to the PC over UART For UART (TX only) and SPI (TX/RX) I use the MSP430G2553's USCI A0 and B0 respectively. In both cases I don't use interrupts which simplifies things considerably. Upon reset the following steps happen: Initialize MSP430 peripherals Initialize packet handler, which will also reset FIFO Initialize and configure of radio, which will also setup SPI Start packet handler, which will also put the radio into receive mode And in the main loop: If debug messages are enabled, poll packet handler for status and errors and report them over UART Check FIFO for new packets If there is a new packet, invoke NMEA processing (which sends the message over serial to the PC) and remove packet from FIFO Below follows a more detailed discussion of the radio integration and the implementation of the packet handler. Radio The communication with the radio is vanilla SPI using 4 wires: MOSI (SDI), MISO (SDO), CLK (SCLK) and CS (SEL). I used the MSP430's USCI B0 to implement SPI and a separate pin to control CS. The only tricky thing to figure out was, that the Si4362 keeps the MISO line floating unless it actively transmits data. This is unfortunate as the master is supposed to poll for a specific response (FF) to detect when the radio is ready to receive more commands. This is easily fixed by adding a weak pull down resistor to SDO. I did this on the board, but it probably also works with using MSP430's internal pull-down. Additional lines I used to control the radio are: SDN to reset the radio CTS, which by default is mapped to the radio's GPIO1, indicating that the radio is ready for the next command While taking up an extra pin, CTS turned out to be much more convenient than the SPI response code to properly time communication flow with the radio. In dAISy, I wait for CTS to go high after each command to ensure the radio completed its task. The communication protocol is quite extensive but well documented: EZRadioPRO API Documentation describes the complete API and all registers AN633 Programming Guide for EZRadioPro Si4x6x Devices describes how to use the API in common scenarios Both are available on the Si4362 product page (link), under Documentation > Application Notes and are still updated quite frequently. The radio is set up by dumping a large configuration sequence into it. This includes configuration of radio frequency, modulation, GPIO pins and more. This information is stored in radio_config.h, which has to be generated with a tool called WDS (Wireless Development Suite). WDS is available in the Tools section on the Si4362 product site. Above are the settings I used for dAISy. WDS will use this information to configure various amplifiers, filters, clocks and decoding algorithms inside the chip. As Si4362 supports GMSK encoding only indirectly (see this thread), I'm certain there's more optimization potential by tweaking registers, but that's currently way beyond my knowledge of RF theory. While the Si4362 comes with its own packet handler, it unfortunately does not support NRZI encoding (Wikipedia). So I set up the radio to expose the 9600 baud clock and received data on separate pins and implemented my own packet handler. Packet Handler The packet handler (inspired by Peter Baston's implementation) is implemented as a state machine that is invoked on each rising edge of pin P2.2 which receives the data clock. There are 5 main states: Off, no processing of incoming data Reset, start from anew, either on start up or after successful/failed processing of a packet Wait for Sync, waiting for a training sequence to arrive (010101..) and start flag (01111110), implemented with its own state machine Reset, start new preamble 0, last bit was a zero 1, last bit was a one flag, training sequence complete, now process start flag Prefetch, ingest the next 8 message bits to ease further processing Receive Packet, process bits until the end flag (01111110) is found or an error situation occurs Independent of state, the interrupt routine continually decodes NRZI into actual bit sequence. In the "Receive Packet" state there's continuous calculation of the packet CRC and some bit-de-stuffing. When the end flag is found and the CRC is correct, the received message is committed into the FIFO. If an error is encountered, the bytes already written to the FIFO are discarded. In both cases, the state machine starts anew by transitioning into RESET. This reads like a lot of code for an interrupt handler. However with the MCU running at 16MHz even the most complex state only uses a fraction (<10%) of the available time. Future Improvements Lastly a list of things I'd like to improve with the next version of dAISy. Software: Receiving on both AIS channels through channel-hopping done 1/5/2014 Tweak radio settings for better sensitivity and lower error rate LED(s) for indicating reception of valid/corrupt packets Hardware: Proper antenna connector Layout PCB as BoosterPack and/or USB dongle Receiving on both AIS channels at once with two radio ICs -- edit 12/25: replaced original post with high-level project description, more detailed documentation of implementation to come -- edit 12/28: added documentation for hardware (here and on Github), fixed some typos -- edit 12/31: added documentation for software and list of future improvements -- edit 01/05: implemented channel hopping (change to state machine) -- edit 01/15: changed state machine to reflect recent changes (see post further down for details), added link to shared project on OSHPark -- edit 01/25: major rework of sync detection state machine
  3. Hi, Is there a ready library for PID control available for MSP430F5438A or G2553 controllers. Please help if an example is available for the same. Thanks, Tanmay
  4. Good Morning, This may be the wrong place to ask this question. If so, please let me know where to ask it.. I've been a Windows programmer for 20 years. I've pretty much stuck to User Interface development the whole time. I have been using .net and C# for the past 10 years so I am VERY SPOILED when it comes to letting the language do the grunt work and I finesse the code. I now find myself working on a personal project which requires me to program the MSP430G2553 controller. I started out by using Energia (which if you don't know, is a fork off of Arduino) The advantage of it is you can do a lot with very little code and without needing to know all the guts of the MSP430G2553. The disadvantages are that sometimes it doesn't work right. Sometimes it doesn't give you the control you need, sometimes it's hard to figure out if Energia isn't working, or if your code isn't working... Anyway, I've spent hundreds of hours getting parts of my program to work. I have been trying to get away with not having to learn how to write firmware and have to deal directly with the processor. However, I'm starting to think that I need to bite the bullet and take the time to overcome my learning curve and dive in headfirst to firmware development and the paradigm shift that comes with it. The program I am using needs to have control over changing into and out of the various Low Power Modes on the MSP430. I need to listen for interrupts. I need to use I2C to communicate with various devices that are connected to the MSP430. I need to monitor Power Level/Consumption from time to time. So, basically, I have the following questions: 1. Can Energia robustly and without errors do the above things? 2. Am I wasting my time getting all of the above accomplished using Energia? 3. Should I be using Code Composer Studio? 4. Having NEVER developed ANY controller level code outside of Arduino and Energia, what kind of Learning Curve am I looking at to accomplish the above things? 5. Where is the best place to start learning this? 6. Where is the best place to look for answers to MSP430 development questions? Thank you all in advance for any assistance and advice you might have.
  5. I'm writing my own i2c library and need to be able to simultaneously change PinMode on 2 pins. One for SCL and one for SDA. Is there a way to change PinMode on 2 pins simultaneously? I want the behavior of the follwing: PinMode(14,OUTPUT); PinMode(15,INPUT); without the 2.5microsecond delay between the 2 calls above.
  6. After making the wearable MSP430 for Halloween this year I was requested to make more for a children's dance group. I have a question, but first some background. This is the latest version: Everything works fine. I use an adapter with pogo pins to program it as shown in the photo. There are three LEDs on the PCB, a push button switch for the user, and more accessible pins than the previous version. Parts are TSSOP and 0805 SMD. Snap fasteners and stainless thread can be used to connect it to LEDs on the costume. A CR2032 coin cell is used to power it (coin cell holder is on the backside of the PCB). So far that has been sufficient and the light weight and inconspicuous nature has been advantageous for the small children it is intended for. Now a new upgrade has been requested... add a radio so that multiple units can be synched and/or controlled offstage. Here is a rough list of requirements: must be inexpensive - current materials for 10 units is less than $5. I want to keep it under $10. keep SMD parts large enough to be hand soldered keep using CR2032 (rated 3V and 225 mAH) The MSP430G2553 and LEDs are currently using no more than 20 mA on average - to be safe assume 40 mA Unit needs to run at least half an hour on fresh batteries Unit needs reliable radio reception at 10m with clear line of sight Unit will need to receive only - no transmission. Reception updates required close to continuously - say every 100 ms keep PCB to the same size - 40mm/1.6" diameter needs to be programmable in Energia I have a fair amount of time - 6 months to get it working I have looked at several different radios but the two that I have experience with are the nRF24L01 and CC2650. I am ruling out the CC2650 due to cost. There is a small version of the nRF24L01 that is shown below for scale along with the more commonly seen version: I think I can shift things around and make this fit. Connection is by the castellated edge facing forward on the photograph. The datasheet states 13.5 mA RX at 2Mbps air data rate. That is in the range of what I have seen as well so it looks like it would meet the requirements. Here are my questions: 1) Is there another radio I should be looking at? Maybe one made by Hope. 2) I have no design experience with radios but could I use an off the shelf design and put the radio, bits, and PCB trace antenna on the PCB myself? I would probably have to give on the 0805 parts size criteria. 3) Any other thoughts, comments, and suggestions appreciated. This will be an open source design and anyone who wants to contribute or have the design is welcome EDIT: the material cost is on a per unit basis
  7. 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.
  8. So, I've read the threads and have made things work once, but now, without seeming to have changed anything, I'm getting code that goes into never-never land.. In twi.c, around line 607 in Energia version 17, I get a lockup in the first while statement: #if defined(__MSP430_HAS_USCI__) || defined(__MSP430_HAS_USCI_B0__) || defined(__MSP430_HAS_USCI_B1__) /* Ensure stop/start condition got sent before we exit. */ if(sendStop) { while (UCBxCTL1 & UCTXSTP); // end with stop condition } else { while (UCBxCTL1 & UCTXSTT); // end with (re)start condition } #endif I've been trying different recommended suggestions all over the place and had it working about 60 minutes ago, but then I tried and moved some code around and now I can't get it to work anymore... I put all the code back the way it was, and NADA... still not working... Is it just a time of day thing or am I the only one who can't seem to have any consistency in the I2C behavior...? By the way, I'm using an MSP430G2553 chip with 32 pins in the QFN configuration. I really did have this working an hour ago and cannot for the life of me figure out why it stopped working. Any hints would be GREAT.. By the way, the reason I'm not using Energia Version 18 is because it isn't supported in Code Composer Studio yet.. Anybody know when that support will appear? Thanks for any help you might have to offer, Curtis Please see my Pins_energia.h file below: /* ************************************************************************ * pins_energia.h * * Energia core files for MSP430 * Copyright
  9. ?Hello, I am trying to upload a "Blink" program to my MSP-EXP430G2. I have no problems uploading code successfully through Code Composer Studio. But if I try to update the same code through Energia, it won't work. The error message is: usbutil: unable to find a device matching 0451:f432 An error occurred while uploading the sketch I have checked that the port number and board are correctly selected. Could anyone offer any help troubleshooting this? I want to use Energia over CCS, mainly so I can quickly and easily get a read-out of the serial port. But if anyone knows of an easy-to-setup way to read the serial port, then I could always just upload code via CCS and be done with it! Many thanks in advance for any help offered. Eddie
  10. Ok, so I've changed over to an MSP430G2553IRHB32R Controller. This is in the QFN 32 pin package. According to it, P1.6 is for SCL I2C and P1.7 is for SDA I2C. On the 20 pin board, they are pins 14 and 15. On the 28 pin board they are pins 22 and 23. On the 32 pin board they are pins 21 and 22. So, I'm trying to use the simple I2C Scanner and get nothing. I have 2 I2C devices attached, but cannot see either of them. There have been many posts about inserting a Wire.write(1); command and copying updated files into the system. I'm using the latest Energia 18 on a Windows 10 machine. I'm using LaunchPad 430 to program my custom board which has the MSP430G2553IRHB32R controller on it. Seems like any time I attempt to use a different board, I have problems with the Wire library. It seems to hang up during the endTransmission call. I've tried 'SetModule(0)' and that doesn't work either. I've checked the Pins_Energia.h file to make sure the pins were correct. So, all that being said, Should I keep up the battle with Wire.h, use a different I2C library, or just write my own I2C library? As I work with firmware more and more, I have a growing respect for those of you who live in that world. You guys are amazing !!! I appreciate any help you are able to offer to get the I2C working on my custom board. Thanks, Curtis
  11. Edit 09.12.2016: I added Arial_16x24.h and Arial_24x40 (really a 24x36, but I had to keep a multiple of 8), digits only, created with GLCD Font Creator (I had to edit the result slightly manually). See images below. So I can confirm that adding any further fonts created with GLCD Font Creator works (I run it on Linux on wine BTW) and is only limited by how much fits into the SSD1306_OLED_5x8_11x16_16x24_24x36_fonts.zip
  12. MSP430 based Nixie tube clock. I was looking for some nice Nixie tube digit images so I could add them to my EduKit library, but I couldn't find any usable ones. I decided to just buy few of them and photograph myself. Then I thought that it would be a horrible waste if they just sit in a drawer. So here it is, my first Nixie project since... 1987. This clock will be available as kit, but since this is v1, I will most likely make some adjustments. Any suggestions are welcome.
  13. I'm trying to use a Launchpad 430 to program a board that has an MSP430G2553IRHB32R. I am doing this on a Windows 10 machine. I've removed the jumpers on the Launchpad and connected VCC and Ground to the other board. I've also connected RST and TEST pins. I created a simple blinky sketch which runs just fine with a stand alone Launchpad 430. However, when I attempt to program my custom board with the same code, I get the following error. MSP430_GetNumberOfUsbIfs MSP430_GetNameOfUsbIf Found FET: HID0003:COM5 MSP430_Initialize: HID0003:COM5 Firmware version is 20409001 MSP430_VCC: 3000 mV MSP430_OpenDevice tilib: MSP430_OpenDevice: Could not find device (or device not supported) (error = 4) tilib: device initialization failed the selected serial port tilib: device initialization failed does not exist or your board is not connected I have selected the MSP-EXP430G2553LP board and COM5. I cannot seem to get it to program my other board. I've tried several different USB cables. Used 2 different computers and 2 different Launchpads. I even attempted to program a different custom board that I had been able to program before. I'm using the latest version 18 of energia. Can somebody point me in the right direction as to how to solve this problem and be able to program my custom board? After that, does anybody know what I need to do to get the board.txt and pins file set up to work correctly with my 32 pin MSP430G2553... chip? Thanks for the help, Curtis
  14. Hi everyone! I'm new here and I'm pretty new with MSP430 as well. I have been working on a project that measure vibration using accelerometer (ADXL362) and send the information by RF using nRF24L01. I had successful doing this using ADLX345, but I could not do it with ADXL362. The nRF2401 it's working well. Anybody can help me? Follow the code: #include <Enrf24.h> #include <nRF24L01.h> #include <string.h> #include <SPI.h> Enrf24 radio(P2_0, P2_1, P2_2); // P2.0=CE, P2.1=CSN, P2.2=IRQ const uint8_t txaddr[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0x01 }; //model of pacage //configura
  15. Hello all! I am currently working on a project that uses two NRF24L01 modules to communicate between two MSP430G2553 chips. The goal is to send a 14 character string of numbers and letters between the two devices. I have been trying to get code working with Code Composer Studio for a few weeks now, but have had no success at all. I found several posts on this forum from others who have tried similar things and this post in particular, http://forum.43oh.com/topic/2050-nrf24l01-registerscommands-and-functionswork-in-progress/page-2 with a link to a library created by Spirilis, however I've tried using this library and I can't get any of the code to compile. I suspect that recent changes to CCS and the compilers have rendered the code inoperable. It would be a huge help if someone could point me in the direction of a functional library or any resources that can help me communicate with these wireless modules and transmit/receive data. Thanks in advance!
  16. on MSP430G2553 mounted on launchpad I have a problem with converting an integer to a String: uint8_t x=10; uint8_t y=10; String xx = String(x,DEC); String yy = String(y,DEC); Serial.println (xx); Serial.println (yy); with Energia Vers 0101E0012 the result is 10 for xx and 10 for yy but i will to use Energia V17 to use LMP4 mode . the result is garbage for the two converted value --> xxx (three characters) then CR then xxx(garbage three characters) the other problem with Energia V 18 , i can not reprogram the chip (on Windows 9) error is : unable to find a device matching 0451:f432 The first problem is very strange for me. Is what someone can check. Thanks in advance
  17. on MSP430G2553 mounted on launchpad I have a problem with converting an integer to a String: uint8_t x=10; uint8_t y=10; String xx = String(x,DEC); String yy = String(y,DEC); Serial.println (xx); Serial.println (yy); with Energia Vers 0101E0012 the result is 10 for xx and 10 for yy but i will to use Energia V17 to use LMP4 mode . the result is garbage for the two converted value --> xxx (three characters) then CR then xxx(garbage three characters) the other problem with Energia V 18 , i can not reprogram the chip (on Windows 9) error is : unable to find a device matching 0451:f432 The first problem is very strange for me. Is what someone can check. Thanks in advance
  18. Good morning, I'm using the latest Energia 18 build with Windows 10. I'm plugged into an MSP430 Launchpad with an MSP430G2553 chip on the board. The following code hangs on the Wire.endTransmission() statement.. Can somebody throw me a bone here and tell me how to fix this? int findAddress(int fromAddress, int toAddress) { int address = 0; for (int a = fromAddress; a < toAddress; a++) { Serial.print(a); Serial.print(" - beginTransmission.. "); Wire.beginTransmission(a); // delay(3); // Wire.write(1); Serial.print(" endTransmission.. "); int endStatus = Wire.endTransmission(); Serial.print(" Result: "); if (endStatus == 0) { address = a; Serial.print("Found device at: "); Serial.println(address); } else { Serial.print("x"); } } return address; }
  19. This code example works with Anaren and CC2500 BoosterPacks, (and of course with many other CCxxxx boards, like eZ430-RF2500,) and with G2553 LaunchPad. The code was based on slaa325 from TI (I am using same RF configs.) To use it, just un-comment one of the following lines in msp.h: //#define HARDWARE 2500 // CC2500 BoosterPack SPI1 G2553 LP //#define HARDWARE 915 // Anaren (915MHz) G2553 LP //#define HARDWARE 4302500 // EZ430-RF2500 CCxxxx.zip
  20. I would like to be able to program some MSP430G2553's with my MSP430G2553 Launchpad. Anyway one board is 25 pin and the other is 28 pin. Energia seems to only support the Launchpads for MSP430. How do I add the following boards to the List? MSP430G2553IRHB32R (25 pin) MSP430G2553IPW28 (28 pin)
  21. Hello everyone; As you can see bitshifting a byte 16 bits and storing in a long doesn't seem to work, while shifting storing and shifting again works perfectly. Is this behaviour normal? Using energia 0101e0017 on win7 with msp430g2553 launchpad. Also i'm not 100% sure but i think bitshifting 16 bits worked fine on a tm4c123gxl launchpad because i ran into this while converting a code that was written for tm4c to msp.
  22. I am using the latest version: energia-0101E0017. I just reloaded it from Energia's website this morning. It is their December 2015 version. I am using the latest CCS version 6.1.3. I installed a fresh version of that a couple days ago and have applied all the updates I could find. Using the very popular I2C_Scan tool, I get bad results. I either get all addresses telling me there's a device there, or if I do a write(0); between begin and end transmission, I get no devices... See brief code snip below: void findAddress(int fromAddress, int toAddress) { for (int a = fromAddress; a < toAddress; a++) { Wire.beginTransmission(a); Wire.write(0); int endStatus = Wire.endTransmission(); if (endStatus == 0) { Serial.print("Found device at: 0x"); Serial.println(a, HEX); } } } When using Arduino with the same I2C_Scan tool, I can quickly discover my i2c device. So, can somebody let me know why this isn't working, and/or perhaps point me to a work-around? I've read many of the postings about this and have done the following: Removed jumper from LED for P1_6 Used resisters to give step-up or whatever you call it Tried it with and without the Write(0) between the begin and end transmission code above Anyway, just a bit frustrated today. I'm a spoiled Software Engineer, not used to the pain that is endured each day by firmware developers as they fight as hard against the development tools as they do against the code they write :-) Thanks, Curtis
  23. For the AT commands from energia's serial monitor it appears as some characters missing!!! Any solutions? Below is my output: AT+CREG? +CREG: 0,1 OK AT+CREG=? +CREG: (0-2) O AT+CFUN=? +CFUN: (0,1,4),(-) K
  24. Hello - here is my example sketch that i did for another project - after i got it finished - i realized that i should share it because i could not find complete example like this on my own previously which included using the analog input to measure position of the arm - maybe it saves someone else a few minutes L298N_Motor_Example_12in_actuator_public.ino
  25. This is a recap of a little adventure in the hopes that it helps someone else out there. This application is on an MSP430G2553 MCU. CSS is used as the IDE and the Energia libraries are in play (a good tooling combination, highly recommend J). The app spends most of its time in LPM3. It wakes up periodically to do certain tasks and also wakes up when traffic comes in on the UART RX channel. The ISR for the RX channel detects the arrival of a command and acts on the command during the ISR. Part of servicing a command is sending a response, which is transmitted via the UART TX channel. Sometimes the app would respond to the command and other times the MCU just hangs. Digging in deeper with the CSS debugger showed it hanging in the Energia libraries waiting for the Serial TX ISR to fire and make space in the TX ring buffer. Why was the TX ISR not firing? Here is what was happening: If the response string was short enough to fit in the ring buffer it would be stored there, the TX ISR would eventually fire and send the response. If the response was too large the write routine would hang waiting for space to become available in the ring buffer. Energia disables GIE when it is in its TX or RX ISR routines. This app is trying to transmit while in the RX ISR. That will have the effect of filling the TX ring buffer but the TX ISR is not firing because GIE is disabled. So the buffer fills and the app hangs waiting for space to become available. Easy enough to fix: In the app code that is responding to commands and sending the responses do this (remember, this is inside the RX ISR thread of execution) __istate_t iState = __get_interrupt_state(); /* Current state of SR */ __bis_status_register(GIE); /* Enable GIE */ /* Process the command, send response */ __set_interrupt_state(iState); /* Restore GIE to previous state */ What this does is enable interrupts within the interrupt. Now the TX ISR will fire as Energia places bytes in the TX buffer. All is good!