Jump to content
43oh

reaper7

Members
  • Content Count

    174
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Like
    reaper7 got a reaction from MichelKohler in [Energia Library] INA219 -> voltage, current, power sensor   
    Hi All,
     
    I found another one (after the first, prepared by Rei Vilo) interesting library for TI INA219 IC by Jarzebski
     
    This library working on stellaris without any modyfication.
     

     
    links:
    TI page about INA219
    Rei Vilo library at 43oh and Embedded Computing
    Jarzebski github - other interesting stuff for GY80 (L3G4200D, HMC5883L, BMP085, ADXL345)
    Jarzebski blog (PL)
  2. Like
    reaper7 got a reaction from sq7bti in Two SPI modules   
    indeed, inspired by HardwareSerial
    You can manage touch to hardwarespi too
     
    P.S. yes, I push to energia git
    but we have to perform some tests
     
    Here is the next one
    with setModule(module) and setModule(module, ssPin) for "universal" SPI which can be set to (0),(1),(2),(3)
    or, of course, still exists SPI0, SPI1, new SPI2, SPI3 as a "hard" defined
     
    SPI2.zip
     
    we also need to speed up CS inside lib, digitalWrite(ssPin... is not too fast
     
    this is sample code from spi2 and spi0, 8 data bits and many many time to disable CS:

  3. Like
    reaper7 reacted to Rickta59 in JSON file for installation on the Arduino IDE?   
    I tend to stay away from the Arduino distrubution directory. I created a directory in my Arduino sketch directory called "hardware" to store alternate cores. In my case on linux it ends up being ${HOME}/Arduino/hardware
     
    $ ls ${HOME}/Arduino/hardware
    alt_ti  Arduino_STM32  grumpy
    $ ls /home/kimballr/Arduino/hardware/alt_ti/
    tivac
    $ ls /home/kimballr/Arduino/hardware/alt_ti/tivac
    boards.txt  extras     platform.txt     README.md  tools
    cores       libraries  programmers.txt  system     variants
     
    I didn't have to change anything in platform.txt for this to work.
     
    The directory above shows my hacked version of the tivac-core: https://github.com/RickKimball/tivac-core
     
    But you probably want to use the real one: https://github.com/energia/tivac-core.git
    $ mkdir /home/kimballr/Arduino/hardware/ti $ cd /home/kimballr/Arduino/hardware/ti $ git clone https://github.com/energia/tivac-core.git tivac Cloning into 'tivac'... remote: Counting objects: 677, done. remote: Total 677 (delta 0), reused 0 (delta 0), pack-reused 676 Receiving objects: 100% (677/677), 2.84 MiB | 0 bytes/s, done. Resolving deltas: 100% (128/128), done. Checking connectivity... done. $ ls tivac boards.txt  extras     platform.txt     README.md  variants cores       libraries  programmers.txt  system $ -rick
  4. Like
    reaper7 got a reaction from Fmilburn in JSON file for installation on the Arduino IDE?   
    I use arduino ide with latest cores for msp430/tivac/cc3200
    This is my folders structure (inside arduino instalation directory):

     
    so, inside hardware folder I add:
    1. energia directory and inside this dir I have git clones my fav cores (msp430/tivac/cc3200),
    2. into existing directory tools I copy from new energia ide: 
      - arm-none-eabi-gcc
      - cc3200prog
      - DSLite
      - msp430
     
    I did a little fix inside platform.txt files for all cores...for e.g (msp430) - sorry but only hardcoded paths:
    - new line after version=x.x.x and before # AVR compile variables
    runtime.tools.msp430-gcc.path=C:/PROGRAMY/Arduino/hardware/tools/msp430 - replace:
    from:
    tools.dslite.path={runtime.tools.dslite.path} to:
    tools.dslite.path=C:/PROGRAMY/Arduino/hardware/tools/DSLite - replace:
    from:
    tools.mspdebug.path={runtime.tools.mspdebug.path} to:
    tools.mspdebug.path=C:/PROGRAMY/Arduino/hardware/tools/msp430  
  5. Like
    reaper7 reacted to B@tto in [Energia library] Wiznet W5100/W5200/W5500   
    Hi,
     
    As it seems to work on MSP430 device like MSP430F5529, I share it here too :
     
    http://forum.43oh.com/topic/9858-energia-library-wiznet-w5100w5200w5500/
     
    Ethernet_Wiznet.zip
  6. Like
    reaper7 reacted to B@tto in [Energia library] Wiznet W5100/W5200/W5500   
    Hi all,
     
    It was a real pain in the ass to find information about interfacing LP + Wiznet ethernet chip with energia so I'm here to share my work.
     
    I was looking for a library for ethernet chips from Wiznet (W5100,W5200,W5500) for TivaC series LP. The first problem I met was that as TM4C129 LP already has an ethernet.h library, I simply could not copy a new ethernet.h library for non-ethernet
    Ethernet_Wiznet.zip
  7. Like
    reaper7 reacted to yosh in Custom MSP430-Board for EasyDriver   
    Hi @@qgs ...
     
    attached you will find the Diptrace file for the PCB. The layout (regarding the MCU) is for G2452/G2553.
     
    EasyDriverMSP430.zip
     
    The simple Energia sketch (not cleaned up, hopefully self explaining, but working) I used to start/stop/reverse my stepper motor is here:
    const int buttonPin = P1_0; //Button for start/stop/reverseconst int DIR_PIN = P2_2;const int STEP_PIN = P2_1;//Motor stateint motorState = 1; // 0/2 = STOP, 1 = CW, 3 = CCW//Buttonint buttonState;int lastButtonState = LOW;long lastDebounceTime = 0;const int debounceDelay = 500;void setup() { //Set EasyDriver Pins for DIR and STEP pinMode(DIR_PIN, OUTPUT); pinMode(STEP_PIN, OUTPUT); digitalWrite(DIR_PIN, HIGH); digitalWrite(STEP_PIN, LOW); //Set Full-Step Mode -> MS1/MS2 (0,0) on EasyDriver connected to P2_0 and P2_3 on MSP430 pinMode(P2_0, OUTPUT); pinMode(P2_3, OUTPUT); digitalWrite(P2_0, LOW); digitalWrite(P2_3, LOW); //Enable - EasyDriver Enable-Pin is connected to P1_5 on MSP430 pinMode(P1_5, OUTPUT); digitalWrite(P1_5, LOW); //Button pinMode(buttonPin, INPUT_PULLUP); }const int timing = 590; //delay in
  8. Like
    reaper7 reacted to energia in Energia 1.6.10E18B6 Beta available   
    Hello all,

     

    Wanted to let you know that I have a beta available of Energia 18 which is based on the latest and greatest Arduino IDE. If you would like to give it a spin, then the instructions for each OS are below. Would be great if you could post any issues you come across while you try it out.

     

    Please post general questions about this beta in this thread. Post issues for each part below on github. While you try it and find issues, please check the github issues pages to check if the bug has not already been reported before you file it.

     

    MSP430: https://github.com/energia/msp430-lg-core/issues

    MSP432: https://github.com/energia/msp432-core/issues

    TivaC: https://github.com/energia/tivac-core/issues

    CC3200: https://github.com/energia/cc3200-core/issues

    IDE: https://github.com/robertinant/EnergiaNG/issues

     

    If you have never used Energia, then you will need to install the drivers for your OS as per the guide posted here: http://energia.nu/guide/

     

    Energia 18 instructions:

     

    All previous beta
  9. Like
    reaper7 got a reaction from monsonite in [Energia Library] EtherEncLib for ENC28J60   
    This is a very simple enc28j60 library created by Renato Aloi for atmega
    modifed by me for MSP430G2553 and MSP430F5529
     
    Please, check my latest master fork from Renato Aloi newMods branch
    or download directly v0.4.2:
    EtherEncLib-0.4.2.zip   fix CS, fix examples, disable debug from tcpstack
    EtherEncLib-0.4.zip     only harware SPI version (MSP430G2553 and MSP430F5529 tested)
    EtherEncLib_v03.zip - hard/soft spi version
    EtherEncLib_v2.zip - hardware spi version
    EtherEncLib_v01.zip - softspi version
     
    v03: selectable hardware/software spi
    all definitions moved to EtherEncLib.h lines 17,18 -> select between hard/soft spi lines 21,23-25 -> SPI pins definition for MSP430 lines 28,30-32,34 -> SPI pins definition for Stellaris & Tiva(?)  
    v02: hardware spi version
    enctypes.h file contains CS pins definition (lines 247, 250)  
    v01: init version
    At this moment, after my quick mod, spi communication work on softspi (shiftOut/shiftIn) and replace strange arduino access via registers like SPDR etc... So...shiftOut/shiftIn are not so fast enctypes.h file contains pins definition (lines 247-259)  
    description from EtherEncLib.cpp file:
     



  10. Like
    reaper7 reacted to chicken in [Energia Library] EtherEncLib for ENC28J60   
    @@reaper7 A sorry, didn't pay attention to the whole thread.
     
    PSTR is Atmel's way to identify pointers to program memory. Energia has a define somewhere to ignore PSTR. So F() in the end does nothing to the string pointer. It doesn't have to, thanks to MSP430's sane memory model.
     
    F() can safely be left away for MSP430.
  11. Like
    reaper7 got a reaction from yosh in [Energia Library] EtherEncLib for ENC28J60   
    @@chicken - as I wrote above F("zzz") is declared in WString.h as:
    #define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal))) @@DanielPHuber - I don't know if F is necessary for MSP and even I don't go deep into it (FlashStringHelper or PSTR) if the library compiled and works
    I don't know too how (or even) this affects performance and/or memory usage.
     
    Can You tests memory usage and performance with and without "F" ?
  12. Like
    reaper7 got a reaction from Fmilburn in [Energia Library] EtherEncLib for ENC28J60   
    @DanielPHuber
     
    1. "F" is declared in ...cores/msp430/WString.h and generally refers to strings stored in flash memory.
    If You can know more, read about FlashStringHelper and PSTR
     
    2. This lib uses "user defined" CS pin and control it from library, not from msp hardware
    of course You can change it to other pin but remember, that You must change this in two places:
    - in Your sketch, through properly set pin mode eg:  pinMode(10,OUTPUT)
    - in enc28typedef.h inside this library folder: #define ENC28J60_CONTROL_CS    10
    At this moment personally I use pin 13 and it works too
     
     
    so...I can move CS pin mode initialization to library (remove pinMode from user sketch),
    this is almost done but at this moment this mod is commented and I want to maintain the highest compliance with the original library.
  13. Like
    reaper7 reacted to yosh in AD9850 Frequency Generator BoosterPack   
    Got my AD9850 BP PCBs from Oshpark these days ... thanks again for sharing your project there @@Fmilburn
     
    So I have two PCBs I could give away to active members (let's say 20 posts+ ? ... hope this is ok !?) ... I would send them for free inside Europe, no problem.
  14. Like
    reaper7 got a reaction from yosh in [Energia Library] EtherEncLib for ENC28J60   
    @DanielPHuber
     
    1. "F" is declared in ...cores/msp430/WString.h and generally refers to strings stored in flash memory.
    If You can know more, read about FlashStringHelper and PSTR
     
    2. This lib uses "user defined" CS pin and control it from library, not from msp hardware
    of course You can change it to other pin but remember, that You must change this in two places:
    - in Your sketch, through properly set pin mode eg:  pinMode(10,OUTPUT)
    - in enc28typedef.h inside this library folder: #define ENC28J60_CONTROL_CS    10
    At this moment personally I use pin 13 and it works too
     
     
    so...I can move CS pin mode initialization to library (remove pinMode from user sketch),
    this is almost done but at this moment this mod is commented and I want to maintain the highest compliance with the original library.
  15. Like
    reaper7 reacted to Fmilburn in AD9850 Frequency Generator BoosterPack   
    This project uses an inexpensive AD9850 board obtained off eBay to create a frequency generator boosterpack that is especially useful with the MSP-EXP430FR6989 LaunchPad. It features an encoder with a pushbutton to adjust frequency. In the photo below it is generating a 7000 Hz signal which agrees nicely with the oscilloscope.

    The schematic is simple:

    The encoder is a Bourns 652-PEC12R-4225F-S24. I tried various arrangements and value of resistors and capacitors for debouncing the encoder and switch. In the end I just added some capacitance as shown in the schematic. On the oscilloscope it looked pretty clean so I called it good enough. All the parts are through hole as seen in the photograph below:

    The fit is tight but fortunately all the materials were on hand when the PCB was being designed so I printed out a paper PCB outline and checked it before ordering.

    If I were making it again I would increase the size of the board a bit to allow larger/additional labels. Otherwise, everything works and it turned out fine. This is a picture of the unpopulated boards I received from Osh Park.

    While it should work with most LaunchPads I had the FR6989 in mind as I developed it - in particular I wanted to use the integrated LCD display. Accordingly, I was careful not to obscure the display or the reset button. The software was developed with Energia V17. Here is a photo of what it looks like in operation:

    The output from the AD9850 comes out the jumpers attached to the 90 degree male header pins marked with arrow A. The dark jumper wire is GND and the sine wave is coming out of the lighter wire on the right. Adjustments are made with the encoder knob marked by arrow B. Turning it adjusts the frequency up and down and the current value is output on the LCD as shown by the arrow C. The range is from zero to 32 MHz. Since fine adjustment is desired, as well as rapid adjustment, the push button on the encoder is used to change the coarseness of the adjustment. The magnitude is indicated by the battery indicator on the LCD as shown by arrow D. For example, in the photo three battery bars are showing which indicates that each adjustment/click of the encoder will change the output by 1000 Hz. When the encoder is pushed down it will cycle through in this case to 100 Hz adjustment (with two bars showing), 10 Hz (one bar), 1 Hz (no bars), and then up to 1 MHz (six bars), and so on. In practice, it adjusts pretty quickly with good resolution.
     
    One enhancement might be to have the software scroll the output value since as is it won't display full resolution due to the 6 digit screen. The Energia sketch can be found here.
     
    I have an extra PCB so if you are active in the 43oh forums and would like it then send me a personal message and I will mail it gratis.
  16. Like
    reaper7 reacted to michanisani in link to simple energia OTA for CC3200   
    https://github.com/michanisani/CC3200-OTA
  17. Like
    reaper7 got a reaction from froggy in TM4c1294 - Program over Ethernet with LM Flash Utility   
    holy cow - it's working
     
    it is possible to add this programming method to energia?
  18. Like
    reaper7 got a reaction from bluehash in TM4c1294 - Program over Ethernet with LM Flash Utility   
    holy cow - it's working
     
    it is possible to add this programming method to energia?
  19. Like
    reaper7 reacted to energia in TM4c1294 - Program over Ethernet with LM Flash Utility   
    Awesome that you got it to work!! I'll give it a try and include it in Energia as an example.
  20. Like
    reaper7 reacted to froggy in TM4c1294 - Program over Ethernet with LM Flash Utility   
    Thanks for the starting point there. The calls to Swupdate don't seem to be working since the LM Flash Utility still hangs on the "trying to connect". Starting the MAC/PHY with the "SoftwareUpdateInit()" function, my callback function is called as expected. I get the same behavior with the Energia UDP/Ethernet libraries where I can see the "magic update packet". 
     
    I suspect that the issue is that I don't have the proper Ethernet Bootloader installed, but can't seem to find any information on how to install/build it. Any idea how I can install the Ethernet Bootloader/include it in my projects?
     
     
    Comment block from SoftwareUpdateBegin():
     
    //*****************************************************************************
    //
    //! Passes control to the bootloader and initiates a remote software update
    //! over Ethernet.
    //!
    //! This function passes control to the bootloader and initiates an update of
    //! the main application firmware image via BOOTP across Ethernet.  This
    //! function may only be used on parts supporting Ethernet and in cases where
    //! the Ethernet boot loader is in use alongside the main application image.
    //! It must not be called in interrupt context.
    //!
    //! Applications wishing to make use of this function must be built to
    //! operate with the bootloader.  If this function is called on a system
    //! which does not include the bootloader, the results are unpredictable.
    //!
    //! \note It is not safe to call this function from within the callback
    //! provided on the initial call to SoftwareUpdateInit().  The application
    //! must use the callback to signal a pending update (assuming the update is to
    //! be permitted) to some other code running in a non-interrupt context.
    //!
    //! \return Never returns.
     
    EDIT:
     
    I got the Ethernet update to work by making a few modifications to the SwUpdate.c file. For whatever reason (I didn't really bother looking into this part...), the defines aren't set to use the ROM based Ethernet bootloader in the SoftwareUpdateBegin function, and the ROM Ethernet functions aren't defined in Energia 017's "rom.h" file. The latest version of TivaWare (TivaWare_C_Series-2.1.2.111) does provide the proper definitions for it. I simply added the necessary defines to call the ROM_UpdateEMAC and forced the code to use that, instead of the flash bootloader based update system. It also seems to be important that the MAC address set by the Ethernet library matches the MAC address programmed into user registers (by default this is what is on the sticker on the board).
     
    Anyways, I've attached a working Energia example with support for updates over Ethernet. 
    EthSwupdate.zip
  21. Like
    reaper7 reacted to yosh in ESP8266 with MSP430G2553 launchpad   
    Try using pins 3 and 4 for the ESP : use jumper wire from these pins to connect to the ESP. Then remove the RX TX jumpers from the Launchpad (the most left one and the one next to it). Use softwareserial(e.g. on Pins 5 and 6 with 9600 baud) for debugging : connect the pins 5 and 6 e.g. with jumper wires to the pins where you have removed the jumpers.
  22. Like
    reaper7 reacted to yosh in Help   
    The 47k reset (pull up) resistor need to be connected to VCC ... this pin (it's Pin 16!) tied to GND causes reset.
     
    Please check this: Pinout
  23. Like
    reaper7 got a reaction from yosh in Energia very slow after update to Windows 10   
    I had similar problem.
    Everything worked properly when my w7 got first updated to w10 (around July 2015)
    but in December, w10 got new version (compilation 10586 I think)
    and all TI drivers for 430, 5529, stellaris (and more specifically COM's) inside devices manager was yellow triangle on icons.
    I try many times remove drivers and reinstall (with disabled driver signed chcecking) but without success
    Fortunately I bought new ssd for system and after full w10 instalation and install (on clean system) TI drivers
    everythig works OK now.
  24. Like
    reaper7 got a reaction from yosh in Porting Energia to MSP430G2755, 2855 and 2955?   
    @@BigVulcanDeal - please check my github https://github.com/reaper7/energia_msp430g2955_yoshpad
    This repo is for YoshPad board but You can easy adapt it for Your solution.
     
    Good luck!
  25. Like
    reaper7 reacted to yosh in Porting Energia to MSP430G2755, 2855 and 2955?   
    Hi
     
    Just search the forum, I only have tapatalk by hand, but porting for 2955 was already done for Energia. I (together with @@reaper7 ) e.g. used 2955s for some projects. Adaption for the other two should be straight forward.
     
    Kind regards
×
×
  • Create New...