Jump to content
43oh

Rickta59

Members
  • Content Count

    1,135
  • Joined

  • Last visited

  • Days Won

    71

Reputation Activity

  1. Like
    Rickta59 got a reaction from agaelema in CCS for $9.99   
    [NOTE]
    Before you bother trying to find this deal,  read this post:
    http://forum.43oh.com/topic/10050-ccs-70-will-be-available-without-license-requiremens/
     
    and this TI web page:
    http://processors.wiki.ti.com/index.php/CCSv7_Changes
    "Licensing
    With the release of Code Composer Studio v7 TI is no longer charging for licenses. You can simply download the tool and start using it. Along with this the end user license agreement has changed to a simple TSPA compatible license."
     
    [/NOTE]
     
    I didn't see anyone else mention this offer so here it is. Use the link below to buy the promo version of a G2 launchpad bundled with a node locked full version of CCS for only *$9.99:

    https://store.ti.com/MSP430G2-LaunchPad-Development-Kit-With-Code-Composer-Studio-Promotion-P50861.aspx

    -rick
     
    [Edit]
    * price is $9.99 + plus shipping
    [/Edit]
  2. Like
    Rickta59 got a reaction from oPossum in CCS for $9.99   
    [NOTE]
    Before you bother trying to find this deal,  read this post:
    http://forum.43oh.com/topic/10050-ccs-70-will-be-available-without-license-requiremens/
     
    and this TI web page:
    http://processors.wiki.ti.com/index.php/CCSv7_Changes
    "Licensing
    With the release of Code Composer Studio v7 TI is no longer charging for licenses. You can simply download the tool and start using it. Along with this the end user license agreement has changed to a simple TSPA compatible license."
     
    [/NOTE]
     
    I didn't see anyone else mention this offer so here it is. Use the link below to buy the promo version of a G2 launchpad bundled with a node locked full version of CCS for only *$9.99:

    https://store.ti.com/MSP430G2-LaunchPad-Development-Kit-With-Code-Composer-Studio-Promotion-P50861.aspx

    -rick
     
    [Edit]
    * price is $9.99 + plus shipping
    [/Edit]
  3. Like
    Rickta59 got a reaction from will in CCS for $9.99   
    [NOTE]
    Before you bother trying to find this deal,  read this post:
    http://forum.43oh.com/topic/10050-ccs-70-will-be-available-without-license-requiremens/
     
    and this TI web page:
    http://processors.wiki.ti.com/index.php/CCSv7_Changes
    "Licensing
    With the release of Code Composer Studio v7 TI is no longer charging for licenses. You can simply download the tool and start using it. Along with this the end user license agreement has changed to a simple TSPA compatible license."
     
    [/NOTE]
     
    I didn't see anyone else mention this offer so here it is. Use the link below to buy the promo version of a G2 launchpad bundled with a node locked full version of CCS for only *$9.99:

    https://store.ti.com/MSP430G2-LaunchPad-Development-Kit-With-Code-Composer-Studio-Promotion-P50861.aspx

    -rick
     
    [Edit]
    * price is $9.99 + plus shipping
    [/Edit]
  4. Like
    Rickta59 got a reaction from greeeg in CCS for $9.99   
    [NOTE]
    Before you bother trying to find this deal,  read this post:
    http://forum.43oh.com/topic/10050-ccs-70-will-be-available-without-license-requiremens/
     
    and this TI web page:
    http://processors.wiki.ti.com/index.php/CCSv7_Changes
    "Licensing
    With the release of Code Composer Studio v7 TI is no longer charging for licenses. You can simply download the tool and start using it. Along with this the end user license agreement has changed to a simple TSPA compatible license."
     
    [/NOTE]
     
    I didn't see anyone else mention this offer so here it is. Use the link below to buy the promo version of a G2 launchpad bundled with a node locked full version of CCS for only *$9.99:

    https://store.ti.com/MSP430G2-LaunchPad-Development-Kit-With-Code-Composer-Studio-Promotion-P50861.aspx

    -rick
     
    [Edit]
    * price is $9.99 + plus shipping
    [/Edit]
  5. Like
    Rickta59 got a reaction from Fmilburn in CCS for $9.99   
    [NOTE]
    Before you bother trying to find this deal,  read this post:
    http://forum.43oh.com/topic/10050-ccs-70-will-be-available-without-license-requiremens/
     
    and this TI web page:
    http://processors.wiki.ti.com/index.php/CCSv7_Changes
    "Licensing
    With the release of Code Composer Studio v7 TI is no longer charging for licenses. You can simply download the tool and start using it. Along with this the end user license agreement has changed to a simple TSPA compatible license."
     
    [/NOTE]
     
    I didn't see anyone else mention this offer so here it is. Use the link below to buy the promo version of a G2 launchpad bundled with a node locked full version of CCS for only *$9.99:

    https://store.ti.com/MSP430G2-LaunchPad-Development-Kit-With-Code-Composer-Studio-Promotion-P50861.aspx

    -rick
     
    [Edit]
    * price is $9.99 + plus shipping
    [/Edit]
  6. Like
    Rickta59 reacted to will in Temperature & Humidity sensor -with LCD & RF   
    Hi everyone, this is my credit card size wireless sensor node,
    with a 7-seg LCD display showing temperature & humidity, update every second.
    using MSP430FR4133 with HDC1080,BMP180 and OPT3002, 
    transmit by nRF24l01, which sends out temp,humid,pressure,luminosity and also battery voltage per minute.
     

     
    It is all power by a CR2032, and thanks to MSP430FR4133, I can manage to have half an year battery life.

    also thanks to MSP430RF4133 Launchpad with build-in energyTrace, I can estimate battery life with a click(no more oscilloscope  )

    note that I've actually put an RF430 on the down left ot the board(there is an antenna for that),
    which will act as a NFC tag, but it draws too much current (~15uA), so I took it off
    and at the down right is the battery voltage measurement with a mosfet to cut the power,
    but I found out that I can just measure internal voltage reference to calculate its supply voltage, so I've also remove that. 

     
    although I'm pretty much satisfy with this power consumption, but I still think that 16.5uA is a little bit too far from estimating from datasheet
    and I am still trying to figure that out
  7. Like
    Rickta59 reacted to greeeg in GPS logger for a local Beagle club   
    Got my enclosures today. That means I now have all the hardware parts for this batch.
     
    I've been playing around with Fusion 360 instead of Rhino, mainly due to the integrated CAM processor. Also it has easy to use rendering stuff out of the box too.
     
    This is the reason I love companies that provide 3d CAD files. I can define some simple stroke text, and Fusion 360 will project it over the 3d curvature of the part.

     
    My CNC setup is in dis-array. The setup is sub optimal.

     
    But I think the results speak for themselves.

     
    I want to experiment with filling the engravings with a paint to make them stand out.
  8. Like
    Rickta59 got a reaction from yyrkoon in [RESOLVED] Adding new mcu to Energia   
    I don't think you can directly use headers from the new msp430-elf-gcc ( stuff included with CCS ) and the old open source version of msp430-gcc (stuff included with Energia). The biggest change is how they deal with the interrupt vectors. I compared the headers for the file msp430fr5969.h from the 2 compilers. Below is a just a small chunk of the changes ...
    > 4476,4501c4909,4934 < #define AES256_VECTOR (31) /* 0xFFCC AES256 */ < #define RTC_VECTOR (32) /* 0xFFCE RTC */ < #define PORT4_VECTOR (33) /* 0xFFD0 Port 4 */ < #define PORT3_VECTOR (34) /* 0xFFD2 Port 3 */ < #define TIMER3_A1_VECTOR (35) /* 0xFFD4 Timer3_A2 CC1, TA */ < #define TIMER3_A0_VECTOR (36) /* 0xFFD6 Timer3_A2 CC0 */ < #define PORT2_VECTOR (37) /* 0xFFD8 Port 2 */ < #define TIMER2_A1_VECTOR (38) /* 0xFFDA Timer2_A2 CC1, TA */ < #define TIMER2_A0_VECTOR (39) /* 0xFFDC Timer2_A2 CC0 */ < #define PORT1_VECTOR (40) /* 0xFFDE Port 1 */ < #define TIMER1_A1_VECTOR (41) /* 0xFFE0 Timer1_A3 CC1-2, TA */ < #define TIMER1_A0_VECTOR (42) /* 0xFFE2 Timer1_A3 CC0 */ < #define DMA_VECTOR (43) /* 0xFFE4 DMA */ < #define USCI_A1_VECTOR (44) /* 0xFFE6 USCI A1 Receive/Transmit */ < #define TIMER0_A1_VECTOR (45) /* 0xFFE8 Timer0_A3 CC1-2, TA */ < #define TIMER0_A0_VECTOR (46) /* 0xFFEA Timer0_A3 CC0 */ < #define ADC12_VECTOR (47) /* 0xFFEC ADC */ < #define USCI_B0_VECTOR (48) /* 0xFFEE USCI B0 Receive/Transmit */ < #define USCI_A0_VECTOR (49) /* 0xFFF0 USCI A0 Receive/Transmit */ < #define WDT_VECTOR (50) /* 0xFFF2 Watchdog Timer */ < #define TIMER0_B1_VECTOR (51) /* 0xFFF4 Timer0_B7 CC1-6, TB */ < #define TIMER0_B0_VECTOR (52) /* 0xFFF6 Timer0_B7 CC0 */ < #define COMP_E_VECTOR (53) /* 0xFFF8 Comparator E */ < #define UNMI_VECTOR (54) /* 0xFFFA User Non-maskable */ < #define SYSNMI_VECTOR (55) /* 0xFFFC System Non-maskable */ < #define RESET_VECTOR ("reset") /* 0xFFFE Reset [Highest Priority] */ --- > #define AES256_VECTOR (0x004C) /* 0xFFCC AES256 */ > #define RTC_VECTOR (0x004E) /* 0xFFCE RTC */ > #define PORT4_VECTOR (0x0050) /* 0xFFD0 Port 4 */ > #define PORT3_VECTOR (0x0052) /* 0xFFD2 Port 3 */ > #define TIMER3_A1_VECTOR (0x0054) /* 0xFFD4 Timer3_A2 CC1, TA */ > #define TIMER3_A0_VECTOR (0x0056) /* 0xFFD6 Timer3_A2 CC0 */ > #define PORT2_VECTOR (0x0058) /* 0xFFD8 Port 2 */ > #define TIMER2_A1_VECTOR (0x005A) /* 0xFFDA Timer2_A2 CC1, TA */ > #define TIMER2_A0_VECTOR (0x005C) /* 0xFFDC Timer2_A2 CC0 */ > #define PORT1_VECTOR (0x005E) /* 0xFFDE Port 1 */ > #define TIMER1_A1_VECTOR (0x0060) /* 0xFFE0 Timer1_A3 CC1-2, TA */ > #define TIMER1_A0_VECTOR (0x0062) /* 0xFFE2 Timer1_A3 CC0 */ > #define DMA_VECTOR (0x0064) /* 0xFFE4 DMA */ > #define USCI_A1_VECTOR (0x0066) /* 0xFFE6 USCI A1 Receive/Transmit */ > #define TIMER0_A1_VECTOR (0x0068) /* 0xFFE8 Timer0_A3 CC1-2, TA */ > #define TIMER0_A0_VECTOR (0x006A) /* 0xFFEA Timer0_A3 CC0 */ > #define ADC12_VECTOR (0x006C) /* 0xFFEC ADC */ > #define USCI_B0_VECTOR (0x006E) /* 0xFFEE USCI B0 Receive/Transmit */ > #define USCI_A0_VECTOR (0x0070) /* 0xFFF0 USCI A0 Receive/Transmit */ > #define WDT_VECTOR (0x0072) /* 0xFFF2 Watchdog Timer */ > #define TIMER0_B1_VECTOR (0x0074) /* 0xFFF4 Timer0_B7 CC1-6, TB */ > #define TIMER0_B0_VECTOR (0x0076) /* 0xFFF6 Timer0_B7 CC0 */ > #define COMP_E_VECTOR (0x0078) /* 0xFFF8 Comparator E */ > #define UNMI_VECTOR (0x007A) /* 0xFFFA User Non-maskable */ > #define SYSNMI_VECTOR (0x007C) /* 0xFFFC System Non-maskable */ > #define RESET_VECTOR (0x007E) /* 0xFFFE Reset [Highest Priority] */ 4506d4938 They use a wildly different scheme for the vector table. The new one uses an index offset from the beginning of the vector table region. The old one uses the actual offset.  Once Energia starts using the new msp430-elf-gcc compiler these problems will go away.
     
    -rick 
  9. Like
    Rickta59 got a reaction from yyrkoon in [RESOLVED] Adding new mcu to Energia   
    You could use the msp430-objdump on the compiled program_name.elf to see if the addresses of your ISR handler functions ends up in the proper vector table address.
  10. Like
    Rickta59 got a reaction from bluehash in Tivac core that works Arduino 1.6.9   
    One of the new features of the beta EnergiaNG is that fact that it is now using the standard Arduino 1.6.x IDE.  Unfortunately, it doesn't look like it is ready to work as a boards manager package with the standard Arduino IDE.  Energia/TI likes their branding and it seems they want to keep TI boards and Arduino board from ever meeting in the same program.
     
    At the same time, I noticed a few things that are missing and instead of trying to push those into Energia. I decided to fork the tivac-core and make the changes there.  I also moved away from the proprietary dslite uploader in favor of using openocd.  This gives you a better chance of running this code on any platform you might like.  Did you know Arduino is now running on Raspberry PI boards?

    Anyways, you can find this new version here:

    https://github.com/RickKimball/tivac-core

    There is a list of things that I've changed in the README.md. This port also makes a couple of assumptions. It assumes you have both an arm-none-eabi-gcc toolchain in your path along with a recent version of openocd.  If you are running linux you can just do:
    $ sudo apt-get install arm-none-eabi-gcc arm-none-eabi-g++ openocd Give this port a whirl and let me know how it works for you.
     
    -rick
  11. Like
    Rickta59 got a reaction from Fmilburn in Tivac core that works Arduino 1.6.9   
    One of the new features of the beta EnergiaNG is that fact that it is now using the standard Arduino 1.6.x IDE.  Unfortunately, it doesn't look like it is ready to work as a boards manager package with the standard Arduino IDE.  Energia/TI likes their branding and it seems they want to keep TI boards and Arduino board from ever meeting in the same program.
     
    At the same time, I noticed a few things that are missing and instead of trying to push those into Energia. I decided to fork the tivac-core and make the changes there.  I also moved away from the proprietary dslite uploader in favor of using openocd.  This gives you a better chance of running this code on any platform you might like.  Did you know Arduino is now running on Raspberry PI boards?

    Anyways, you can find this new version here:

    https://github.com/RickKimball/tivac-core

    There is a list of things that I've changed in the README.md. This port also makes a couple of assumptions. It assumes you have both an arm-none-eabi-gcc toolchain in your path along with a recent version of openocd.  If you are running linux you can just do:
    $ sudo apt-get install arm-none-eabi-gcc arm-none-eabi-g++ openocd Give this port a whirl and let me know how it works for you.
     
    -rick
  12. Like
    Rickta59 reacted to NurseBob in F5529LP + GPS MT3339 + RockBlock7 9602 Iridium Sat-Comm DIY "spot me"   
    My wife wants to know that when I do my John Muir Trail trek starting on 7/26/2016 I've not fallen down and can't get up, or been eaten by a bear...
    So, I've been building my DIY "SpotMe" Iridium Network-based GPS-Satellite Comm device. 
    I've gotten to the basic level of communication; It reports my position on a regular basis (the following is from a morning conditioning hike). 
    To my surprise, when I set the deconstructed system up on my kitchen table, it managed to both get a GPS fix AND successfully transmit the data to an Iridium satellite.  Given that there is really no "sky" visible from my kitchen, a better than expected performance! 
    Why build it when I could buy similar? Well, why not???  Similar to Dave Jones' "take it apart" I'm a firm believer in DIY to figure out how something works, and can I make one...
     
    Future travel plans: I do "Iron Butt" rides on my 2005 ST1300 - now with 175,000+ miles (there's no typo there, I've really driven that far on my bike...), and I'm planning to do 300 mile sections of the Pacific Crest Trail for the next 10 years. So, again, keeping the wife happy and "in the know."  So, this will be something I plan to use on a regular basis over the next several years.
     
    Once finished with the project I will publish all code, hex and design files for those who have an interest.
     
    Finally, thanks to all who have helped me.  Especially Robert Woodruff, yyrkoon, and Spirilis.
     
    Bob
     
    http://www.nursebobsblog.org - currently stale content, updates planned for after the hike and teaching again...
     
    On 7/14/2016 at 09:01:47 PDT Bob was here:  https://www.google.com/#q=%2B38.564295,-122.432641 -Aprx Elev.: 1676 ft
    On 7/14/2016 at 09:14:44 PDT Bob was here:  https://www.google.com/#q=%2B38.572575,-122.428550 -Aprx Elev.: 1645 ft
    On 7/14/2016 at 09:25:53 PDT Bob was here:  https://www.google.com/#q=%2B38.575296,-122.433725 -Aprx Elev.: 1644 ft
    On 7/14/2016 at 09:36:38 PDT Bob was here:  https://www.google.com/#q=%2B38.580748,-122.431888 -Aprx Elev.: 1784 ft
    On 7/14/2016 at 09:50:50 PDT Bob was here:  https://www.google.com/#q=%2B38.582575,-122.431873 -Aprx Elev.: 1743 ft
    On 7/14/2016 at 10:05:25 PDT Bob was here:  https://www.google.com/#q=%2B38.574358,-122.427476 -Aprx Elev.: 1564 ft
    On 7/14/2016 at 10:16:14 PDT Bob was here:  https://www.google.com/#q=%2B38.569375,-122.423606 -Aprx Elev.: 1740 ft

    No visible sky, from inside my kitchen:
    On 7/14/2016 at 11:34:57 PDT Bob was here:  https://www.google.com/#q=%2B38.539415,-122.471001 -Aprx Elev.: 593 ft
     

  13. Like
    Rickta59 got a reaction from tripwire in Porting Arduino code to MSP   
    Show me a successful compile of that code without modification and I'll eat my msp430 launchpad.
     
    Those registers are specific to an AVR Atmega processor. There isn't any macro magic that is going to magically convert code written for an AVR Timer peripheral to an msp430 TimerA peripheral.  You often see this problem with Arduino code and libraries. They often mix the arduino API with direct register access that is specific to AVR Atmega.  That code wouldn't compile for any of the ARM Arduinos boards either.
     
    Here is a link that talks about using the AVR Timer peripherals:
     
    http://www.avrbeginners.net/architecture/timers/timers.html#tccrb
     
    The rest of the code in that sketch is just using the Arduino API calls and those will do the right thing if you use Energia. It is just a matter of figuring out what they are doing with the AVR timer and writing msp430 specific code to do that same thing.
     
    -rick
     
    [Edit] I compiled on arduino for the arudino uno .. it worked fine ... I then switched over to an Arduino Zero (cortex-m0 arduino board ) and got these compiler errors:

    /home/kimballr/github/Arduino/build/linux/work/arduino-builder -compile -logger=machine -hardware "/home/kimballr/github/Arduino/build/linux/work/hardware" -hardware "/home/kimballr/.arduino15/packages" -hardware "/home/kimballr/Arduino/hardware" -tools "/home/kimballr/github/Arduino/build/linux/work/tools-builder" -tools "/home/kimballr/github/Arduino/build/linux/work/hardware/tools/avr" -tools "/home/kimballr/.arduino15/packages" -built-in-libraries "/home/kimballr/github/Arduino/build/linux/work/libraries" -libraries "/home/kimballr/Arduino/libraries" -fqbn=arduino:samd:arduino_zero_edbg -ide-version=10610 -build-path "/tmp/build5ee809432791192f56b7e3894654fc94.tmp" -warnings=more -prefs=build.warn_data_percentage=75 -verbose "/home/kimballr/Arduino/sketch_jul12a/sketch_jul12a.ino" Build options changed, rebuilding all "/home/kimballr/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Zero"' "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/cores/arduino" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/variants/arduino_zero" "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/sketch/sketch_jul12a.ino.cpp" -o "/dev/null" "/home/kimballr/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Zero"' "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/cores/arduino" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/variants/arduino_zero" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI" "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/sketch/sketch_jul12a.ino.cpp" -o "/dev/null" "/home/kimballr/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Zero"' "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/cores/arduino" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/variants/arduino_zero" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI" "/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI/SPI.cpp" -o "/dev/null" "/home/kimballr/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Zero"' "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/cores/arduino" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/variants/arduino_zero" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI" "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/sketch/sketch_jul12a.ino.cpp" -o "/dev/null" "/home/kimballr/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Zero"' "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/cores/arduino" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/variants/arduino_zero" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI" "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/sketch/sketch_jul12a.ino.cpp" -o "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/preproc/ctags_target_for_gcc_minus_e.cpp" "/home/kimballr/github/Arduino/build/linux/work/tools-builder/ctags/5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/preproc/ctags_target_for_gcc_minus_e.cpp" "/home/kimballr/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -Wall -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Zero"' "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/cores/arduino" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/variants/arduino_zero" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI" "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/sketch/sketch_jul12a.ino.cpp" -o "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/sketch/sketch_jul12a.ino.cpp.o" /home/kimballr/Arduino/sketch_jul12a/sketch_jul12a.ino: In function 'void setup()': sketch_jul12a:86: error: 'TCCR1B' was not declared in this scope TCCR1B &= B11111000; ^ sketch_jul12a:88: error: 'TCCR2B' was not declared in this scope TCCR2B &= B11111000; ^ Using library SPI at version 1.0 in folder: /home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI exit status 1 'TCCR1B' was not declared in this scope And using energia .. more or less the same thing from the msp430-g++ compiler
    /mnt/vbox/shared/github/Energia/build/linux/work/hardware/tools/msp430/bin/msp430-g++ -c -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430fr5969 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=17 -g -I/mnt/vbox/shared/github/Energia/build/linux/work/hardware/msp430/cores/msp430 -I/mnt/vbox/shared/github/Energia/build/linux/work/hardware/msp430/variants/launchpad_fr5969 -I/mnt/vbox/shared/github/Energia/build/linux/work/hardware/msp430/libraries/SPI /tmp/build7126674554918674956.tmp/sketch_jul12a.cpp -o /tmp/build7126674554918674956.tmp/sketch_jul12a.cpp.o [/mnt/vbox/shared/github/Energia/build/linux/work/hardware/tools/msp430/bin/msp430-g++, -c, -Os, -Wall, -ffunction-sections, -fdata-sections, -mmcu=msp430fr5969, -DF_CPU=16000000L, -MMD, -DARDUINO=101, -DENERGIA=17, -g, -I/mnt/vbox/shared/github/Energia/build/linux/work/hardware/msp430/cores/msp430, -I/mnt/vbox/shared/github/Energia/build/linux/work/hardware/msp430/variants/launchpad_fr5969, -I/mnt/vbox/shared/github/Energia/build/linux/work/hardware/msp430/libraries/SPI, /tmp/build7126674554918674956.tmp/sketch_jul12a.cpp, -o, /tmp/build7126674554918674956.tmp/sketch_jul12a.cpp.o] sketch_jul12a.cpp: In function 'void setup()': sketch_jul12a.cpp:85:3: error: 'TCCR1B' was not declared in this scope sketch_jul12a.cpp:87:3: error: 'TCCR2B' was not declared in this scope -rick
  14. Like
    Rickta59 got a reaction from spirilis in Porting Arduino code to MSP   
    If you are planning to make your own PCB the atmega328p comes in several small packages.
     
    .8 pitch 32 pin tqfp
    .4 pitch 28 pad vqfn 4x4mm
     
    https://octopart.com/search?q=atmega328p
     
    I don't see the advantage of using an msp430. Which one do you think is going to be smaller than the AVR version?
  15. Like
    Rickta59 got a reaction from yyrkoon in Porting Arduino code to MSP   
    Show me a successful compile of that code without modification and I'll eat my msp430 launchpad.
     
    Those registers are specific to an AVR Atmega processor. There isn't any macro magic that is going to magically convert code written for an AVR Timer peripheral to an msp430 TimerA peripheral.  You often see this problem with Arduino code and libraries. They often mix the arduino API with direct register access that is specific to AVR Atmega.  That code wouldn't compile for any of the ARM Arduinos boards either.
     
    Here is a link that talks about using the AVR Timer peripherals:
     
    http://www.avrbeginners.net/architecture/timers/timers.html#tccrb
     
    The rest of the code in that sketch is just using the Arduino API calls and those will do the right thing if you use Energia. It is just a matter of figuring out what they are doing with the AVR timer and writing msp430 specific code to do that same thing.
     
    -rick
     
    [Edit] I compiled on arduino for the arudino uno .. it worked fine ... I then switched over to an Arduino Zero (cortex-m0 arduino board ) and got these compiler errors:

    /home/kimballr/github/Arduino/build/linux/work/arduino-builder -compile -logger=machine -hardware "/home/kimballr/github/Arduino/build/linux/work/hardware" -hardware "/home/kimballr/.arduino15/packages" -hardware "/home/kimballr/Arduino/hardware" -tools "/home/kimballr/github/Arduino/build/linux/work/tools-builder" -tools "/home/kimballr/github/Arduino/build/linux/work/hardware/tools/avr" -tools "/home/kimballr/.arduino15/packages" -built-in-libraries "/home/kimballr/github/Arduino/build/linux/work/libraries" -libraries "/home/kimballr/Arduino/libraries" -fqbn=arduino:samd:arduino_zero_edbg -ide-version=10610 -build-path "/tmp/build5ee809432791192f56b7e3894654fc94.tmp" -warnings=more -prefs=build.warn_data_percentage=75 -verbose "/home/kimballr/Arduino/sketch_jul12a/sketch_jul12a.ino" Build options changed, rebuilding all "/home/kimballr/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Zero"' "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/cores/arduino" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/variants/arduino_zero" "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/sketch/sketch_jul12a.ino.cpp" -o "/dev/null" "/home/kimballr/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Zero"' "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/cores/arduino" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/variants/arduino_zero" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI" "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/sketch/sketch_jul12a.ino.cpp" -o "/dev/null" "/home/kimballr/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Zero"' "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/cores/arduino" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/variants/arduino_zero" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI" "/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI/SPI.cpp" -o "/dev/null" "/home/kimballr/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Zero"' "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/cores/arduino" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/variants/arduino_zero" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI" "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/sketch/sketch_jul12a.ino.cpp" -o "/dev/null" "/home/kimballr/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Zero"' "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/cores/arduino" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/variants/arduino_zero" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI" "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/sketch/sketch_jul12a.ino.cpp" -o "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/preproc/ctags_target_for_gcc_minus_e.cpp" "/home/kimballr/github/Arduino/build/linux/work/tools-builder/ctags/5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/preproc/ctags_target_for_gcc_minus_e.cpp" "/home/kimballr/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -Wall -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Zero"' "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" "-I/home/kimballr/.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/cores/arduino" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/variants/arduino_zero" "-I/home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI" "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/sketch/sketch_jul12a.ino.cpp" -o "/tmp/build5ee809432791192f56b7e3894654fc94.tmp/sketch/sketch_jul12a.ino.cpp.o" /home/kimballr/Arduino/sketch_jul12a/sketch_jul12a.ino: In function 'void setup()': sketch_jul12a:86: error: 'TCCR1B' was not declared in this scope TCCR1B &= B11111000; ^ sketch_jul12a:88: error: 'TCCR2B' was not declared in this scope TCCR2B &= B11111000; ^ Using library SPI at version 1.0 in folder: /home/kimballr/.arduino15/packages/arduino/hardware/samd/1.6.5/libraries/SPI exit status 1 'TCCR1B' was not declared in this scope And using energia .. more or less the same thing from the msp430-g++ compiler
    /mnt/vbox/shared/github/Energia/build/linux/work/hardware/tools/msp430/bin/msp430-g++ -c -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430fr5969 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=17 -g -I/mnt/vbox/shared/github/Energia/build/linux/work/hardware/msp430/cores/msp430 -I/mnt/vbox/shared/github/Energia/build/linux/work/hardware/msp430/variants/launchpad_fr5969 -I/mnt/vbox/shared/github/Energia/build/linux/work/hardware/msp430/libraries/SPI /tmp/build7126674554918674956.tmp/sketch_jul12a.cpp -o /tmp/build7126674554918674956.tmp/sketch_jul12a.cpp.o [/mnt/vbox/shared/github/Energia/build/linux/work/hardware/tools/msp430/bin/msp430-g++, -c, -Os, -Wall, -ffunction-sections, -fdata-sections, -mmcu=msp430fr5969, -DF_CPU=16000000L, -MMD, -DARDUINO=101, -DENERGIA=17, -g, -I/mnt/vbox/shared/github/Energia/build/linux/work/hardware/msp430/cores/msp430, -I/mnt/vbox/shared/github/Energia/build/linux/work/hardware/msp430/variants/launchpad_fr5969, -I/mnt/vbox/shared/github/Energia/build/linux/work/hardware/msp430/libraries/SPI, /tmp/build7126674554918674956.tmp/sketch_jul12a.cpp, -o, /tmp/build7126674554918674956.tmp/sketch_jul12a.cpp.o] sketch_jul12a.cpp: In function 'void setup()': sketch_jul12a.cpp:85:3: error: 'TCCR1B' was not declared in this scope sketch_jul12a.cpp:87:3: error: 'TCCR2B' was not declared in this scope -rick
  16. Like
    Rickta59 got a reaction from yyrkoon in Porting Arduino code to MSP   
    It seems like the only trouble might be the timer register code.
    TCCR1B &= B11111000; TCCR1B |= B00000001; TCCR2B &= B11111000; TCCR2B |= B00000001; The rest should just port over.  Take a look at the TIMERA examples to see how to approach that code.
     
    -rick
  17. Like
    Rickta59 got a reaction from pokmo in Porting Arduino code to MSP   
    Could you provide a link to the sketch you are talking about?
  18. Like
    Rickta59 got a reaction from Fmilburn in Energia for FRAM and other new MSP430 Devices?   
    The problem with Energia right now is that it is using msp430-gcc. There are plans to move to the RedHat/TI port of msp430-elf-gcc soon but there are issues. Until then you can't use all the FRAM just the FRAM in the first 64k address space, which is typically about 48000 bytes instead of all the fram available at 0x10000 and above.
     
    https://github.com/energia/Energia/issues/806
  19. Like
    Rickta59 reacted to terjeio in Compact command parser/dispatcher example   
    A command parser/dispatcher example from my CO2 laser engraver codebase, using a struct array containing the commands and associated  pointer to functions. A lot cleaner (and easier to maintain) than switch/case statements or if/else constructs...
    Functions get called with a pointer to the command tail for local parameter parsing.
    The struct array data are all placed in flash.
    typedef struct { char const *const command; bool (*const handler)(char *); const bool report; } command; bool query (char* params); bool start (char* params); bool moveXrel (char* params); bool moveYrel (char* params); bool moveZrel (char* params); bool XHome (char* params); bool YHome (char* params); bool ZHome (char* params); bool XYHome (char* params); bool zeroAllAxes (char* params); bool laser (char* params); bool setLaserPower (char* params); bool setImageDPI (char* params); bool setPulseDutyCycle (char* params); bool enableCoolant (char* params); bool enableAirAssist (char* params); bool setMode (char* params); bool getPosition (char* params); bool setPPI (char* params); bool setPulseWidth (char* params); bool enableExhaustFan (char* params); bool setEngravingSpeed (char* params); bool getStatus (char* params); bool setEchoMode (char* params); bool setAMode (char* params); bool setPWROffset (char* params); bool loadProfile (char* params); bool setXBcomp (char* params); void exeCommand (char *cmdline) { static const command commands[] = { "?", &query, true, "Power:", &setLaserPower, true, "DutyCycle:", &setPulseDutyCycle, true, "PulseWidth:", &setPulseWidth, true, "DPI:", &setImageDPI, true, "Start:", &start, true, "X:", &moveXrel, true, "Y:", &moveYrel, true, "Z:", &moveZrel, true, "HomeXY", &XYHome, true, "HomeX", &XHome, true, "HomeY", &YHome, true, "HomeZ", &ZHome, true, "ZeroAll", &zeroAllAxes, true, "Laser:", &laser, true, "Coolant:", &enableCoolant, true, "Air:", &enableAirAssist, true, "Mach3:", &setMode, true, "Pos", &getPosition, false, "PPI:", &setPPI, true, "Exhaust:", &enableExhaustFan, true, "Speed:", &setEngravingSpeed, true, "Status", &getStatus, false, "ASelect:", &setAMode, true, "PWROffset:", &setPWROffset, true, "LoadProfile:", &loadProfile, true, "XBComp:", &setXBcomp, true, "Echo:", &setEchoMode, false }; bool ok = false; uint32_t i = 0, numcmds = sizeof(commands) / sizeof(command), cmdlen; while(!ok && i < numcmds) { cmdlen = strlen(commands[i].command); if(!(ok = !strncmp(commands[i].command, cmdline, cmdlen))) i++; } if(ok) { ok = commands[i].handler(cmdline + cmdlen); if(commands[i].report) serialWriteLn(ok ? "OK" : "FAILED")); } else serialWriteLn("Bad command"); } For further reading see http://www.barrgroup.com/Embedded-Systems/How-To/C-Function-Pointers
     
     
     
  20. Like
    Rickta59 got a reaction from yyrkoon in MSP430G2 emulator.   
    So I hope you kick back some cash to him for his knowledge and ours!
  21. Like
    Rickta59 got a reaction from yyrkoon in MSP430G2 emulator.   
    Post a picture of your board so we can see it. @@yyrkoon
  22. Like
    Rickta59 got a reaction from yyrkoon in MSP430G2 emulator.   
    If the target board actually works, wouldn't it have had those already?
  23. Like
    Rickta59 got a reaction from yyrkoon in MSP430G2 emulator.   
    Why don't you just expose the SBW pins and gnd on your board? I don't see the problem? Or you could just solder 3 wires directly to the chip and connect those to the launchpad SBW?
  24. Like
    Rickta59 got a reaction from yyrkoon in MSP430G2 emulator.   
    It sounds like your board doesn't work. Debugging it in the launchpad is a waste of time. Just take the chip and solder 3 wire directly to the chip. GND, TST and RESET. Connect those wires to the launch pad SBW headers.  Plug the chip into board and just debug it. 
  25. Like
    Rickta59 got a reaction from abecedarian in How accurate is Millis()?   
    TIMERA can take a variety of clock sources. Normally people use the internal  SMCLK or ACLK but you can also feed it an external clock. See the code below even though it is written for an msp430g2553 (TimerA are mostly the same on all chips) Take note how the clock source is set: TACTL = TASSEL_0;
     
    http://forum.43oh.com/topic/1913-frequency-counter-using-launchpad-nokia-5110-lcd/ 
     
    -rick
×
×
  • Create New...