Jump to content
43oh

jsolarski

Members
  • Content Count

    568
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Like
    jsolarski reacted to zeke in Using the Launchpad with a Breadboard   
    This is worth $20.00.
    This is worth $4.30.
     
    But they both do the exact same thing.
     
    Who's first in line?! :shock: 8-)
     

  2. Like
    jsolarski reacted to jazz in MSP430 USB 2 KB RAM (1C00 - 23FF)   
    For start, USB RAM description from TI datasheet:
     
    Topic is about USB RAM if USB is used (USBEN = 1).
     
    Maybe good way of coding, can be, to put all vars regarding USB (USB lib/stack) in USB RAM, and all other "main program" (not USB) vars in main RAM space. There are plenty of free space in USB RAM, that can be used without any restrictions.
     
    1C00 - 236F is EP buffer area. For typical communication (generic bulk) 1 input EP (64 bytes or 128 bytes if double buffering is used) and 1 output EP (64 bytes or 128 bytes if double buffering is used) is enough. In this case there are 1900 - 2 * 128 = 1640 free bytes in buffer area. Unfortunately, buffer area is on begging, not on the end of USB RAM. In other case (buffer area ending at 23FF) it will be easy to use free buffer space continued to main RAM (2400-...).
     
    After buffer area is space for EP0 / setup packet:

    USBSUBLK 0x2380 ; Setup Packet Block USBIEP0BUF 0x2378 ; Input endpoint_0 buffer USBOEP0BUF 0x2370 ; Output endpoint_0 buffer USBTOPBUFF 0x236F ; Top of buffer space
     
    Next is description for all output EP:

    USBOEPSIZXY_1 0x238F ; OE1 X/Y-buffer size USBOEPBCTY_1 0x238E ; OE1 Y-byte count USBOEPBBAY_1 0x238D ; OE1 Y-buffer base addr. Spare 0x238C ; Not used Spare 0x238B ; Not used USBOEPBCTX_1 0x238A ; OE1 X-byte count USBOEPBBAX_1 0x2389 ; OE1 X-buffer base addr. USBOEPCNF_1 0x2388 ; OE1 Configuration ... USBOEPSIZXY_7 0x23BF ; OE7 X/Y-buffer size USBOEPBCTY_7 0x23BE ; OE7 Y-byte count USBOEPBBAY_7 0x23BD ; OE7 Y-buffer base addr. Spare 0x23BC ; Not used Spare 0x23BB ; Not used USBOEPBCTX_7 0x23BA ; OE7 X-byte count USBOEPBBAX_7 0x23B9 ; OE7 X-buffer base addr. USBOEPCNF_7 0x23B8 ; OE7 Configuration
     
    For used EP there are 2 free bytes for each EP. If EP is not used all space regarding this EP is free.
     
    After output EP, is reserved space 23C0 - 23C7, but I made some tests, and it is also free, not reserved.
     
    Next is description for all input EP:

    USBIEPSIZXY_1 0x23CF ; IE1 X/Y-buffer size USBIEPBCTY_1 0x23CE ; IE1 Y-byte count USBIEPBBAY_1 0x23CD ; IE1 Y-buffer base addr. Spare 0x23CC ; Not used Spare 0x23CB ; Not used USBIEPBCTX_1 0x23CA ; IE1 X-byte count USBIEPBBAX_1 0x23C9 ; IE1 X-buffer base addr. USBIEPCNF_1 0x23C8 ; IE1 Configuration ... USBIEPSIZXY_7 0x23FF ; IE7 X/Y-buffer size USBIEPBCTY_7 0x23FE ; IE7 Y-byte count USBIEPBBAY_7 0x23FD ; IE7 Y-buffer base addr. Spare 0x23FC ; Not used Spare 0x23FB ; Not used USBIEPBCTX_7 0x23FA ; IE7 X-byte count USBIEPBBAX_7 0x23F9 ; IE7 X-buffer base addr. USBIEPCNF_7 0x23F8 ; IE7 Configuration
     
    For used EP there are 2 free bytes for each EP. If EP is not used all space regarding this EP is free.
     
    For example, I use with MSP430F5508 complete main 4 KB RAM (2400 - 33FF) as main EP buffer, 1 IEP (64 bytes) and 1 OEP (64 bytes) in USB RAM. Almost all space in 2 KB USB RAM is free and it is used for main program vars. SP is located at 2370.
  3. Like
    jsolarski reacted to rebeltaz in general Thank You to everyone   
    I just wanted to say Thank You to everyone here. My first project with the MSP430 looked like Mount Kilimanjaro when I started, but with y'alls help, my shop is now fully protected by an alarm system designed, built and programmed by me.
     
    Now off to my next project - a Beta Fish heater. And then... ?? Who knows!
     
    Thank You!!!
  4. Like
    jsolarski got a reaction from RobG in Sample code for Rob's f5510 usb dev board   
    quick custom definitions for IAR and CCS compatibility
     

    /* custom defines for IAR CCS syntax Used for compatibility with UBS TI API */ //released under no licence, open to the public. //By J. Solarski justin@justinstech.org #define __no_init #define __data16 #define __even_in_range(A, (A)
  5. Like
    jsolarski reacted to cubeberg in Seeed Thanksgiving giveaways   
    Seeed is giving away gifts on their facebook and twitter pages. I won a PCB coupon and free t-shirt yesterday. Better join in and spread the gifts around a bit!
  6. Like
    jsolarski reacted to Rickta59 in Coding for MSP430 in C++   
    Energia is happily using msp430-g++. Energia is an msp430 port of the Arduino IDE and core objects. You can download it here: http://energia.nu/download/ The code is open source and freely available. I think we have adopted a reasonable approach to using C++ on an embedded platform. We avoid dynamic allocation. We avoid RTTI (Run Time Type Information) and exception handling. Of course we don't use STL as it isn't even an option with msp430-g++. Most of the classes and data structures use composition over multiple inheritance. We have objects that abstract the Serial module with Timer and Hardware versions, the SPI and I2C modules with both USI and USCI. The goal being you can use the ms430g2231, ms430g2553, ms430fr5739 and the soon to be cortex-m4f chips with the same code. There are many examples available that exercise most of the peripherals on the chip. The Energia library is compatible with Arduino code and you can frequently use abitrary Arduino code you find without modification.
     
    I'd like to see us take more advantage of C++ templates in the Energia code however one of our overriding goals is to lean towards Arduino compatibility more than absolute performance. C++ templates are the most useful C++ feature you can use on embedded micros. I've previously posted experiments with fast GPIO using C++ templates. I showed some of the asm code it generates and you will find it performs as well or better than generic C with much better readability. I like using C++ templates because it frequently allows you to move run-time code to compile time code. Templates offer compile time type-safe error detection that can't be achieved with straight C code and macros. Developing C++ template code is not beginner friendly, you will get errors that make no sense. However using a well written C++ template library is easy and performs really well. Check out the I2C library that oPossum wrote in C, C++ and C++ templates so you can compare for yourself. The C++ template version is actually the smallest and fastest. With all that said, I think the number of people using C++ templates on micros is pretty small. Most of the code I post is written in simple C or C++ so it can appeal to a wider audience.
     
    If you don't like Arduino style coding, you can still use the msp430-g++ binary we provide for linux,mac and win32 and pound out some C++ using makefiles and a simple text editor.
     
    So yes, people have tried it and are successfully using it.
     
    -rick
  7. Like
    jsolarski got a reaction from abecedarian in Post a pic of your home work bench, get a ..   
    I have a blade CP ,
    I love it and it flew very well until the battery pack Died on me....(working on building another battery)
    Its also fun to hack, I used it as a base for another contest....got it to a nice hover and then land (30 sec flight time) with only a gyro and accelerometer (analog)...I finaly gave up full flight due to weight restrictions.....multi proto boards are not good for weight managment.
     
     
    In my experience with the blade CP, It does take some time to adjust and get it working correctly. It took me about a year to get a good hover and fly around comfortably.
  8. Like
    jsolarski reacted to SugarAddict in So happy today...   
    5lbs of rock candy (and not that crappy chocolate stuff!) and 50 jumbo pixy stix.... oh yeah!

  9. Like
    jsolarski reacted to D^2 in Uart configurator   
    There's also an online calculator that also provides oversampling config as well as error rates for each setting:
    Link[FIXED]
  10. Like
    jsolarski reacted to jazz in Uart configurator   
    I was playing last days with MSP5xx UART, and every time after changing baud rate, need to calculate configuration again, and again, and again...
     
    I write small program for making configuration depending on clock and baud rate. After generation, just press mouse button on first/second listing (nothing will happen) and use [CTRL]+[C] for copy listing to clipboard.
     

    MSP430UartCalc.rar
  11. Like
    jsolarski reacted to RobG in Ethernet Booster Pack v2   
    The new Ethernet Booster Pack assembled (no memory.)
     

  12. Like
    jsolarski reacted to abecedarian in Acrylic dragon   
    I have some other dragons sitting on shelves, waiting for me to convince the wife I need to play.
  13. Like
    jsolarski reacted to cubeberg in U4 on LP running hot   
    I pulled the U4 off last night - a big blob of solder heated it up enough to loosen all the pins. The heating is obviously gone now and it's still running great!. I've got a sample from TI coming - going to try my hand at replacing it. If I botch it, I'm no worse off than I am right now
  14. Like
    jsolarski reacted to RobG in Arrow's Black November - Complimentary Shipping on Any Online Order   
    http://www.arrownac....ipping16partday
     
    Complimentary Shipping on Any Online Order
     
    Black November
  15. Like
    jsolarski reacted to oPossum in LED Animations / Effects   
    By your command.
     

    larson_dual.c
  16. Like
    jsolarski got a reaction from GeekDoc in Sample code for Rob's f5510 usb dev board   
    Sample code for Rob's msp430f5510 usb dev kit from the store
     
    This code is a modified version of the sample code from TI.
    This will get you a basic working UART. This is the echo example.
     

    //****************************************************************************** // MSP430F550x Demo - USCI_A1, 9600 UART, SMCLK, LPM0, Echo with over-sampling // // Description: Echo a received character, RX ISR used. Normal mode is LPM0. // USCI_A1 RX interrupt triggers TX Echo. // If UCOS16=1, UCBRx=Fbrclk/(16*Baudrate) // Baud rate divider with UCBRx = 1MHz/(16*9600) = ~6.8 // ACLK = REFO = ~32768Hz, MCLK = SMCLK = default DCO = 32 x ACLK = 1048576Hz // See User Guide for baud rate divider table // // MSP430F550x // ----------------- // /|\| | // | | | // --|RST | // | | // | P4.4/UCA0TXD|------------> // | | 9600 - 8N1 (un sure which is which) // | P4.5/UCA0RXD|<------------ // // D. Archbold // Texas Instruments Inc. // March 2010 // Built with CCSv4 and IAR Embedded Workbench Version: 4.21 //****************************************************************************** // modified by Justin Solarski for use with Robs f5510 usb board #include <msp430f5510.h> //#include "cust_def.h" //#define __even_in_range(A, (A) //defined for mspgcc void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P4SEL = BIT5+BIT4; // P3.4,5 = USCI_A0 TXD/RXD UCA1CTL1 |= UCSWRST; // **Put state machine in reset** UCA1CTL1 |= UCSSEL_2; // SMCLK UCA1BR0 = 6; // 1MHz 9600 (see User's Guide) UCA1BR1 = 0; // 1MHz 9600 UCA1MCTL = UCBRS_0 + UCBRF_13 + UCOS16; // Modln UCBRSx=0, UCBRFx=0, // over sampling UCA1CTL1 &= ~UCSWRST; // **Initialize USCI state machine** UCA1IE |= UCRXIE; // Enable USCI_A0 RX interrupt __bis_SR_register(LPM3_bits + GIE); // Enter LPM0, interrupts enabled __no_operation(); // For debugger } // Echo back RXed character, confirm TX buffer is ready first #pragma vector=USCI_A1_VECTOR __interrupt void USCI_A1_ISR(void) { switch(__even_in_range(UCA1IV,4)) { case 0:break; // Vector 0 - no interrupt case 2: // Vector 2 - RXIFG while (!(UCA1IFG&UCTXIFG)); // USCI_A0 TX buffer ready? UCA1TXBUF = UCA1RXBUF; // TX -> RXed character break; case 4:break; // Vector 4 - TXIFG default: break; } }
     
    In the attached file is the mspgcc version with make file f5510uart.zip
  17. Like
    jsolarski reacted to mtlevine0 in RGB LED PC Case Fan   
    I have several of these case fans installed on my PC. Each fan uses four standard 5mm LEDs like the one pictured here.
    I'd like to replace each LED with an RGB LED controlled by a ws2801 ic. I plan to design a small PCB which would include the ws2801 controller along with a 5mm RGB LED. I would probably just control the whole thing with a Launchpad and use the USB to UART connect for communication with a visual basic or python app on the PC side.
    The board I'm planning would almost identical the Sparkfun ws2801 breakout, the only differences being the dimensions and LED type. This will be the first PCB I've ever designed so I'm hoping the 43oh community will be able to help me with some advice and hopefully double checking my work.
    The PC side app would allow for the user to select any color or animation. Another mode I'd like to implement would be a visual temperature monitor that would fade the LEDs from blue to red based on ambient or CPU temp.

     
    Phase One:
    Design PCB: Would you guys recommend I use Eagle PCB for this? Any tutorials you would recommend? I'll be doing this over the next few weeks or so depending on my class work load.
    Order PCB: I'm going to need 8 to 12 identical boards (depending on price breaks) for two to three fans. Whats the recommended budget PCB house around here, Itead/Dorkbot?

    Phase Two:
    Write embedded application: I'm thinking a MSP430g2553 should be fine, It's overkill really.
    Write PC side application: A GUI that runs in the background and hangs out on the task bar would be awesome for this. This will be another learning curve for me.

     
    That's all for now, let me know what you guys think.
    -Matt
  18. Like
    jsolarski reacted to bluehash in Contest! Win an EDB-BLE Emmoco Bluetooth Low Energy Kit   
    Check out this Blog post. Contest closes next week @ 21st Nov, 2012.
    Thanks to Emocco for donating a kit.
     

  19. Like
    jsolarski reacted to SirZusa in Sample code for Rob's f5510 usb dev board   
    Here's my example for communication over USB-CDC based on the TI example:
     

    /*** Standard-Includes ***/ #include "stdbool.h" /*** USB-Includes ***/ #include "USB_config/descriptors.h" #include "USB_API/types.h" #include "USB_API/device.h" #include "USB_API/usb.h" #include "USB_API/UsbCdc.h" #include "usbConstructs.h" /*** HAL-Includes ***/ #include "F5510/HAL_UCS.h" #include "F5510/HAL_PMM.h" /*** USB-Variables ***/ // Flag set by event handler to indicate data has been received into USB buffer volatile BYTE bCDCDataReceived_event = false; #define BUFFER_SIZE 64 char dataBuffer[bUFFER_SIZE] = ""; /*** Send data ***/ void SendData(BYTE output) { WORD x = 0; BYTE out[1] = { output }; // send it over USB if (cdcSendDataWaitTilDone(out, 1, CDC0_INTFNUM, 0)) { // it failed for some reason; abort and leave the USBCDC_abortSend(&x, CDC0_INTFNUM); } } /*** Handling of incomming data ***/ void DataHandling(BYTE input) { // DO SOMETHING } /*** MAIN ***/ void main(void) { // Stop watchdog timer WDTCTL = WDTPW + WDTHOLD; // Higher Vcore needed for 24 MHz SetVCore(PMMCOREV_3); // enable XT2 pins P5SEL |= 0x0C; UCSCTL6 |= XT2DRIVE_2; // Start crystal UCSCTL6 &= ~XT2OFF; // wait at least 2ms for XT2 to settle __delay_cycles(50000); // Clear all OSC fault Flags UCSCTL7 = 0; // MCLK = XT2-Freq. SELECT_MCLK(SELM__XT2CLK); // full speed MCLK_DIV(1); // Initialization of USB module // Init USB USB_init(); // Enable all USB event handling routines USB_setEnabledEvents(kUSB_allUsbEvents); // See if we're already attached physically to USB, and if so, connect to it // Normally applications don't invoke the event handlers, but this is an exception. if (USB_connectionInfo() & kUSB_vbusPresent) { if (USB_enable() == kUSB_succeed) { USB_reset(); USB_connect(); } } // enable interrupts __bis_SR_register(GIE); // main loop while (1) { // ST_ENUM_ACTIVE if ((USBPWRCTL & USBBGVBV) && (USBCNF & PUR_EN) && (bEnumerationStatus == ENUMERATION_COMPLETE) && (!(bFunctionSuspended == TRUE))) { while (bCDCDataReceived_event) { // Clear flag early -- just in case execution breaks below because of an error bCDCDataReceived_event = false; // Count has the number of bytes received into dataBuffer WORD count = cdcReceiveDataInBuffer((BYTE*) dataBuffer, BUFFER_SIZE, CDC0_INTFNUM); // process incomming data WORD c = 0; while (c < count) { DataHandling(dataBuffer[c]); c++; } } } } }
  20. Like
    jsolarski got a reaction from GeekDoc in U4 on LP running hot   
    I would hack it just to re-use the usb chip and the msp430 chip on there......
  21. Like
    jsolarski got a reaction from bluehash in Sample code for Rob's f5510 usb dev board   
    Sample code for Rob's msp430f5510 usb dev kit from the store
     
    This code is a modified version of the sample code from TI.
    This will get you a basic working UART. This is the echo example.
     

    //****************************************************************************** // MSP430F550x Demo - USCI_A1, 9600 UART, SMCLK, LPM0, Echo with over-sampling // // Description: Echo a received character, RX ISR used. Normal mode is LPM0. // USCI_A1 RX interrupt triggers TX Echo. // If UCOS16=1, UCBRx=Fbrclk/(16*Baudrate) // Baud rate divider with UCBRx = 1MHz/(16*9600) = ~6.8 // ACLK = REFO = ~32768Hz, MCLK = SMCLK = default DCO = 32 x ACLK = 1048576Hz // See User Guide for baud rate divider table // // MSP430F550x // ----------------- // /|\| | // | | | // --|RST | // | | // | P4.4/UCA0TXD|------------> // | | 9600 - 8N1 (un sure which is which) // | P4.5/UCA0RXD|<------------ // // D. Archbold // Texas Instruments Inc. // March 2010 // Built with CCSv4 and IAR Embedded Workbench Version: 4.21 //****************************************************************************** // modified by Justin Solarski for use with Robs f5510 usb board #include <msp430f5510.h> //#include "cust_def.h" //#define __even_in_range(A, (A) //defined for mspgcc void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P4SEL = BIT5+BIT4; // P3.4,5 = USCI_A0 TXD/RXD UCA1CTL1 |= UCSWRST; // **Put state machine in reset** UCA1CTL1 |= UCSSEL_2; // SMCLK UCA1BR0 = 6; // 1MHz 9600 (see User's Guide) UCA1BR1 = 0; // 1MHz 9600 UCA1MCTL = UCBRS_0 + UCBRF_13 + UCOS16; // Modln UCBRSx=0, UCBRFx=0, // over sampling UCA1CTL1 &= ~UCSWRST; // **Initialize USCI state machine** UCA1IE |= UCRXIE; // Enable USCI_A0 RX interrupt __bis_SR_register(LPM3_bits + GIE); // Enter LPM0, interrupts enabled __no_operation(); // For debugger } // Echo back RXed character, confirm TX buffer is ready first #pragma vector=USCI_A1_VECTOR __interrupt void USCI_A1_ISR(void) { switch(__even_in_range(UCA1IV,4)) { case 0:break; // Vector 0 - no interrupt case 2: // Vector 2 - RXIFG while (!(UCA1IFG&UCTXIFG)); // USCI_A0 TX buffer ready? UCA1TXBUF = UCA1RXBUF; // TX -> RXed character break; case 4:break; // Vector 4 - TXIFG default: break; } }
     
    In the attached file is the mspgcc version with make file f5510uart.zip
  22. Like
    jsolarski reacted to jazz in Sample code for Rob's f5510 usb dev board   
    BTW, MSP430F55x uart can work at 921600 bps without problem.
  23. Like
    jsolarski reacted to LariSan in [S]IV-18 VFD Clock Booster Pack   
    I got it to light up!After a while and some CCS "No Emulator Found" errors the clock is running + and not over heating (thank you bluehash and GeekDoc for the inductors).Now, I get to go and fix my faulty soldering work on the tube pins that didn't connect (missing segments) and I'm ready to go.

    Photo Nov 13, 5 23 37 PM by laraswanland, on Flickr
  24. Like
    jsolarski reacted to cubeberg in Launchpad Webcast - 50% off 5 Launchpad Parts   
    From TI Microcontroller's facebook profile:
     
     
    And from the Event page:
     
    https://event.on24.c...cepage=register
  25. Like
    jsolarski reacted to oPossum in WS2811 LED controller driver   
    Assembly code for driving WS2811 LED controllers at low or high speed on any pin of PORT1 (could be modified for other ports). Requires 16 MHz MCU clock and interrupts must be disabled. Timing is from WS2811 spec sheet and is as precise as possible.





    ws2811.zip
×
×
  • Create New...