toozie21 1 Posted October 30, 2013 Share Posted October 30, 2013 OK, so my Launchpad came in and I finally had some time ot start playing with it and learning the 430. I've been mucking with the example codes to try and get my feet wet, but I am having no luck with the hello.c hello world application. How is that supposed to work? I figured it is using printf() to send the string out the USB port, so I setup a serial terminal to look at the port at 9600, 57600, and 115200 baud and didn't see anything coming out? Is there something I am missing for what I need to do here? I am using CCS as my IDE. Thanks! Quote Link to post Share on other sites
chicken 630 Posted October 30, 2013 Share Posted October 30, 2013 printf with CCS is explained here: http://processors.wiki.ti.com/index.php/Printf_support_for_MSP430_CCSTUDIO_compiler Note that printf and serial communication stack will use a fair amount of memory, so this will only work with the larger MSP430 chips (F5529 should be fine, G2533 won't work without resorting to custom I/O libraries). If that looks overly complex, you should consider starting with Energia, where printf("hello world!") is more straight forward. PS: In case you stick with CCS, this thread will be of great help to get printf working on smaller devices http://forum.43oh.com/topic/1289-tiny-printf-c-version Quote Link to post Share on other sites
toozie21 1 Posted November 1, 2013 Author Share Posted November 1, 2013 Well, maybe I should rephrase my question. If I wanted to do something SUPER simple to get started (like poll the ADC, and send the value to the terminal), how would you recommend I get started (this test would allow me to test things, get used to the 430, and have a way to print debug)? Quote Link to post Share on other sites
amstan 18 Posted November 1, 2013 Share Posted November 1, 2013 Well, maybe I should rephrase my question. If I wanted to do something SUPER simple to get started (like poll the ADC, and send the value to the terminal), how would you recommend I get started (this test would allow me to test things, get used to the 430, and have a way to print debug)? What i do is I go to the chip's page and open up the code samples, generally there's one for every peripheral use case. Take bits from that and adapt it to your uses. If you need to customize them check the family's datasheet. Quote Link to post Share on other sites
chicken 630 Posted November 2, 2013 Share Posted November 2, 2013 For super simple, use Energia, basically the Arduino of MSP430. Look up Serial.print for debugging via text output. With CCS, you can start your program in the debugger and set breakpoints to look at variables instead. Quote Link to post Share on other sites
toozie21 1 Posted November 5, 2013 Author Share Posted November 5, 2013 OK, I think I found what I was looking for. There is the USB backchannel project that TI supplies for the CC IDE. I built it and it allows you to echo transfers characters from the USB back-channel to the MSP USB-serial channel and vice versa. I should be able to take that and rework it for what I needed. Quote Link to post Share on other sites
rampadc 29 Posted January 1, 2014 Share Posted January 1, 2014 Not sure if you still need the help, but it's probably easier if you use UART instead. The 5529 LP has a UART COM port interface when plugged in with USB so you can use that to listen to, at baud rate up to 115200 (maximum I've used). You can use oPossum's printf function: http://forum.43oh.com/topic/1289-tiny-printf-c-version/. Attached is a class that allows you to use oPossum's function. All I did was adding appropriate registers that 5529 uses. You can also install RXTX terminal plugin for Eclipse if you want a more compact feel. http://processors.wiki.ti.com/index.php/How_to_install_the_terminal_plugin_in_CCSv5 Printf.hPrintf.c dmlr7 1 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.