Jump to content
43oh

Rickta59

Members
  • Content Count

    1,135
  • Joined

  • Last visited

  • Days Won

    71

Everything posted by Rickta59

  1. Or you could just override the putchar() c function and then you don't have to use a buffer. -rick extern "C" { int putchar(int c) { Serial.write((uint8_t)c); return c; } } void setup() { Serial.begin(9600); printf("%s", "This is a really long string that would blow out an\n" "an arbitrarily sized buffer on the stack, but this\n" "should work just fine\n" "Lorem Ipsum is simply dummy text of the printing and\n" "typesetting industry. Lorem Ipsum has been the industry's\n" "standard dummy text ev
  2. http://lmgtfy.com/?q=raspberry+pi+cdc_acm+driver+problems+3.6.1
  3. Sorry, I should have said look for cdc_acm problems with the linux distro you are using on your raspberry pi. See if others are having any problems with cdc_acm devices.
  4. Yes, before I patched my kernel I couldn't use the serial port on ubuntu 11.04. Once I patched my kernel, it was fine. If you want better serial support, you can purchase an FTDI usb converter or a pl2303hx converter. With those devices you would disconnected the j3 serial jumpers and plug your tx/rx pins into the usb converter tx/rx. Both of those devices have great driver support on linux and can use higher baud rates with your msp430. However, both are going to cost more than the msp430 launchpad itself.
  5. you might want to search raspberry pi forums for the linux kernel you are using. cdc_acm drivers might be your problem.
  6. For what it's worth, I was able to use this successfully with P2_0. Thanks! -rick
  7. I recently posted a software only uart template that uses inline asm. Look at the sw_serial.h file: http://forum.43oh.com/topic/3366-energia-library-sw-serial-t-template-based-uart-code/
  8. Energia uses msp430-gcc under the hood. You should follow the inline assembly guide here: http://mspgcc.sourceforge.net/manual/c1308.html
  9. http://forum.43oh.com/topic/2415-example-of-gnu-msp430-assembler-isr-handler/?p=20381
  10. http://elabz.com/msp430-in-64-bit-ubuntu-12-04-linux-the-arduino-way/ https://github.com/energia/Energia/wiki/Linux-Serial-Communication http://forum.43oh.com/topic/3011-problem-launching-energia-mint-12-linux-java-error/
  11. The WS2811Driver::write() method is blocking a call. It will disable the watchdog interval ISR while sending data to the ws2811 chip. This is the only way to achieve the required timing. If you are doing interrupt processing you should disable it before calling write(). It seems like you should be able to do what you want with some careful attention to what is running when. Of course it all depends on how many leds and the framerate of your animation. -rick
  12. I was looking for a quick test for a print format routine and came up with that. I see now that it is undefined behavior and can't be relied on. However, with that said, I'm going to provide code to other people who will surely abuse it. At least, I have an answer to their future questions.
  13. I've been working on some C++ template based classes and ran into a snag. Turns out when I reduced the code down to a straight 'C' implementation I still have the same problem. The code below has issues with the int8_t data type. If you start at 126 and increment it should roll over to a negative number but it doesn't. This problem seems to appear when i use -Os ( which is my normal mode of operation ) and does go away if you back off and use -O1. I'm not sure if Peter is still following compiler development. If nothing else it would interesting if others try this with their version of the
  14. The streaming.h stuff works hand in hand with the Print class of Energia. You could implement the same thing in non-energia code by providing print functions for all the different data types you use. Look at the implementation of Print.h in Eneregia for an example of what it does. You could also just provide your own '<<' operator implementation in classes you want to use this feature.
  15. Yet another software only serial class implementation? What makes this one different? C++ template based with asm routines to implement read and write. Works with any pin and port combination. You can mix and match, put read on P2.0 and write on P1.2. Small size even with Energia. Multiple instances allowed. Each instance uses about 12 bytes so you are only limited by the number of pins and memory on your chip. Big plus, doesn't use the timer. Read on if this piques your interest. This code implements a C++ template based software only blocking serial UART class. It doesn't use the timer peri
  16. How did you wire up your Ping sensor? Where are you getting the 5V? How are you reading and writing the signal pin using 3v3?
  17. Serial.print("some variable value:"); Serial.println(someVariable);
  18. The msp430 chips can run the CPU at many different speeds. Running at 1MHz means your instructions work at 1/16th the speed of a chip running at 16MHz
  19. BTW: most msp430 are 3.3v device that aren't 5v tolerant. You will have to cut the signal voltage down to 3.3 to use it on the msp430 without damaging the pins.
  20. Are you sure you have the msp430g2553 selected? Look under Tools/Board menu and select the g2553. This script fails on the msp430g2231 ( default ) but is fine on the g2553.
  21. Can you provide a url to which ping example? Seems to be a few.
  22. Hmm .. i've been complaining about the conversion of stuff for a long time. I didn't paste it that way .. The link used to be valid before the conversion from phpbb... this is just like the way the old code got hosed.
  23. Sorry I didn't mean to scare you off .. If you are using the Stellaris launchpad that is using an ARM chip LM4F120H5QR. If you are trying to use code written for the an msp430g2553 ( the chip in the msp430 launchpad ) then that code isn't going to work. #include <msp430g2553.h> ... means the code is written for an msp430 launchpad If you are using the stellaris launchpad you should disregard anything written on this site and join http://forum.stellarisiti.com/ -rick
×
×
  • Create New...