dchaplinsky 1 Posted August 29, 2012 Share Posted August 29, 2012 Also searched for this on forums and internet without any success. Quote Link to post Share on other sites
Rickta59 589 Posted August 29, 2012 Share Posted August 29, 2012 Did you want a SoftwareSerial so you can use any port? Or did you just want a Serial implementation that works with a g2231/g2452? Quote Link to post Share on other sites
dchaplinsky 1 Posted August 29, 2012 Author Share Posted August 29, 2012 Any port actually, as I need two ports for my project, one to connect external device and second to communicate back to laptop. Github's wiki has some mentions of software serial port with mark TBA Quote Link to post Share on other sites
Rickta59 589 Posted August 29, 2012 Share Posted August 29, 2012 The TBA remark was in reference to TimerSerial and it has been implemented. Energia isn't really setup to use 2 serial ports. TimerSerial isn't meant to multiplex between various serial devices. Its purpose is to provide a simple implementation to talk to the host. To do what you are asking would require that you use the UART for one device and a either a custom timer serial or custom cycle counting serial. Neither of the secondary alternates are part of Energia. This doesn't seem to be a good fit for Energia. What are you actually trying to do? Quote Link to post Share on other sites
dchaplinsky 1 Posted August 29, 2012 Author Share Posted August 29, 2012 At the moment I'm porting my project for Arduino Nano which reads some data via software serial from LC-1 device and sends decoded data back to laptop so I can debug. Current state of the project doesn't really require TWO serials (second is used for debug purposes) and I believe that I can port it to LaunchPad without big hassle. However further plans for this project requires another one serial input to read data from another device and combine them with data coming from LC-1 Quote Link to post Share on other sites
Rickta59 589 Posted August 29, 2012 Share Posted August 29, 2012 You could the launchpad with mspdebug and msp430-gdb for true hardware debugging. However, that isn't supported directly from the Energia environment. You would have to use the command line tools to get at that capability. Unfortunately it doesn't solve your other requirement of using two ports in the future. What you want to do is possible. However, it would be best accomplished using native code to program the peripherals using a lower level access than the Energia API provides. You can look in the projects section of this forum for serial code that uses cycle counting and bit banging to implement alternate serial port capability. dchaplinsky 1 Quote Link to post Share on other sites
dchaplinsky 1 Posted August 29, 2012 Author Share Posted August 29, 2012 Thanks for the answer! Seems it would be simpler to switch back to Arduino for big project and leave Launchpad for smaller fun. Quote Link to post Share on other sites
Rickta59 589 Posted August 29, 2012 Share Posted August 29, 2012 Or spend some time and get a deeper understanding of the msp430 peripherals and architecture. Quote Link to post Share on other sites
dchaplinsky 1 Posted August 29, 2012 Author Share Posted August 29, 2012 Well, the answer is yes and no. At the moment I'm having fun with microcontrollers to dilute my day-to-day work on various web projects. Diving to deep into architecture is a bit out of scope of my interest, I have no intention to become a msp430 or atmel ninja at the moment Getting project done is my biggest priority and hardware decisions is not a limitation but a tool. Of course I can turn this to a kind of challenge for myself to increase my motivation but Quote Link to post Share on other sites
esculli 0 Posted April 4, 2013 Share Posted April 4, 2013 I'm looking for the same that @@dchaplinsky was looking for. I'm using Hardward Serial to connect to a GSM modem, while I want to use a 2nd Serial connection to the PC (only for debugging processes). I've found the following libraries in GitHub where SofwareSerial are implemented for MSP430: https://github.com/energia/Energia/tree/master/hardware/msp430/libraries/SoftwareSerial I tried to run the example that it's provided there, but I'm getting the following error when building (SS2 is the name of my Sketchbook): e:/energia/hardware/tools/msp430/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld.exe: SS2.cpp.elf section `.bss' will not fit in region `ram' e:/energia/hardware/tools/msp430/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld.exe: region `ram' overflowed by 16 bytes collect2: ld returned 1 exit status This error only happens if the line mySerial.begin(9600); is included. If I comment the line from, it builds fines, but of course, it doesn't work as expected when running. Any clues or thoughts about it? Thanks in Advance! Quote Link to post Share on other sites
Rei Vilo 695 Posted April 4, 2013 Share Posted April 4, 2013 If you only need a basic TX serial port esculli 1 Quote Link to post Share on other sites
esculli 0 Posted April 5, 2013 Share Posted April 5, 2013 Thank you Rei Vilo! As I said, this is mainly for debugging proposes. If I can use the TX serial port library to only send information to the PC, and I can use the Hardware Serial to connect to the GSM Modem, that could work. If I'm correct, to do what I've described using the LaunchPad, I'll need to do some jumpers configuration, because by default, PC serial connection is directly connected to PIN1.1 & PIN1.2 (Hardware Serial). If I disconnect J3 Jumpers TXD & RXD, and I connect them to other ports (like PIN1.3 & PIN1.4) manually, should it work as I expect? Thanks, Ezequiel Quote Link to post Share on other sites
Rei Vilo 695 Posted April 5, 2013 Share Posted April 5, 2013 Please have a look at the Hardware pin mapping and Serial-Communication on the wiki. esculli 1 Quote Link to post Share on other sites
esculli 0 Posted April 5, 2013 Share Posted April 5, 2013 Thank you Rei Vilo! I could make it work =) As a conclusion, I'd like to recommend using TX only Serial library when you're looking for connect to the PC for debugging proposes. This enables you to use Hardware Serial to connect to other devices that needs read/write from a serial connection. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.