Leaderboard


Popular Content

Showing most liked content since 06/22/2017 in all areas

  1. 4 likes
    The delay() function is part of the official Arduino API. It is implemented with a busy loop, based on the CPU clock. The sleep() function is not part of the official Arduino API. It powers down the CPU, and measures time based on the VLO, which doesn't have a accurately specified frequency to begin with and has much higher temperature and voltage coefficients than other clock sources.
  2. 4 likes
    An output power display for my solar system. G2553 Launchpad, Blue 4-digit LED display, RS485 Transceiver SN65HVD12P (a low power, 3.3V version of the standard SN75176), this is all there is. All pins are used, 4 + 7 for the multiplexed LEDs (no resistors: Blue LED, 3.6V supply, output resistance of the pins limit the LED current) 3 pins for UART and send/receive for the SN65. 2 pins for 32768Hz xtal (I had this one soldered in on the LP, so why not use it) The MSP asks the inverter over RS485/Modbus "what is your current output power". After less than half a sec, the inverter aswers with the required value. This repeats every 2 seconds. The inverter is a Fronius Symo, with Datamanager 2 (which I guess is an embedded linux machine, covering LAN, Wifi, Modbus.....). The communication protocol can be downloaded from the Fronius website (after signing in), so no reverse engineering was required. Instead of only power, I could also display line voltage, frequency, total delivered energy.... This is just a working prototype on Launchpad, I will do a PCB later, I also plan to power this directly from the inverter (which has a 12V solar powered output for such things). See the picture, almost 7.5kW :-)
  3. 3 likes
    Below is a guide to get up and running with Energia BLE / Evothings Evothings for controlling your LaunchPad over BLE with a custom app on your mobile device: I have put together an app that allows to control of the RGB LED and Buttons exposed in the BLEInputOutput Sketch running on the MSP432 LaunchPad. At this moment it only runs on an MSP432 LaunchPad. Other LaunchPad's have bot been tested. To run the APP and control the LaunchPad follow the instructions below. You might have to upgrade the BoosterPack’s firmware. The firmware on my BoosterPack was not the right one so yours might not be as well. If you have issues running the app, then refer to updating the BoosterPack section below. Below is a screenshot of the app that I put together using Evothings to control the BLEInputOutput Sketch running on iOS. Running the APP on your mobile device: 1: Seat the CC2650 BoosterPack on the MSP432 LaunchPad 2: You will need the latest BLE library for crucial updates and new example Sketches. Get it from: https://github.com/ti-simplelink/ble_energia 3: Put the BLE folder in your person Energia/libraries directory just as you would install any other library. 4: Run Energia and open the example BLE->BLEInputOutput Sketch. 5: Verify and upload the Sketch 4: On your phone, download the Evothings Viewer from the app store. There is one for iOS and Android. 5: Open the app and then in the “Enter connect key” enter http://energia.nu/ble/bleinputoutput/ 6: Click connect. 7: The Energia BLE app should now open in the viewer. 8: Click he start button and the status should change to “Status: Connected” 9: You can now change the RGB sliders and you should see the LED’s on the LP match 10: Pressing the buttons will change the text for each button from “released” to “pressed”. Upgrading the CC2650 BoosterPack: The firmware on your BoosterPack might not be the right one. If you are experiencing issues with running the app, you might have to upgrade the firmware on your CC2650 BoosterPack. We are working on making this cross platform and to accomplish for Energia users. For now Smart RF Flash Programmer 2 has to be used on a windows PC. 1: Download Smart RF Flash Programmer 2 2: Remove JTAG headers from MSP432 LP (TDI, TDO, TCK, TMS) 3: Remove the BoosterPack from the LaunchPad (you will need a RED MSP432 LaunchPad) 4: Attach 10 pin ARM ribbon cable (included in the BoosterPack box) to XDS110 header on the emulation side of the MSP432 LaunchPad. Attach other end to CC2650 BP. It is keyed so there is only one way to attach it. 5: Get the SNP images from this link: http://software-dl.ti.com/dsps/forms/self_cert_export.html?prod_no=ble_2_02_simple_np_setup.exe&ref_url=http://software-dl.ti.com/lprf/BLE-Simple-Network-Processor-Hex-Files 6: Once installed, find the image simple_np_cc2650bp_uart_pm_xsbl.hex 7: Plug the LP into your computer. 8: Launch Smart RF Flash Programmer 2. 9: The CC2650 should show up in the left pane titled “Connected Devices” 10: Right click the CC2650 and select connect. The status bar should say “Success!” when finished connecting. 11: On the “Main” tab, in the “Flash Image” field select single and then browse to the simple_np_cc2650bp_uart_pm_xsbl.hex image. 12: Still on the main tab, under the header “Actions” check “Erase”, “Program” and “Verify”. 13: Then click the Green Arrow image on the right bottom to program the image. 14: Remove the ribbon cable, replace the JTAG headers and reseat the BoosterPack. You are now good to go to run the Sketch/App.
  4. 3 likes
    Finally got around to coding a bootloader for this project. I'm posting version 0.1 here for reference. Lots of times people seem to have trouble with bootloaders (I put off writing one for ages) But this should show you can start simple, and optimise later. The code right now is very rough. But is written in a way that could allow updating of itself it the help of a bootstrap Application. ie: Load new application which when run loads a new bootloader. This bootloader isn't 100% fool proof, if a bad app is loaded that fails to perform as a USB MSC then the user cannot use the USB port to load a new firmware file. but the SD can always be removed and a file copied from a PC if required. Worst case a debugger is required (Which is how they run right now) Memory Map Here is the memory map I've adopted. The bootloader fits at the top of FLASH, the default reset vector always runs the bootloader. The bootloader uses petiet FatFS to read "firmware.bin" off an SD card. It checks the file integrity with a CRC16 integrated into the firmware.bin file on a PC after it was compiled (last word of file). If the file is valid it check the current apps CRC, if they match then app runs. (Application already loaded). If they do not match the Application flash is erased and the new app loaded. Running the Application When launching the app it's CRC is checked to ensure it has loaded correctly. (This shouldn't happen, but you never know...) The App's Interrupt vectors are copied to top of RAM, and SYSCTL.SYSRIVECT is set. The address at the apps reset vector (0xDFFC) is called. Application changes Due to the construction of this bootloader the app needs to have a few changes made, specifically to the linker script. Reduce FLASH boundaries to remove bootloader area Shift Interrupt Vectors to alternate location in flash. (the app doesn't need to know its vectors will be moved to RAM, they just need to be in a fixed location so the bootloader can do that) Remove top 128 bytes of RAM (This is where the new interrupt vectors go. but default this is where the stack is initialised. which will damage the interrupt vectors) Create .crc section (Ensure a fixed WORD is placed to hold our CRC value.) I set up a build setting to output a Binary file format which I run through a simple C program to compute and fill the CRC value. These are all run automatically when the app is built. Improvements Reduce code size (I have a feeling an SD bootloader could squeeze under 4kb, right now it's at ~6kb) Improve speed, I'm not using the DMA, which could be used to improve speed (Update takes ~10s) Utilise High memory (Right now I'm not enabling the use of high memory, the MSP430F5514 has 17kb in >0x10000 address range.) High memory could be utilised to hold the bootloader this would free up (~7.5kb ) that the Main app could use. gpsLoggerBootloader_0.1.zip
  5. 3 likes
    First off, welcome to the forum. A couple of ideas come to mind. The first is that you might want to consider controlling the power to the SD card with a free I/O line and a transistor, only powering it up when you need to write to it. The other idea is to store multiple samples in an array (which should survive going into low power mode and back) and write them to the SD card every hour or more. How many samples to store between writes to the SD card would depend on your confidence that you wouldn't lose power or have a reset condition before having a chance to move them to the card.
  6. 2 likes
    Thanks @Clavier for the explanation.To add to this. The VLO is only used if the startup code does not detect an external crystal to source ACLK from. @tapasxplore Note that the MSP430 max VCC is rated @ 3.6. Robert
  7. 2 likes
    We can consider Energia as a disruptive technology, in a way it allows a whole new group of users to develop on micro-controllers. Another strong trend is frugal innovation popular among companies, where a prototype developed with Energia may be good enough to be launched on the market. The major difference between Energia and other Arduino-like frameworks is, Energia relies on professional-grade SDKs. Energia is based on TI-DriverLib and Energia MT on TI-RTOS now SimpleLink.
  8. 1 like
    Hi Rei, Thank you for letting me know, anyway I have already modified the Adafruit GFX library so it now runs on the CC3200, I will publish it as soon as I finish some last cleanups, During the process, I have learned about some compilation differences between Arduino and Energia which I'd be happy to share if there is any interest Thanks Guy
  9. 1 like
    Yes - you can use GUI Composer 2 (at http://dev.ti.com/gc) to create a GUI for your MSP430G2553 device. You can either use JSON-formatted strings for communicating with the target over the serial port (see http://dev.ti.com/gallery/search/MSP430G2553_LEDs_and_Temp_Demo), or you can use a target-side monitor and communicate over the serial port with the monitor (see http://dev.ti.com/gallery/search/blinky_for_MSP430G2553 ). Regards, Brian
  10. 1 like
    So, in case anybody else is curious, I've got the answer to my own question. Rename your bin to "mcuimg.bin" In Uniflash, go to the System Files, find /sys/mcuimg.bin Click the BROWSE button for URL and navigate to your file. Mark Erase, Update, and Verify. Go back to Flash Setup and Control, click Program. Enjoy. I really have to say that this is fantastic.I'm going to see what functions I can duplicate from CCS this way.
  11. 1 like
    Energia does not implement an API for UART TX/RX interrupt callback. You could however easily modify HardwareSerial.cpp/.h and insert an optional hardware callback. I would add a function e.g. HardwareSerial::attachTxInterrupt(void (*userFunc)(void)) / HardwareSerial::attachRxInterrupt(void (*userFunc)(void)). Use attachInterrupt(void (*userFunc)(void)) in WInterrupts.c as an example. Add the TX and RX userFunc as a private member in HardwareSerial.h. Then in the tx/rx ISR check if the a function has been registered, if so call it.
  12. 1 like
    Try Wire.setModule(0) before calling Wire.begin(). Reason is that the standard changed for the wire pins from ping 14/15 to pin 9/10 a while back. You are better off using pins 14/15 on the G2553 though since Wire on pins 9/10 is a software implementation. So use Wire.setModule() before Wire.begin() to allocate Wire to the hardware supported I2C pins.
  13. 1 like
    Good progress and tidy prototyping. Interesting observation about the beam being too narrow. I wouldn't have expected that problem with bare LEDs. Angling will be tricky without visual verification.
  14. 1 like
    Hi @indirtwetrust and welcome to 43oh. It always helps to post a simplified version of your code that demonstrates the issue so that others can replicate it. Perhaps you did not set the pins low before setting them to outputs? If not, I suspect the default is for Energia is to immediately set output to high. See the code below where I set pins low first: /* Test output state on powerup and reset * G2553 LaunchPad without crystal * Energia V17 */ void setup() { pinMode(PUSH2, INPUT_PULLUP); digitalWrite(6, LOW); pinMode(6, OUTPUT); digitalWrite(7, LOW); pinMode(7, OUTPUT); digitalWrite(8, LOW); pinMode(8, OUTPUT); digitalWrite(9, LOW); pinMode(9, OUTPUT); digitalWrite(10, LOW); pinMode(10, OUTPUT); } void loop() { if (digitalRead(PUSH2) == LOW){ digitalWrite(6, HIGH); digitalWrite(7, HIGH); digitalWrite(8, HIGH); digitalWrite(9, HIGH); digitalWrite(10, HIGH); } else{ digitalWrite(6, LOW); digitalWrite(7, LOW); digitalWrite(8, LOW); digitalWrite(9, LOW); digitalWrite(10, LOW); } } The logic analyzer in the screen shot below is set to capture for 5 seconds. When I start it, the LaunchPad is running and I am pushing the user button on P1_3, PUSH1, every second or so. As expected when P1_3 goes low, the output pins go high. In the next screen shot I wait about a second into the run to plug in the LaunchPad. As can be seen, everything is low to start and then P1_3 goes high as soon as it is reached in setup(). The rest stay low. It takes a while to start up because I don't have the crystal installed on this LaunchPad and Energia tries for a while to start it before giving up. The same thing if I do a reset - the output pins don't start out high.
  15. 1 like
    I will give you my relatively uneducated opinion for what it is worth... I don't think many professional C/C++ programmers (which I am not) would choose to use Energia in a commercial product and most commercial products do not use it. The same applies to Arduino. The reasons are many but there are exceptions of course. The most obvious exceptions are where the product is intended for Energia/Arduino users or it is a relatively simple application that fits Energia and the programmers skills well. I worked on a small project that used Energia and sold in very small quantity. See for example: http://processors.wiki.ti.com/index.php/CC3100_%26_CC3200_UniFlash_Quick_Start_Guide You can discuss this with the PCB board assembler as some have this capability. In any event, if you can do it, you can find someone else who will do it for the right price. If you are going to build several hundred of these you might discuss your questions with a TI sales representative.
  16. 1 like
    New IR Transmitter Prototype Assembled I have not received the new PCBs yet but I did get the IR LEDs so I put together a "boosterpack" transmitter and a separate module to test coverage and range. They can be used together with crossed beams for coverage from two sides. The IR LED array on the left is lit, but since it looks to be off, it is apparent that my iPhone has an IR filter on it. Total current when on is on the order of 400 mA per bank and is controlled by a TIP120 Darlington Transistor which is all I had on hand that could carry the current. The TIP120 on the left has a heat sink on it but I found that wasn't necessary and the one on the right is bare. The LEDs are capable of 100 mA continuous each but are seeing less than 50 mA at peak here. If you look closely at the bottom row on the booster pack you can see the 0805 SMD resistors that are in series with each LED. Power is coming from a 1200 mAh lipo beneath the LaunchPad which seems sufficient for the task. This thing puts out a lot of photons compared to what I was using before. Indoors with white walls it even bounces around corners. I learned the following which will need to be incorporated into the next iteration: The beam is too narrow. I discovered this by testing outdoors with no walls to bounce off of. The LEDs I bought were from China and did not have a complete datasheet. Possible solutions are wider beam LED(s), angling them in such a way as to spread the beam, possibly reflect them with an umbrella as is sometimes done with a photographic flash. Use more SMD components. I would like to reduce the hand soldering. Looking for a SMD enhancement MOSFET that can handle 1A at 3.3V and not overheat in a small enclosure plus IR LEDs that fit the spec. Find an off the shelf enclosure and design around it. The receiver PCBs and WS2812 PCBs should come in next week.
  17. 1 like
    Tiara Prototype Assembled I assembled one of the tiaras in more or less final form last week and while everything is working, and it meets the original criteria, I am working on additional modifications to improve ease of fabrication. Here is what it looks like at the moment: The fabrication problems are mostly around the wiring between the PCB and the LEDs. Soldering to the WS2812s is fussy and the wiring isn't too attractive as seen in this photo from the back: In addition, I've hot glued a pin header to the PCB and wired to that. All very unprofessional looking. There was also a potential problem with shorts when inserting and removing the battery. So, I've modified the PCB as follows and put them on order: This will allow soldering in a pin header or in the case of the TSOP 38 direct soldering. The three LEDs on the old receiver PCB have been replaced by a four pin 5050 SMD version of the WS2812. In addition, I am switching to the same LED for external lights and designed a small PCB to make attachment easier - they are a bit more than 11 mm in diameter: There was a recent blog on Hackaday about cables and I am thinking about ordering some custom ones to tidy up the wiring: http://hackaday.com/2017/06/25/dirty-now-does-cables/. Of course this will require yet another spin of the PCBs to accommodate the new cables but in the end it is all easier to assemble and neater. Meanwhile, the prototype I built for the transmitter looks crummy and I am still waiting on some parts. Plus, it was suggested that I needed to simplify the programming by the user further and perhaps have an automatic mode that would somehow work without programming on behalf of the user. So, I've ordered some MSGEQ7 Band Graphic Equalizer chips with the idea of using that plus volume to create some kind of automatic light show (feature creep alert). I will probably switch to a Raspberry Pi for the transmitter.
  18. 1 like
    Well, we are in the same boat then, so maybe it is even ones out. I just started writing my current project, desktop app, for real. I used no documentation in the "breadboard" versions, so I am having to go back to the APIs and relearn what I did. Unfortunately it is all sub-classes, at this point, so I am not sure where I added functionality for one operation, or another. Since I do not remember what order I added stuff in, I do not Know if things that are not working just need other sub-classes fleshed out, or if I am doing something wrong. I just need to remember to go back and document my real code when I figure out what the problem was.
  19. 1 like
    Thanks for reporting this issue. I was able to reproduce it. For now you can work around it as described below. I will make a fix available in the next MSP430 package update through the board manager. copy <energia directory>\hardware\tools\DSLite\DebugServer\drivers\MSP430.dll to <energia directory>\hardware\tools\msp430\bin\ edit <energia directory>\hardware\energia\msp430\boards.txt an change the 2 occurrences of rf2500 with tilib restart energia and you should be able to upload to the MSP-EXP430G2 with MSP430G2553. I have also filed an issue on github here: https://github.com/energia/msp430-lg-core/issues/12
  20. 1 like
    Improved homing cycle has led to (near) perfect registration of solder mask. Layer registration mark, lines are ~0.1mm wide. Part of TSSOP 20 footprint, mask is way past "use before" date so some problems with spots appearing. I have started to apply the Riston film on wet PCBs, dust problem nearly gone - easier to handle. Terje
  21. 1 like
    Hello. I figured I would share a project I've been working on since I borrowed a lot of code from this forum. It's a small watch using a g2553 and the same OLED display as "The Terminal". Thanks bluehash for the breakout, RobG and gwdeveloper for code, and others.
  22. 1 like
    Well, it's up and running. All the hardware seems to check out. Display and accelerometer are playing nice on a shared spi bus. The FR5738 RTC is keeping time. LIS3DH initialized and generating interrupts properly. Lots of programming to do now for the interface, calibrations, etc.