Jump to content


Popular Content

Showing content with the highest reputation since 01/15/2019 in all areas

  1. 3 points

    USB to gameport project

    If you appreciate late 90s vintage PCs you might be interested in this one. I decided to build a Pentium II machine on which I can play my favourite games from those times. Magic Carpet (Bullfrog Productions) is one of them, but it needs a joystick. I had good quality USB joysticks, but those games need old analog gameport-based controllers that are serviced by the sound cards of the time. This new project acts as a USB Host and provides the analog output that emulates a 4 axis + 4 button game controller. the prototype works absolutely great, it takes about 0.6ms to read data from the attached USB joystick and to send it to the sound card. data is retrieved every 10ms as per the HID polling interval, absolutely no input command is lost and there is over-current protection built in in order to protect the PC from misuse. what do you guys think? I'm open to ideas regarding this project before I commit revision 2 of the board - which might end up being a 4 layer design. prototype pictures: https://photos.app.goo.gl/fXdDBng4dvEepq8V7 repo: https://cadlab.io/projects/lemidi cheers, peter
  2. 2 points
    My Lisp interpreter for microcontrollers, uLisp, now supports the MSP430 FR6989 LaunchPad board, with the ability to write text to the LCD display from Lisp programs: For more information see uLisp for the MSP430 FR6989 LaunchPad.
  3. 2 points
    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. https://www.youtube.com/watch?v=8w09Zy8MQrc https://github.com/gbhug5a/7-Segment-Displays-Multiplex-by-Segment
  4. 1 point
    So I spent some time with the latest energia 1.8.7E21. It is still using msp430-gcc. That project I linked in the previous post won't work because that code is using the newer msp430-elf-gcc. I did put together an example of using msp430-gcc style code and the blink project above that compiles and create asm only project .. well almost main has to jump to our asm code so there are a couple of instructions to get there. Three files are needed: blink_with_msp430-gcc_asm.ino /* blink_with_msp430-gcc_asm.ino */ /* * we aren't going to use the .ino file */ main.cpp // We override the main function from Energia // and just jump to our __reset_vector__ routine // in blink.S int main() { asm("jmp _reset_vector__"); } blink.S ;------------------------------------------------------------------------------- ; blinkasm.S - gcc compatible interrupt driven led blinker in msp430 asm ; ; Version 1.0 - 10/22/2011 rick@kimballsoftware.com ; Version 1.01 - 7/22/2014 rick@kimballsoftware.com modified for msp430-elf-gcc ; Version 1.02 - 11/02/2014 rick@kimballsoftware.com more changes for msp430-elf-gcc ; $ msp430-elf-gcc blinkasm.S -D_GNU_ASSEMBLER_ -Wall -Os -g \ ; -fdata-sections -ffunction-sections -mmcu=msp430g2553 -T \ ; -T msp430g2553.ld -I/tmp/a/include -L /tmp/a/include/ -nostdlib ; Version 1.03 - 03/16/2019 rick@kimballsoftware.com made compatible with energia ; ;------------------------------------------------------------------------------- .file "blinkasm.S" #include <msp430.h> ;------------------------------------------------------------------------------- ;;; ---- gcc doesn't know about PC,SP,SR,CG1,CG2 ---- #define PC r0 #define SP r1 #define SR r2 ;------------------------------------------------------------------------------- ;;; ---- CONSTANTS ---- //#define TEST_IRQ_OVERHEAD #ifndef TEST_IRQ_OVERHEAD #define _50USEC (50-1) /* @1MHz MCLK results in 50uSec/interrupt */ #define _500MSEC 10000 /* @1MHz MCLK results in 500ms/LED toggle */ #else ;; This test illustrates the minimum CCR0 value that can be used ;; 22 cycles is based on the interrupt overhead #define _50USEC 22 /* @1MHz MCLK results in 23uSec/interrupt */ #define _500MSEC 1 /* @1MHz MCLK results in 23uSec/LED toggle */ #endif #define _LED_PIN BIT6 /* PORT1 pin, Launchpad has BIT0=Red and BIT6=Green */ ;------------------------------------------------------------------------------- ;;; ---- Registers used as globals ---- #define LED_PIN r4 #define TIMER_CYCLES r5 #define INTERVAL_CNT r6 #define CNT r7 ;; or you could use some ram variables .lcomm tcycles,2 ; example use of local bss data variable .lcomm cnt,2 ; example use of local bss data variable ;------------------------------------------------------------------------------- .section .text,"ax",@progbits ;------------------------------------------------------------------------------- .global _reset_vector__ ; it is important to name it "_reset_vector__" ; we prevent the C runtime start code from getting ; linked by using this name _reset_vector__: ;; disable watchdog and set stack to highest RAM addr mov.w #WDTPW|WDTHOLD,&WDTCTL mov.w #__stack,SP ; gcc ldscripts compute __stack based on mmcu ;; initialize clock,gpio,timer init: ;; configure DCO to precalibrated 1MHz clr.b &DCOCTL mov.b &CALBC1_1MHZ,&BCSCTL1 mov.b &CALDCO_1MHZ,&DCOCTL ;; initialize global register values mov.w #_LED_PIN,LED_PIN ; load constant into register constant mov.w #_50USEC,TIMER_CYCLES ; load constant into register constant mov.w #_500MSEC,INTERVAL_CNT ; load constant into register constant mov.w INTERVAL_CNT,CNT ; initialize register based counter ;; initialize GPIO bic.b LED_PIN,&P1OUT ; LED turned off to start bis.b LED_PIN,&P1DIR ; Configure P1.0 as output pin ;; initialize TimerA0 mov.w #CCIE,&TA0CCTL0 ; Enable TA0CCR0 interrupt mov.w TIMER_CYCLES,&TA0CCR0 ; Set TIMER_CYCLES cycles mov.w #TASSEL_2|MC_2,&TACTL ; SMCLK, Continuous Up Mode ;; enable interrupts and loop forever ;; real work done in the CCR0 interrupt nop eint loop: ;; Note: could sleep here instead jmp loop ; cycles:2 ;------------------------------------------------------------------------------- ; TIMER0_A3_ISR - Timer0_A3 CCR0 interrupt handler for vector 0xfff2 ;------------------------------------------------------------------------------- .global __isr_9 ; to insert an interrupt vector into the vector ; table from assembly, we have to use a specific ; naming convention we must call this function ; "__isr_9" this forces it into the 9th vector ; slot counting from 0 starting memory address ; 0xffe0. It is 9 because each vector is ; 2 bytes so we end up in slot 0xfff2 ; all this is because of the way msp430-gcc ; works with interrupts ; .vectors in the msp430g2553/memory.x starts ; @ 0xffe0 ; there are numbered isr_0 ... isr_14 even though ; there are 16 vectors. isr_15 is actually called ; _reset_vector__ you can see how we use it in this ; code. ; see the file: ; http://www.ti.com/lit/ds/symlink/msp430g2553.pdf ; look at the "Interrupt Vector Table" page 11 __isr_9: ;; before we even start running the mcu does a push PC, and a push SR cycles:6 dec.w CNT ; have we looped INTERVAL_CNT times? cycles:1 jnz 1f ; exit if we haven't reached 0 cycles:2 ;; toggle led pin after (INTERVAL * TIMER_CYCLES) has occured xor.b LED_PIN,&P1OUT ; cycles:4 mov.w INTERVAL_CNT,CNT ; reinitialize interval counter cycles:1 1: add.w TIMER_CYCLES,&TA0CCR0 ; set new CCR0 and go again cycles:4 reti ; cycles:5 ; vim: ts=8 sw=8 expandtab: Put those in a new Energia sketch compile it for an msp430g2553 and it should produce output that looks like this: blink_with_msp430-gcc_asm.ino.elf: file format elf32-msp430 Disassembly of section .text: 0000c000 <main>: c000: 03 3c jmp $+8 ;abs 0xc008 c002: 0f 43 clr r15 0000c004 <__ctors_end>: c004: 30 40 5e c0 br #0xc05e 0000c008 <_reset_vector__>: c008: b2 40 80 5a mov #23168, &0x0120 ;#0x5a80 c00c: 20 01 c00e: 31 40 00 04 mov #1024, r1 ;#0x0400 0000c012 <init>: c012: c2 43 56 00 mov.b #0, &0x0056 ;r3 As==00 c016: d2 42 ff 10 mov.b &0x10ff,&0x0057 c01a: 57 00 c01c: d2 42 fe 10 mov.b &0x10fe,&0x0056 c020: 56 00 c022: 34 40 40 00 mov #64, r4 ;#0x0040 c026: 35 40 31 00 mov #49, r5 ;#0x0031 c02a: 36 40 10 27 mov #10000, r6 ;#0x2710 c02e: 07 46 mov r6, r7 c030: c2 c4 21 00 bic.b r4, &0x0021 c034: c2 d4 22 00 bis.b r4, &0x0022 c038: b2 40 10 00 mov #16, &0x0162 ;#0x0010 c03c: 62 01 c03e: 82 45 72 01 mov r5, &0x0172 c042: b2 40 20 02 mov #544, &0x0160 ;#0x0220 c046: 60 01 c048: 03 43 nop c04a: 32 d2 eint 0000c04c <loop>: c04c: ff 3f jmp $+0 ;abs 0xc04c 0000c04e <__isr_9>: c04e: 17 83 dec r7 c050: 03 20 jnz $+8 ;abs 0xc058 c052: c2 e4 21 00 xor.b r4, &0x0021 c056: 07 46 mov r6, r7 c058: 82 55 72 01 add r5, &0x0172 c05c: 00 13 reti 0000c05e <_unexpected_>: c05e: 00 13 reti Disassembly of section .vectors: 0000ffe0 <__ivtbl_16>: ffe0: 04 c0 04 c0 04 c0 04 c0 04 c0 04 c0 04 c0 04 c0 ................ fff0: 04 c0 4e c0 04 c0 04 c0 04 c0 04 c0 04 c0 08 c0 ..N............. To get your SD Card Bootloader running in Energia you would have to replace the blink.S with SDBSL-G2553.S and change your coding style to make msp430-gcc happy. You would also have to replicate all the code that the normal C runtime code does to create an environment for a C++ application. Basically you have to setup the .data section (copying the initial values from flash to ram), initialize the .bss section all to zero, loop through all the global c++ constructors, then call the users main function. blink_with_msp430_asm.zip
  5. 1 point

    Graphics Library for MSP432

    As long as it's the SPI verison, it will. If it's parallel, you will need have make updates to the code.
  6. 1 point
    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: https://github.com/drcrane/bslscripter-vs2017/releases 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: https://github.com/gbhug5a/CP2102-with-BSL-Scripter-for-MSP430 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: https://github.com/gbhug5a/MSP430-BSL 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.
  7. 1 point
    Rei Vilo

    Simple Radio Library for CC1310

    The CC1310 LaunchPad has a sub-1 GHz radio. On Energia, Install the EasyLink library by calling the menu Sketch > Include Library > Manage Libraries..., then select EasyLink and click Install. Select the board CC1310 LaunchPad. Call the menu File > Example > EasyLink > EasyLinkTX for the transmitter example. Call the menu File > Example > EasyLink > EasyLinkRX for the receiver example. Both examples work together. Obviously, you need two CC1310 LaunchPad boards!
  8. 1 point

    [POTM] dAISy - A Simple AIS Receiver

    Hi Ross, The best solution depends on what you want to achieve. If you want to build a chartplotter, then OpenPlotter or a standalone setup of OpenCPN would be a viable approach. Both will require a RPI 3 as the GUI of OpenCPN ps For OpenPlotter, I recommend the 1.0 image and not their latest alpha, unless you know what you're doing. For standalone OpenCPN, this tutorial worked for me. If you only want to track ships and may report to a website, then AISHub's rPiAIS is the quickest way to get up and running. More DIY alternatives are Kplex (which OpenPlotter uses under the hood) or some form of home-brew Python script. ais-forwarder to send received AIS messages over the network simpleAIS to decode AIS messages in your Python project You will find more AIS related projects under my Github stars. Best Regards, Adrian
  9. 1 point
    It was important to be sure, as the standard uploader DSLite doesn't work on macOS 10.14 but used to work on macOS 10.13. macOS 10.14 has changed the way USB ports are enumerated and named.
  10. 1 point
    Which release of macOS? See Information to Provide When Asking for Help macOS 10.14 — Upload to MSP430FR5994 Fails #69
  11. 1 point

    How to program "raw" CC1330 chip?

    Interesting. I did not know about these modules. Thank you for bringing this to my attention. Which module do you have (frequency)? These module are intended to be used as a network processor connected to an MCU. Looking at the user manual there is no serial loader implemented nor a way to update the firmware over the air. With that said, it seems that the modules expose the TCKC, TMSC and RESET line. You should be able to hookup these lines from the LaunchPad's XDS110 if you have one to program it with Energia. Please not that there are pin mappings specific for the LaunchPad that you might want to change.
  12. 1 point
    Rei Vilo

    MSP430FR6989 pins_energia file

    Check Add a New Board to Energia
  13. 1 point
    INTRODUCTION This guide's intent and purpose is to allow a user with minimal Linux experience to successfully setup an absolutely free development environment to program the STM32F0 microcontroller with full debugging capability. PREREQUISITES A Linux distro, I used Linux Mint 13 (Ubuntu works nicely too) An Internet connection At least 2gb of spare hard drive space Familiarity with terminal A STM32F0 Discovery Board! PART 1 – Install Codesourcy PART 2 – Install OpenOCD PART 3 – Install Eclipse PART 4 – Setup File Directory PART 5 – Setup Eclipse PART 6 – Configure the gdb/OpenOCD Hope you enjoy! Any questions, comments, feedback, feel free to sound off below.Also a STM32F4 guide is on its way. When it gets here depends on how much spare time I have.... Edit: Thanks bluehash! Guide is now hosted on arm-hq. v1-2 Downloads stm32f0_v2.doc
  14. 1 point
    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.
  15. 1 point
    I couldn't solve the problem with Mspdebug Solved with CCS Cloud on Windows : On Debug menu I could launch 'Recovery' then 'Update ' 🙂 Launchpad is now OK... next step : test again on Unbuntu 18.10 (without modemmanager holding TTY/ACM0....) OK with last Energia running on Ubuntu 18.10 (32 bit libmsp430.so coming Energie replaced by 64 bit one,)
  16. 1 point

    Places we buy things...

    I'm in the US, and I've generally had good results with Banggood. Their products are pretty much the same as you would find on Ebay, but they appear to care about customer service, at least in my experience. The biggest issue for me has been shipping. On two occasions I've paid a higher price to get something from the US warehouse, thinking that shipping would be much faster. But that hasn't worked. The last time I ordered, the items from China arrived before the US items, which took 18 days via DHL. I've become a real non-fan of US domestic DHL. They are much slower than anyone else. I mean, 18 days. There's no excuse for that. I don't know what shipping and customs problems you will have in Canada. Maybe someone else can advise you on that. But with regard to the products, I would generally feel comfortable with Banggood. Of course it depends on how much you're going to spend.
  17. 1 point
    so lets start simple, have you tried a different sd card? or tried a different sector? (not all SD cards are equal) have you made sure the card lock switch is in the correct position? (im sure you have but just want to make sure.) are you able or do you know how to use "dd" to see if you actually have written to the sd card? (dd is a command to either write or read raw data from a disk or image.) we want to verify that you are actually writing to the sd card The code looks good, but i dont use RTOS, and dont have a way to test at this time, im sure i could but I dont have time to get it wall setup.
  18. 1 point
    Hi sara, I can only give you limited support, and hopefully point you in the right direction......... Your HW does have SPI, so you should be able to write to SD cards with out issue. Try looking here the only thing I see is you have to change the code to fit your HW, I do not know if SSI is close to USCI or USI. also if you add more info on your setup we maybe able to guide you in the right direction as well.
  19. 1 point

    Add MSP432 support to Arduino?

    not json but instructions given for linux https://github.com/RickKimball/tivac-core Assumes you have openocd and arm-none-eabi-gcc in your path. Probably won't work for windows. Probably will work for OSX.
  20. 1 point
    Check the menu Files > Examples > LCD_LaunchPad.
  21. 1 point

    MSP430 Nixie Clock

    Hi All, I just finished assembling and modifying this kit for my SO for Christmas. I put it in a vintage toaster from 1910. Works great and so cool! However, watch out for shorting anything while the clock is powered - I fried some transistors while playing around with it. In any case, I made quite a few modifications and will post them here. I added the following components to the kit: Arduino UNO I had lying around. Random photodiode I had lying around. Adafruit RTC module: https://www.adafruit.com/product/3013 Adafruit motion sensor: https://www.adafruit.com/product/189 I modified the code to use the photodiode and motion sensor to control the brightness of the display using PWM. I have attached that. It is not written with extreme discipline, but it works Let me know what you guys think, Saul main_v6.ino nixie.h
  22. 1 point
    This board is indeed obsoleted. It was replaced by the RED board many years ago. The TI-RTOS version it was based on no longer receives updates. Hence, it was time to retire this. If you still like access to this board then do the following: Open Energia's preferences (File->Preferences or on macOS Energia->Preferences) Located "Additional Boards Manager URLs" and paste the following link into that field: https://energia.nu/packages/package_msp432_black_index.json Go to the board manager and you should see the black board appear again. Good luck with your Robot project. Robert
  23. 1 point
    Hello everyone, There is a couple of similar projects available on the internet. Some of them base on Arduino and PIC performs very basic mount control without math intensive computation implemented in embedded controller. I decided to build my own with the following goals: ease of use by an inexperienced amateur astronomer (full automatic operation) precision and resolution of position last but not least: the price Final, or better say at the moment, design comprises of the following components: Stellaris LM4F launchpad central control unit, two ULN2003 unipolar stepper motor driver chips, two 28byj-48 stepper motors one moving in azimuth, and in elevation via gear train, communication module: Bluetooth serial module. It allows sending a coordinate set-point and provides position feedback to Stellarium, GPS module providing position and precise time reference - PPS gives 1us accuracy, Nokia 5110 display unit and joystick for standalone operation, now obsolete mouse (PS/2) modified to provide independent (incremental) position information Resolution that was reached is a single step of approx. 5". Given the size of Jupiter to range from 30" to 50", this positioning resolution makes the view comfortably stable in standard 60° FOV eyepiece at reasonably high magnification, without the need to adjust AZ/ALT continuously. During the development I made use of several opensource and projects available online, namely: AccelStepper for stepper control, TinyGPS++ for NMEA decoding, Arduino telescope controller was my inspiration and reference for Taki's matrix method for coordinates transformation, of course Energia as my IDE Upon power-up the mount is performing: homing acquisition of current location (longitude/latitude) and time via NMEA stream moves to 3 brightest (most convenient) stars in succession to perform 3 star alignment procedure - they are selected from the list of over 500 stars in built-in catalog (the brightest are used for the alignment, tough), once aligned the mount is in tracking mode: it tracks the view to counter the apparent movement of objects in the sky, waiting, either for the user to move to particular object - selected from the library of stars and Messier objects, or awaits connection via Bluetooth from a PC running Stellarium with a plugin and slews to selected object. search for the object that should be visible in the eyepiece and display important information on LCD - I compiled in 500 brightest stars from HYGXYZ and full Messier catalog. I have very little experience as amateur astronomer so far, so some of the objectives might have been not very obvious for me in the beginning. This project was also a good way to make use of my free time and gain experience in embedded system design. With kind regards, Szymon
  24. 1 point

    [POTM] dAISy - A Simple AIS Receiver

    The radio on its own does not much. It needs an MCU to control it and talk to the computer, which is the MSP430 Launchpad in this case. See the first post of this thread and just replace the custom breakout board with the Ebay radio (minus the changes in wiring as documented). There are several options to program the LaunchPad. For this project I used TI's full IDE Code Composer Studio (CCS). http://www.ti.com/ww/en/launchpad/software.html The repository I published on Github includes the CCS project file. https://github.com/astuder/dAISy Simply copy the whole tree into your CCS workspace and open it in CCS. From there you can compile the code and program the LaunchPad. The radio configuration data generated by WDS is in the radio_config.h source file. dAISy USB is the standalone version of all this, where I designed and built my own PCB that includes radio and MCU on one board.
  25. 1 point

    [POTM] dAISy - A Simple AIS Receiver

    Good news for everyone having difficulties sourcing the Si4362 radio IC. I verified that the transceiver Si4463 works with dAISy. This probably also applies to Si4460 and Si4461. Besides being more widely available through distributors, more adventurous souls can even find these ICs on Aliexpress. Even better news for those that want to recreate my project with minimal effort: Si446x based radio modules are sold on eBay and elsewhere. I bought the E10-M4463D from eBay for $7.99: http://www.ebay.com/itm/100mw-433MHz-SI4463-Wireless-Transceiver-Module-With-Antenna-2100m-/151243201316 I chose this module over others because all pins of the radio are broken out to headers. Unfortunately two pins (GPIO2 and GPIO3) are reserved to control the RF switch that connects the antenna with RX or TX channels. But after a few minor changes to my code I had dAISy working. Here's the branch on Github: https://github.com/astuder/dAISy/tree/E10-M4463D The wiring changed: GPIO0 -> P2.0 NIRQ -> P2.5 GPIO2, GPIO3 -> no longer connected to the LaunchPad As the modules are built for 433 MHz and AIS is using 162 MHz, I had to replace antenna and passives on the RX side. The new passives from left to right are (ignoring the obvious 0-ohm resistors) 11pF, 150nH, 13pF. As you can see the 0603 components are a very tight fit. I reflowed them with a hot air station instead of using a soldering iron. The clunky thing on the right is a BNC connector, SMA probably would have been a more elegant fit Technically, it's still not ideal. The traces might be impedance matched to the original frequency. However a quick real-world test demonstrated similar sensitivity as my original breakout boards. EDIT: added wiring information EDIT: added link to Github