Jump to content

Search the Community

Showing results for tags 'MSP430'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 290 results

  1. Has anyone heard about Energia supporting the newest G2 MSP board? I ordered it and tried it with the existing board profile and it didn't work. I was really trying to get the rev. 1.5 board because I am tired of switching the jumpers every time i want to use the serial monitor.
  2. Hello, I would like to interface USB push notification board (bought recently) https://store.ncd.io/product/4-channel-push-notification-contact-closure-input-over-usb/ with MSP430 and interface multi sensors in such a way that whenever the sensor range is disrupted then actuator assigned to sensor will be switch on and this message will be sent on smart phones, I am new to this kid work and also if this thing will successful then I would like to make the actuators like rely board function with these king push notification any suggestion regarding making these kind solution through embedded system will be much helpful
  3. I cannot get this led to dim. It will flash on and off but no PWM as far as I can see. I copied the code right from the website here. http://energia.nu/Tutorial_Fading.html and wired everything the way it should be. Using a 220Ohm resistor instead of the 10k they had in there BOM. What am I doing wrong? I am using the MSP430G2231 chip and have all my settings in energia set accordingly I really don't know what I am doing wrong or if I have a faulty chip? Looking for someone to point me in the right direction.
  4. agaelema

    Timeout Library for MSP43x

    I am developing a timeout / soft timer library for the MSP43x and would like to share it with you. It's still in the initial version, but all the functions are working. I'm developing and testing on MSP430F6736, but it worked fine on launchpad EXP430F5529LP. The library uses a timer to periodically generate ticks. In the base version developed by Felipe Lavratti, the timer-tick occur every 1us through a 32-bit timer (ARM Cotex). To avoid overloading the CPU I modified the code to accept longer time intervals and also functions to automatically calculate the Capture / Compare value of the timer. I also tried to isolate the timer configuration in a separate file, so in the future it would allow to select from more than one timer source or different devices, perhaps with compatibility with the old Value Line uCs. How the objective is not to give a perfect time base in us, I'm using ticks of 100us (10kHz) and works very well. The library has delay, getTime, and Timeout functions, the latter two of which are interesting for managing tasks without holding down processing like a normal delay. The example using the EXP430F5529LP use delay_Ms function to toggle 4 times both leds, geTime_ms() to toggle LED1 every 234ms and timeoutCheck_ms() to toggle LED2 every 1s. Feel free to leave your opinions and contribute to the project - Github of project Thank you.
  5. Hello , I'am trying develop a data logger to send data to a device through bluetooth, but in my state machine i want make a state were I can verify if the bluetooth is paired with smartphone, does anyone can help me , i don't have idea how can I do this.
  6. Hi, I posted a question on e2e but I found interesting to ask here too. I'm trying to port the Adafruit MCP4725 library to MSP430 using the Driverlib. I'm testing with launchpad EXP43FR2433 running at 1MHz and I would not want to use interruption to keep the code more portable. The sequence to write some value on DAC is relatively simple. - Set address -> send start -> send write cmd -> send upper byte -> send lower byte -> send stop. Using the following code one byte of the value is lost. msp43x_I2C_setSlaveAddress(EUSCI_B0_BASE, _i2caddr); msp43x_I2C_masterSendStart(EUSCI_B0_BASE); msp43x_I2C_masterMultiByteNext(EUSCI_B0_BASE, controlBits); // write cmd msp43x_I2C_masterMultiByteNext(EUSCI_B0_BASE, dataBits / 16); // Upper data bits (D11.D10.D9.D8.D7.D6.D5.D4) msp43x_I2C_masterMultiByteNext(EUSCI_B0_BASE, (dataBits % 16) << 4); // Lower data bits (D3.D2.D1.D0.x.x.x.x) msp43x_I2C_masterMultiByteStop(EUSCI_B0_BASE); But if I insert some dummy code (__delay_cycles) the transmission starts to work. #define I2C_Delay 5 msp43x_I2C_setSlaveAddress(EUSCI_B0_BASE, _i2caddr); __delay_cycles(I2C_Delay); msp43x_I2C_masterSendStart(EUSCI_B0_BASE); __delay_cycles(I2C_Delay); msp43x_I2C_masterMultiByteNext(EUSCI_B0_BASE, controlBits); // write cmd __delay_cycles(I2C_Delay); msp43x_I2C_masterMultiByteNext(EUSCI_B0_BASE, dataBits / 16); // Upper data bits (D11.D10.D9.D8.D7.D6.D5.D4) __delay_cycles(I2C_Delay); msp43x_I2C_masterMultiByteNext(EUSCI_B0_BASE, (dataBits % 16) << 4); // Lower data bits (D3.D2.D1.D0.x.x.x.x) __delay_cycles(I2C_Delay); msp43x_I2C_masterMultiByteStop(EUSCI_B0_BASE); __delay_cycles(I2C_Delay); Someone knows what's happening? It looks like the library is not checking if the transmission was correctly performed. Thanks
  7. 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 in my web store. 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 resistors 100 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
  8. I am working on power factor and energy monitoring. I would like to know if there is any library available in energy monitoring for energia using MSP430. If exist please send.
  9. Hello everyone, I am trying to get Energia running on my machine (macOS 10.13.3) and I am having troubles getting my serial ports to show up in the IDE. I have tried following the installation guide on the website here: http://energia.nu/guide/guide_macosx/ But when I click the link for "MSP-EXP430G2 and MSP-EXP430FR5739 LaunchPad," I am greeted with this: I know my USB cable is fine as I have used it with CCS on the Windows machines at school. If someone either has these drivers handy or if a dev from Energia has an expected time as to when these drivers will be available I would appreciate it greatly.
  10. Hi all, I am trying to connect SPI flash (W25Q80DVSSIG-NDhttp://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/166/w25q80dv_5F00_revf_5F00_02112015.pdf) to MSP430g2553 launch pad. Here I made the connections as below P1.1 SOMI <---------- 2nd Pin DO P1.2 SIMO ----------->5th Pin DI P1.4 SCLK ----------->6th Pin CLK P2.0 SS ------------>1st Pin CS I tried to use example code from TI to get the manufacturer id and device id. But I am failing to receive the expected data. Please have a look into my code and tell me if I made any mistakes. Please find the attachment for my code and the data sheet of Winbond W25Q80DV spi flash memory. And if anyone have sample codes or driver codes please do share with me. Thanks in Advance. Regards Santhosh main - Copy.pdf w25q80dv_revf_02112015.pdf
  11. NicholasLindan

    CoRTOS: An open source minimalist RTOS

    CoRTOS is a Cooperative Real Time Operating System for bare-metal applications. Its advantages over other systems are that it is fully documented with a manual and examples, is easy to understand and use and is astonishingly simple: The kernel is just 16 lines of C. The CoRTOS module compiles to ~200 bytes of code. The system includes optional modules implementing delays, timers, messaging, mutexes and signaling. It is intended for smaller microprocessors, such as the MSP430, Cortex M0+, AVR and PIC24, and for smaller systems of maybe a dozen tasks. CoRTOS is not a task scheduler. CoRTOS works like any other RTOS. Tasks schedule themselves, picking up where they left off after making a call to the OS. Please feel free to send questions to nolindan@ix.netcom.com The intended audience includes: • Those needing a small footprint RTOS; • Students learning about real time systems; • Makers wanting to program "close to the metal" Features World's simplest RTOS CoRTOSV1d.zip
  12. Hello, I'm using energia 1.6.10E18 with the launchpad MSP430G2 and the MSPG2553 installed. So I saw that in another forum the library from cactus.io was used for the BME280. That library was for the I2C. Now I want to use the SPI library and they had one.(http://cactus.io/hookups/sensors/barometric/bme280/hookup-arduino-to-bme280-barometric-pressure-sensor-spi). So I installed the library changed it to hardware SPI with the cs pin on P2_1. And it compiled, but i'm only getting these results: 813.81 mb 100.00 % 0.00 *C 32.00 *F 813.81 mb 100.00 % 0.00 *C 32.00 *F 813.81 mb 100.00 % 0.00 *C 32.00 *F 813.81 mb 100.00 % 0.00 *C 32.00 *F It looks like the msp430 is not getting any data in/out. I probed the SPI connections with my oscilloscope en there is literally nothing happening. While with the basic example sketch I can clearly see what code is sending. Can anyone help me understand this problem and hopefully fix this. I want the SPI connection to work because I want the nrf24l01 and BME280 working side by side. The msp430 can't do SPI and I2C together like an arduino so you need to chose between them. This is the code I'm using and the library on the website. #include <SPI.h> #include "cactus_io_BME280_SPI.h" #define BME_CS P2_1 BME280_SPI bme(P2_1); void setup() { Serial.begin(9600); Serial.println("Bosch BME280 Pressure - Humidity - Temp Sensor | cactus.io"); if (!bme.begin()) { Serial.println("Could not find a valid BME280 sensor, check wiring!"); while (1); } Serial.println("Pressure\tHumdity\t\tTemp\ttTemp"); } void loop() { bme.readSensor(); Serial.print(bme.getPressure_MB()); Serial.print(" mb\t"); // Pressure in millibars Serial.print(bme.getHumidity()); Serial.print(" %\t\t"); Serial.print(bme.getTemperature_C()); Serial.print(" *C\t"); Serial.print(bme.getTemperature_F()); Serial.println(" *F"); // Add a 2 second delay. delay(1000); //just here to slow down the output. }
  13. zainmsp

    msp430g2553 with cc1101

    Hi All, I am trying to create a transmitting and receiving node. My setup is as follows My transmitting node #1 is mbed-K64F with cc1101.(working fine sending data) My transmitting node #2 is msp430g2553 with cc1101.(giving me challenges) My receiving node is mbed-lpc1768 with cc1101 (working fine and received data from node #1) my connection for msp430 are as follows: csn is at pin 8 sck is at pin 7 mosi is at pin14 miso is at pin 15 I just declare csn as output, the rest of the pins i assume gets configured when we call spi.begin()? I imported the cc1101 library from mbed and managed to convert and compile it without errors. However I am still struggling to send the message to receiving node. My logic is as follows: initialize SPI library (1 MHZ of frequency,SPI msb datamode and SPI_mode0) initialize registers of cc1101 send data after every 4 seconds I used Serial.println to debug my program and I can see it is calling the spi_send function in usci_spi.cpp file but i cant see any packet in the receiving end. Almost same logic and code is running on k64f, even my print statements are giving me same values of registers,addresses and data. But msp430 is not sending data mbed-k64f is sending data. Anyone got a joy to successfully sending the data with msp430g2553 please help!!! I have also attached my cc1101.h/cpp files. Please feel free to have a look and let me know if I am doing anything wrong. thanks in advance, Zain CC1101.cpp CC1101.h
  14. Hello, I'm using IRremote library and IRrecvDemo is working perfectly, however IRsendDemo is not working. I've commented out these lines in IRremote.cpp //pinMode(TIMER_PWM_PIN, OUTPUT); //digitalWrite(TIMER_PWM_PIN, LOW); // When not sending PWM, we want it low and removed the if (Serial.read() != -1) condition, but it is still not working. Do you have any idea what might be the problem? Thanks.
  15. Hello, I'm using IRremote library and IRrecvDemo is working perfectly, however IRsendDemo is not working. I've commented out these lines in IRremote.cpp //pinMode(TIMER_PWM_PIN, OUTPUT); //digitalWrite(TIMER_PWM_PIN, LOW); // When not sending PWM, we want it low and removed the if (Serial.read() != -1) condition, but it is still not working. Do you have any idea what might be the problem? Thanks.
  16. Hello ,I'm using MSP430F5131 Microcontroller of TI.I also use a MSP-FET Emulator in order to program that device.i have written a code in Code Composer Studio (Defined the properties of CCS's project to the devices im using).I compiled the program and no errors has found.Then i connected the MSP-FET to the board according to the datasheet SLA138H , page 26 . (The board supplies the 3.3V so i connected it to pin 4 in the JTAG connector of the MSP-FET). I didn't connect the TEST/VPP and didnt connect the the resistor R2 330Ohms as instructed in that datasheet coz i dont need to use the fuse blow protection functionality.My problem occurs when i try to download the program to the MSP430 device , when i hit on the downloading button an error message pops up :"Error connecting to the target: Unknown device".I tried to do the same in IAR Embedded Workbench (Same code , same properties) it asks me to update my firmware of the MSP-FET i click ok and it updates the firmware , but then i get the same error as i have got in the Code Composer Studio : "Tue May 01, 2018 11:08:46: Fatal error: Could not find device (or device not supported) Session aborted! "It is needed to be said that when i hit on the download button the "MODE" red led on the MSP-FET flashes and then stays on after the error message has been popped.I tried to get the 3.3V supply voltage for the downloading purposes from the MSP-FET (JTAG pin 2) and it still doesn't work and get the same error.I also made sure that the MSP430 gets the amount of voltage its needed (3.3V from the board by a regulator).I would like to know how i can solve this problem and download my code into the MSP430.I have attached a wiring schematic of the board. hope it will help.thanks in advance. updated electrical drawing.pdf
  17. Hi everyone, I am new here so please forgive if I am posting this in the wrong place. I am trying to develop a simple game (snake or tic tac toe) using the boosterpack mkii and MSP430FR6989 but I am having terrible hard time even getting started with the project. I would also like to know which libraries to download and etc. There are a lot of tutorials for boosterpack mkii but none of them use the FR6989 board. If someone could get me started and guide me the right way it would be really appreciated.
  18. In case you need to stock up on MSP430 dev boards, it's MSP430 week in the TI store. http://www.ti.com/store/featured/msp430week18.html
  19. Hello Guys Good Day for All, I just open the Mspflash example from energia example using MSP4305969LP board. But when I compile, it show error as below picture. Any one can help me? Thanks a lot. Best Regards, Lukman
  20. Hi All First, I would like to thank @Rei Vilo for providing the Library for the Kentec (BOOSTXL-k350qvg) library with Energia. I copied the code out of https://www.youtube.com/watch?v=XyeUpk6P4kA (as I didn't find the powerpoint or pdf) and got it to work with an MSP430F5529 launchpad. (Energia 18, Windows as the Mac version doesn't work atm). Then I compiled the same code on a MSP432P401R launchpad and it runs a lot slower than on the F5529 (I assume this is a known issue, due to slow SPI speed ( https://github.com/energia/msp432-core/issues/27 ) but also doesn't look the same, the fonts are "skinnier on the MSP432. This discrepancy, I cannot explain. Another question: If I want to write a changing variable, in this case simply the x-coordinate of the touch to the screen, how do I locally clear the screen without redrawing everything (or if I want to make a bar graph that represents eg a changing value of a sensor? Do I always draw a black rectangle, then the bar/text etc? or is there a simpler way that is not immediately obvious to me now? Next step: I have to learn more about state machines to switch screens (settings), do stuff there, come back to main without the program getting into badly readable territory. Thank you very much for your help. //First steps with the Kentec Display #include "SPI.h" #include "Screen_K35_SPI.h" Screen_K35_SPI myScreen; uint16_t colours[6]; uint16_t x; uint16_t y; uint16_t z; uint8_t initFlag; void setup() { Serial.begin(9600); Serial.println(); Serial.println("hello"); Serial.println(); pinMode(RED_LED, OUTPUT); myScreen.begin(); myScreen.clear(); colours[0] = myScreen.calculateColour(255, 0, 0); colours[1] = myScreen.calculateColour(0, 255, 0); colours[2] = myScreen.calculateColour(0, 0, 255); colours[3] = myScreen.calculateColour(255, 255, 255); colours[4] = myScreen.calculateColour(255, 255, 0); colours[5] = myScreen.calculateColour(0, 0, 0); x = 0; y = 0; z = 0; myScreen.setPenSolid(true); myScreen.setFontSolid(false); myScreen.setFontSize(2); initFlag = 1; } void loop() { if (initFlag) { drawHomeScreen(); initFlag = 0; } if (myScreen.isTouch() > 0) { myScreen.getTouch(x, y, z); myScreen.gText(10, 10, btoa(x, 8), colours[3]); Serial.print(x); Serial.print(" "); Serial.print(y); Serial.print(" "); Serial.println(z); } if (z > 100) { if ((x < 160 && x > 0) && (y < 240 && y > 100)) { digitalWrite(RED_LED, HIGH); } else if ((x < 320 && x > 160) && (y > 100 && y < 240)) { digitalWrite(RED_LED, LOW); } else if ((x < 320 && x > 160) && (y > 0 && y < 100)) { drawSettingsScreen(); } } } void drawHomeScreen() { myScreen.clear(); myScreen.gText(30, 50, "TOUCH LCD DEMO", colours[4]); myScreen.rectangle(0, 100, 160, 239, colours[1]); myScreen.gText(50, 180, "ON", colours[0]); myScreen.rectangle(160, 100, 319, 239, colours[0]); myScreen.gText(235, 180, "OFF", colours[1]); myScreen.rectangle(160, 0, 319, 100, colours[2]); myScreen.gText(180, 50, "SETTINGS", colours[3]); } void drawSettingsScreen() { myScreen.clear(); myScreen.gText(10, 10, "TOUCH LCD DEMO", colours[0]); myScreen.gText(10, 30, "TOUCH LCD DEMO", colours[1]); myScreen.gText(10, 50, "TOUCH LCD DEMO", colours[2]); myScreen.gText(10, 70, "TOUCH LCD DEMO", colours[3]); myScreen.gText(10, 90, "TOUCH LCD DEMO", colours[4]); }
  21. Hi, I have an MSP430G2553 board that I need to work with. However, when using Energia, the program usually freezes or becomes extremely slow to the point that I just have to terminate the process and close it. I really doubt it's a code problem, since the only codes I've used have been from the Examples (Blink and AnalogReadSerial). I've tried a couple of things: uninstalling and re-installing drivers, following all the steps in the Windows guide for Energia, re-downloading Energia. But nothing works. The problem is most certainly a communication problem with the board since, upon unplugging the board, the program starts working again with no freezes whatsoever. I really need to get this to work, so any suggestion is apreciated. Windows 10 by the way. Thanks. - Raimundo
  22. JustRic

    Total Noob With Interrupt Problems

    I just started playing with the MSP430 with the G2553 chip and am having problems with interrupts. I have the following code just for testing and sometimes pressing the button works and sometimes it doesn't. I thought maybe I had a bad board and replaced it but I still have the same problem. I am beginning to think I am just doing something wrong in the debugging or something. But, here is my code: #include <msp430g2553.h> #define LED1 BIT0 int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer BCSCTL1 = CALBC1_1MHZ; //Set DCO to 1Mhz DCOCTL = CALDCO_1MHZ; P1OUT=BIT0; P1DIR=BIT0; //P1.0 (LED) as output) P1IES |= BIT3; // high -> low is selected with IESx = 1. P1IFG &= ~BIT3; // To prevent an immediate interrupt, clear the flag for // P1.3 before enabling the interrupt. P1IE |= BIT3; // Enable interrupts for P1.3 __enable_interrupt(); P1OUT |= BIT0; //Initially the led will glow while(1) {} return 0; } #pragma vector = PORT1_VECTOR //PORT1 interrupt vector name __interrupt void P1_ISR(void) { P1OUT ^= BIT0; P1IFG &= ~BIT3; // clear the interrupt flag } So I hit the debug button in CCS 7.4, and it loads to the board. I have a breakpoint at stopping the watchdog timer and a breakpoint at toggling BIT0 in the ISR. I hit resume at the watchdog timer and start trying the button at P1.3. Maybe 1 out of 10 times I'll hit the breakpoint in the ISR but the rest of the time I get nothing. I apologize if this is just a really basic and dumb question, but I have Googled everything I can think of and searched the forums and come up with nothing. Any help is appreciated,
  23. Hello, I'm currently working on a project temperature data logger. Now I'm using mc: MSP430f5529 I integrated with sd card using the petit fatfs library. Due to some limitation, i cant use full functionality. so I'm planning to make it work on fatfs. but there is no footprint for that. can you help me to come out of this issue? Thank you, sir Limitations: 1. Cant create a file 2. while saving the data in the same file previous entries are all given garbage value at sometimes. because it is not an empty file filled with null.
  24. RobG

    MSP430 Nixie Clock

    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.
  25. Merienyels

    An extra USB for MSP430

    Hi! It's my first time using MSP430 and I'm a little bit lost . I want to connect a barcode scanner module with the MSP430. In order to do that, I need an USB port extra. I know that Arduino has a USB Host shield, but MSP430 doesn't have any shields, does it? So, how can I do it? Is there any way to use the USB Shield of Arduino for the MSP430? Thanks!