Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Thanks
    jazz reacted to LIJsselstein in [RESOLVED] Adding new mcu to Energia   
    As a form of documenting... I just added another new MCU to Energia and -in short- had to do the following to get it working:
    In Energia 1.8.7E21:
    Copy from a close family member the following files and replace the model name with the new model name in the directory-/filename and file content:
    \hardware\energia\msp430\variants\[existing-model]\ \hardware\tools\DSLite\common\targetdb\devices\[existing-model].xml \hardware\tools\DSLite\common\targetdb\options\[existing-model]_GNU.xml \hardware\tools\DSLite\common\targetdb\options\[existing-model]_TI.xml \hardware\tools\msp430\msp430\lib\ldscripts\[existing-model]\ \hardware\tools\msp430\msp430\include\[existing-model].h Add the new model to the following files:
    \hardware\energia\msp430\boards.txt \hardware\tools\msp430\msp430\include\msp430.h \hardware\tools\msp430\msp430\lib\msp430mcu.spec Of course, check for differences between the two family members (e.g. missing or added peripherals, memory sizes) and edit the copied files accordingly.
    After the above changes it might help to remove the temporary build tree. These are located in ~/.energia15 for Linux and  %userprofile%\appdata\local\Energia15 for Windows.
  2. Thanks
    jazz reacted to Peabody in Modified BSL-Scripter for Windows now works with FTDI and other USB-to-UART adapters   
    A new WIN32 version of BSL-Scripter.exe has been compiled which allows BSL flashing using generic USB-to-UART adapters such as the FT232, CP2102 and CH430 as the hardware interface.  It can be used with MSP430 F5xx F6xx, and FRxx parts with UART BSL.
    This version has a new MODE line option "INVOKE", which causes Scripter to directly generate the BSL hardware invocation sequence on the adapter's DTR and RTS outputs, which in turn are connected to the /Reset and Test pins on the target device.  It produces the pattern shown in Figure 2 of slau319w.pdf and slau550s.pdf, which is normally generated by the Rocket or MSP-FET.  If the INVOKE option is used, you must include the PARITY option as well.
    I have successfully tested the new Scripter on an MSP430FR2311 using all three adapter types.  It would be helpful if others could test other relevant MSP430 parts and report the results.
    This has finally come about as a result of the generous efforts nagaokanchi, also known as "drcrane" on Github, who not only got TI's source code to compile with new versions of all the dependencies, but also navigated the mysteries of BOOST to control the DTR and RTS lines.  The new Scripter and a related Instructions file are contained in "BSL-Scripter-v3.4.1.zip" in the Releases folder of his repository, which also contains the source code:
    For those who must run an official TI version of Scripter, I will leave on my Github the now-deprecated kludge option for using these adapters with the official Scripter, but of course it requires either manual intervention or an additional circuit:
    And finally, a reminder that the older MSP430 parts which use BSLDEMO2 for flashing, including the F1xx, F2xx, F4xx, and G2xx parts with BSL, can also be flashed with these adapters if a modified version of BSLDEMO is used, such as the "BSLDEMO-2.01C.exe" found in my other repo:
    Texas Instruments has neither reviewed nor approved any of this. But I continue to hope TI will officially make similar changes to BSL-Scripter and BSLDEMO to support the use of these generic adapters.

  3. Thanks
    jazz got a reaction from Fmilburn in Multiplexing 7-segment displays by segment   
    This is OK, but my MSP430G2533 7-segment working (multiplexing) digit-by-digit without resistors. Current (and brightness) is handled by PWM (WD). Device (PDIP) is mounted under the display.

  4. Thanks
    jazz reacted to Peabody in Multiplexing 7-segment displays by segment   
    In case it might be of use to someone, I've posted a Youtube video and created a Github repo dealing with an alternate way of multiplexing 7-segment displays that has a greatly reduced parts count.  It's multiplexing by segment instead of by digit.  The video shows this method implemented with an MSP430G2553.  The Github repo has demonstration Arduino Nano sketches, but they should work as-is with Energia except for the pin assignments.  The video is on my local OSH group's channel, and I can't respond to comments there, but will answer questions here if there are any.
  5. Thanks
    jazz got a reaction from veryalive in Add MSP432 support to Arduino?   
    This is TI. Go back with your IDE version, and board should work just fine.
  6. Like
    jazz got a reaction from Rickta59 in Supported MSP430's   
    BTW, If you don't want to design board right now, I have 2 breakout boards left,  for MSP430x2xx 38 pin TSSOP devices.

  7. Thanks
    jazz got a reaction from dubnet in Upload firmware code using Energia   
    This is device without SBW support, so firmware can be uploaded only by master device that support full JTAG connection (TI MSP-FET or MSP-FET430UIF), not by Launchpads. This device is with UART BSL, but AFAIK Energia  (by default) doesn't support this. However, if you are fine with using BSL, than customized command line for flashing, for TI BSL_Scripter can be inserted inside Energia, and firmware can be uploaded by IDE button. I explained similar thing here...
  8. Thanks
    jazz got a reaction from Fmilburn in Upload firmware code using Energia   
    This is device without SBW support, so firmware can be uploaded only by master device that support full JTAG connection (TI MSP-FET or MSP-FET430UIF), not by Launchpads. This device is with UART BSL, but AFAIK Energia  (by default) doesn't support this. However, if you are fine with using BSL, than customized command line for flashing, for TI BSL_Scripter can be inserted inside Energia, and firmware can be uploaded by IDE button. I explained similar thing here...
  9. Thanks
    jazz got a reaction from Dale in What are input-output signal conditioning best practices on interface boards?   
    Unfortunately, this things must be analyzed with scope and on board modification until (almost) perfect signal shape is found.
  10. Like
    jazz got a reaction from NurseBob in MSP430F5529 USB HID Example for Energia   
    There is C open source TI USB stack with examples (with one that you need is included)...
    Supported by CCS or IAR, not Energia.
  11. Like
    jazz reacted to Peabody in BSL for G2553 and G2231 using embedded USB-Serial adapter   
    I originally posted about this in October, but wanted to report that I've updated the G2553 special BSL entry code to fix a bug.  Everything is included in my Github repository:
    To review,  this project deals with the MSP430G Value Line processors, and was prompted by the idea of embedding a CP2102 USB-to-Serial adapter in a project's circuit rather than hooking one up through a pin header, or using the Launchpad for JTAG flashing.  So all you would need to flash new firmware is a USB cable and the right software.  A detailed description of what's involved is in the long-winded PDF file.  The PDF deals with the much-despised BSL password in the G2553 ROM-based BSL, and offers a couple ways around it, including special boot code that fits entirely in the INFOA segment along with the existing calibration data, and lets you run BSL with INFOA protected from erasure, which means you can flash new firmware without knowing the password, and without erasing the calibration data.

    There's also a complete custom BSL system for the lowly G2231, which has no built-in BSL.  Included are installers for the chip and the PC software to drive the process.  And there's a discussion of circuit design for using embedded adapters or modules containing them.

    The installers for the chips use the Naken assembler, and the PC software uses the LCC compiler.  But the repo includes both the source code and the executables for everything, so assembler-phobes can just flash the hex files.

    There are two small bonuses - a VBScript for Windows that converts an IntelHex file to TI-TXT format, and as part of the BSL installation for the G2231, the calibration values for 8, 12 and 16 MHz are derived from the existing 1 MHz calibration value, with no crystal required, and saved in the usual places in INFOA (based on original work by Steve Gibson).

    I did the original work on this for a project, and decided I might as well write it up in case it might be useful to others at some point.  The Value Line processors are kinda old school now, but are still available in DIP, and are still pretty popular.  And the circuit design portion may be more generally useful.

    Of course I'd like to know about any bugs or errors anyone may find.  Hope this will be useful.

  12. Like
    jazz got a reaction from NurseBob in Does Energia support JTAG?   
    You just need to edit configuration (text) files, and then Energia will call external CLI application (MSP430-Flasher) for downloading code. Interface between TI FET an target device will be handled by MSP430-Flasher that will automatically detect connected FET, not by Energia anymore. Downloading code will be done by upload button on original / unmodified Interface, simple as it is. It is all explained here, but instead my flasher, command line parameters for MSP430-Flasher should be used.
  13. Like
    jazz got a reaction from NurseBob in Does Energia support JTAG?   
    AFAIK, any LP is with virtual com port, that is not needed by Energia. I didn't noticed any Energia popup with something like "missing virtual com port", when there was no virtual com port available. As I allready noted, I don't see any problems related to downloading code by SBW with MSP430-Flasher by any LP. Problem is in missing Energia header / library files for unsupported devices.
  14. Like
    jazz reacted to Peabody in BSL for G2553 and G2231 using embedded USB-Serial adapter   
    Last summer I worked on the idea of embedding a USB-to-Serial adapter in Value Line projects so firmware revisions could be done with only a USB cable and the right software, without needing a Launchpad.  The adapter chips and modules containing them are now so inexpensive that this makes sense.  On the chance that it might be useful to someone, I've written it all up and posted it to Github:
    The project is summarized in the README, and explained in detail, with needed software and hardware, in the PDF.
  15. Like
    jazz got a reaction from bluehash in How do you program the G2553 on Linux nowadays?   
    Stand alone software/hardware solution, that is working on any Linux I tried, and can be integrated in Energia.
  16. Like
    jazz got a reaction from NurseBob in Taking a Class on MSP430s   
    MSP430F51x2 are 5V tolerant.
    FET-430UIF is stone age device, extremely slow, with FET same as on G2 LP.
    TI is working right now on hardware revision of MSP-FET, so if you want to buy one, be sure that this one is with new hardware revision.
    For low cost entry to MSP430 world, my advice is always for MSP430F5529 LP with updatable and open software / hardware design. Never for old and slow, closed and not updatable G2 LP (or any other board version with integrated this old FET).
  17. Like
    jazz got a reaction from bluehash in interfacing SD card with msp430f5529 launch pas   
    BTW, there is SD card open source example for MSP430F5529 inside TI USB stack (http://www.ti.com/tool/msp430usbdevpack). It is possible to plug MSP430F5529 by USB to PC and device will be enumerated as disk, with log file on it, that can be opened by notepad.
  18. Like
    jazz reacted to johnsondavies in A compact Lisp interpreter for the MSP430   
    My compact Lisp interpreter, uLisp, now supports the MSP430F5529 and MSP430FR5969 LaunchPads.
    As well as supporting a core set of Lisp functions, uLisp includes Arduino/Energia extensions, making it ideal as a control language for the MSP430.
    For more information see http://www.ulisp.com/.
  19. Like
    jazz reacted to tripwire in Casio watch rebuild w/ MSP430   
    It looks like the author also made a tool to use EnergyTrace without needing to install CCS, might be worth a look:
  20. Like
    jazz reacted to Rei Vilo in Where do I find the Script that runs after clicking Upload   
    See boards.txt, platform.txt and programmers.txt.
    Exact location on the hard-disk depends on the OS you use.
  21. Like
    jazz reacted to maelli01 in micropower microvoltmeter with MSP430FR4133 and MCP3422 ADC   
    Autoranging microvoltmeter based on the MSP430FR4133 launchpad.
    ADC used: MIcrochip MCP3422, an 18bit, 3.75 sample/second Sigma Delta with 2 differential inputs. I2C interface
    This nice little chip contains a programmable amplifier (x2,x4,x8) and a not-too-bad internal reference of 2.048V.
    Max input range is +/-2.048V, resolution (8x amplified) is 2uV.
    Hand-etched a single layer PCB which goes on top of Launchpad.

    Type K cable in hot water: 2.93mV, 73Kelvin temp difference to ambient

    compare with my Fluke 289, 0.06% (datasheet says 0.05% typical, 0.35% max)
    Not too shabby for a chip that costs 3 bucks.

    Current consumption: on average <40uA, the whole setup would run 5000hours from a CR2032
    The ADC does 1 sample/second and sleeps the rest of the time, the MSP430 does what it likes the most: sleep in LPM3
    Code is not a big deal, quick hack based on the FR4133 examples, for the LCD and for the I2C interface 
    //microvolt meter with MCP3422 and MSP430FR413 //****************************************************************************** #include <msp430.h> #define LCDMEMW ((int*)LCDMEM) #define pos1 4 // Digit A1 - L4 #define pos2 6 // Digit A2 - L6 #define pos3 8 // Digit A3 - L8 #define pos4 10 // Digit A4 - L10 #define pos5 2 // Digit A5 - L2 #define pos6 18 // Digit A6 - L18 const char digit[10] ={ 0xFC, // "0" 0x60, // "1" 0xDB, // "2" 0xF3, // "3" 0x67, // "4" 0xB7, // "5" 0xBF, // "6" 0xE0, // "7" 0xFF, // "8" 0xF7 // "9" }; volatile long voltage; unsigned long dvoltage; unsigned char TXByteCtr; unsigned char TXData; unsigned char newgain,gain; void Clear_LCD(){ int i; for(i=5;i;i--) LCDMEMW[i]=0; LCDMEMW[9]=0; } int main( void ) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer P1OUT = 0x00;P2OUT = 0x00;P3OUT = 0x00;P4OUT = 0x00; P5OUT = 0x00;P6OUT = 0x00;P7OUT = 0x00;P8OUT = 0x00; P1DIR = 0xFF;P2DIR = 0xFF;P3DIR = 0xFF;P4DIR = 0xFF; P5DIR = 0xFF;P6DIR = 0xFF;P7DIR = 0xFF;P8DIR = 0xFF; P5SEL0 |= BIT2 | BIT3; // I2C pins // Configure XT1 oscillator P4SEL0 |= BIT1 | BIT2; // P4.2~P4.1: crystal pins do { CSCTL7 &= ~(XT1OFFG | DCOFFG); // Clear XT1 and DCO fault flag SFRIFG1 &= ~OFIFG; } while (SFRIFG1 & OFIFG); // Test oscillator fault flag // Disable the GPIO power-on default high-impedance mode // to activate previously configured port settings PM5CTL0 &= ~LOCKLPM5; CSCTL4 = SELMS__DCOCLKDIV + SELA__XT1CLK; // MCLK=SMCLK=DCO; ACLK=XT1 // Configure RTC RTCCTL |= RTCSS__XT1CLK | RTCIE; // Initialize RTC to use XT1 and enable RTC interrupt RTCMOD = 16384; // Set RTC modulo to 16384 to trigger interrupt twice a second // Configure LCD pins SYSCFG2 |= LCDPCTL; // R13/R23/R33/LCDCAP0/LCDCAP1 pins selected LCDPCTL0 = 0xFFFF; LCDPCTL1 = 0x07FF; LCDPCTL2 = 0x00F0; // L0~L26 & L36~L39 pins selected LCDCTL0 = LCDSSEL_0 | LCDDIV_7; // flcd ref freq is xtclk // LCD Operation - Mode 3, internal 3.08v, charge pump 256Hz LCDVCTL = LCDCPEN | LCDREFEN | VLCD_5 | (LCDCPFSEL0 | LCDCPFSEL1 | LCDCPFSEL2 | LCDCPFSEL3); LCDMEMCTL |= LCDCLRM; // Clear LCD memory LCDCSSEL0 = 0x000F; // Configure COMs and SEGs LCDCSSEL1 = 0x0000; // L0, L1, L2, L3: COM pins LCDCSSEL2 = 0x0000; LCDM0 = 0x21; // L0 = COM0, L1 = COM1 LCDM1 = 0x84; // L2 = COM2, L3 = COM3 LCDCTL0 |= LCD4MUX | LCDON; // Turn on LCD, 4-mux selected (LCD4MUX also includes LCDSON) Clear_LCD(); // Configure USCI_B0 for I2C mode UCB0CTLW0 |= UCSWRST; // Software reset enabled UCB0CTLW0 |= UCMODE_3 | UCMST | UCSYNC; // I2C mode, Master mode, sync UCB0CTLW1 |= UCASTP_2; // Automatic stop generated // after UCB0TBCNT is reached UCB0BRW = 0x0008; // baudrate = SMCLK / 8 UCB0I2CSA = 0x0068; // Slave address UCB0CTL1 &= ~UCSWRST; UCB0IE |= UCRXIE | UCNACKIE | UCBCNTIE | UCTXIE0; while(1){ // P1OUT |= BIT0; TXByteCtr = 1; // Load TX byte counter TXData = 0x8C+gain; while (UCB0CTLW0 & UCTXSTP); // Ensure stop condition got sent UCB0CTLW0 |= UCTR | UCTXSTT; // I2C TX, start condition // P1OUT &= ~BIT0; __bis_SR_register(LPM3_bits | GIE); // timer will wake me up // P1OUT |= BIT0; UCB0TBCNT = 0x0003; // 3 bytes to be received voltage=0; UCB0CTLW0 &= ~UCTR; while (UCB0CTL1 & UCTXSTP); // Ensure stop condition got sent UCB0CTL1 |= UCTXSTT; // I2C start condition __bis_SR_register(LPM3_bits | GIE); // I2C irq will wake me up voltage<<=8; // shift to left corner to do the sign correctly voltage/=32; // calibration is done here: 2048 in an ideal world if ((voltage<400000)&&(voltage>(-400000))){ // autoranging, downshift if (newgain<3) newgain++; } if ((voltage>1000000)||(voltage<-1000000)){ // autoranging, upshift if (newgain) newgain--; } voltage>>=gain; gain=newgain; if ((voltage<500000)&&(voltage>-500000)){ voltage*=10; //low range LCDMEM[11]&=~1; //adjust decimal point LCDMEM[9]|=1; } else{ //high range LCDMEM[9]&=~1; //adjust decimal point LCDMEM[11]|=1; } voltage*=25; voltage/=128; if (voltage<0) {dvoltage=-voltage; LCDMEM[5]|=4 ;} //negative else {dvoltage= voltage; LCDMEM[5]&=~4;} //positive LCDMEM[pos1] = digit[(dvoltage / 100000)%10]; LCDMEM[pos2] = digit[(dvoltage / 10000)%10]; LCDMEM[pos3] = digit[(dvoltage / 1000)%10]; LCDMEM[pos4] = digit[(dvoltage / 100)%10]; LCDMEM[pos5] = digit[(dvoltage / 10)%10]; LCDMEM[pos6] = digit[dvoltage % 10]; // P1OUT &= ~BIT0; __bis_SR_register(LPM3_bits | GIE); // timer will wake me up } } #pragma vector = RTC_VECTOR __interrupt void RTC_ISR(void){ switch(__even_in_range(RTCIV, RTCIV_RTCIF)){ case RTCIV_NONE: break; // No interrupt case RTCIV_RTCIF: // RTC Overflow __bic_SR_register_on_exit(LPM3_bits); break; default: break; } } #pragma vector = USCI_B0_VECTOR __interrupt void USCIB0_ISR(void){ switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG)){ case USCI_NONE: break; // Vector 0: No interrupts case USCI_I2C_UCALIFG: break; // Vector 2: ALIFG case USCI_I2C_UCNACKIFG: // Vector 4: NACKIFG UCB0CTL1 |= UCTXSTT; // I2C start condition break; case USCI_I2C_UCSTTIFG: break; // Vector 6: STTIFG case USCI_I2C_UCSTPIFG: break; // Vector 8: STPIFG case USCI_I2C_UCRXIFG3: break; // Vector 10: RXIFG3 case USCI_I2C_UCTXIFG3: break; // Vector 14: TXIFG3 case USCI_I2C_UCRXIFG2: break; // Vector 16: RXIFG2 case USCI_I2C_UCTXIFG2: break; // Vector 18: TXIFG2 case USCI_I2C_UCRXIFG1: break; // Vector 20: RXIFG1 case USCI_I2C_UCTXIFG1: break; // Vector 22: TXIFG1 case USCI_I2C_UCRXIFG0: // Vector 24: RXIFG0 voltage=(voltage<<8)+UCB0RXBUF; break; case USCI_I2C_UCTXIFG0: // Vector 26: TXIFG0 if (TXByteCtr){ // Check TX byte counter UCB0TXBUF = TXData; // Load TX buffer TXByteCtr--; // Decrement TX byte counter } else{ UCB0CTLW0 |= UCTXSTP; // I2C stop condition UCB0IFG &= ~UCTXIFG; // Clear USCI_B0 TX int flag } break; case USCI_I2C_UCBCNTIFG: // Vector 28: BCNTIFG __bic_SR_register_on_exit(LPM3_bits); break; case USCI_I2C_UCCLTOIFG: break; // Vector 30: clock low timeout case USCI_I2C_UCBIT9IFG: break; // Vector 32: 9th bit default: break; } }
  22. Like
    jazz reacted to zeke in DSO138 - Oscilloscope Kit   
    I found this DSO138 oscilloscope kit on HobbyKing today.
    It may be of use to some people out there who do have a limited test equipment budget.
    From what I can tell, it looks like you have to solder in all of the through hole parts to complete the build. And I think the processor comes pre-programmed.
    I don't own one of these. I just thought it was a cool and inexpensive tool for only $20.
  23. Like
    jazz got a reaction from zeke in SBW MSP430F550x based programmer   
    It is completed. Board size is 3.8 x 3.8 cm (1.5 x 1.5 in).

    Only CLI (open source) executable is needed on OS side, no dll / driver / installation, except (unsigned) inf file for Windows.
    Basic version and version with Mailbox / UART / I2C bridges working on:
    any Linux I tried: Ubuntu from 10 till 16, Fedora Workstation x86_64 23.10, openSUSE Leap 42.1 x86_64, CorePlus 6.4.1 (bootable USB stick) OS X from Lion (10.7.5) till Yosemite (10.10.5) Windows XP / 7 There will be website with all details about it. If you have any questions, let me know.
  24. Like
    jazz got a reaction from Rickta59 in Software async serial tx/rx without timer   
    Instead of breakpoint debugging I am using fast logging (http://forum.43oh.com/topic/2646-software-debugging-without-hardware-tools). On MSP430F5xx USB devices by adding one extra CDC (http://forum.43oh.com/topic/2972-sbw-msp430f550x-based-programmer/?p=25923) and on MSP430x2xx devices by hardware UART (http://forum.43oh.com/topic/2972-sbw-msp430f550x-based-programmer/?p=34398).
    Right now, working on project based on entry level MSP430x2xx devices without hardware UART, and don't like at all timer based soft UART. Code presented here is universal, with LP 9600 bps as target rate. It is too slow for debugging, and I'm not using LP locked to 9600 bps. Just removed from original code, part related to delay, and it is (almost) perfectly matched to 115200 bps with MSP430x2xx running on 1 MHz. And total code size (for UART TX) is close to nothing.
    #define DBGPDIR P1DIR #define DBGPOUT P1OUT #define DBGPBIT BIT2 ;-------------------------------------------------------------------- ; DbgInit ;-------------------------------------------------------------------- DbgInit bis.b #DBGPBIT, &DBGPDIR ; TX pin bis.b #DBGPBIT, &DBGPOUT ; TX High ret ;-------------------------------------------------------------------- ; DbgUartTX R15 -> Uart ;-------------------------------------------------------------------- DbgUartTX ; Byte R15 -> Uart ; 1000000 / 115200 = 8.681 9 CLK push.w R14 push.w R15 mov.w #DBGPBIT, R14 and.w #000FFh, R15 add.w #00300h, R15 ; Stop bit(s) jmp DbgUartTXLow ; Send start bit... DbgUartTXBit rra.w R15 ; 1 Get bit to tx, test for zero jc DbgUartTXHigh ; 2 If high... DbgUartTXLow bic.b R14, &DBGPOUT ; 4 Send zero bit jmp DbgUartTXBit ; 2 Next bit... DbgUartTXHigh bis.b R14, &DBGPOUT ; 4 Send one bit jnz DbgUartTXBit ; 2 If tx data is not zero, then more bits to send... pop.w R15 pop.w R14 ret
  25. Like
    jazz got a reaction from NurseBob in CCS Free   
    IAR making software tool for different micro families. They are living from selling this.
    TI was selling software tool for their own product. It was not possible to build code for Atmel or PIC devices by CCS, so I don't get it why it was selling at all. Only reason that I can think of is that CCS was producing 2 times faster in half size binary related to IAR.
    And yes, it is really funny that TI was selling CCS license, few days ago, packed together with old, slow, and not-updatable FET, with limited support (or not supported at all) on new OS's.
  • Create New...