Jump to content
43oh

Rickta59

Members
  • Content Count

    1,135
  • Joined

  • Last visited

  • Days Won

    71

Everything posted by Rickta59

  1. Really not my doing. The credit should go to gordon The only thing I did was try and fixup the script after the Free Soft Foundation shuffled their archives. You should all thank gordon! -rick
  2. I thought posting my numbers might be interesting for comparison. I'm off a little bit from the results you obtained. I'm using an msp430g2553. DCOCTL = 0; BCSCTL1 &= ~(RSEL3 + RSEL2 + RSEL1 + RSEL0); BCSCTL1 |= (RSEL3 | RSEL2 | RSEL0); //DCOCTL = 0; // 6.086MHz //DCOCTL |= (DCO0); // 6.415MHz //DCOCTL |= (DCO1); // 6.765MHz //DCOCTL |= (DCO1 | DCO0); // 7.17MHz //DCOCTL |= (DCO2); // 7.67MHz //DCOCTL |= (DCO2 | DCO0); // 8.31MHz //DCOCTL |= (DCO2 | DCO1); // 9.
  3. your delay code is probably getting optimized out. You might want to try using __delay_cycles() instead. Or even better use a Timer to get more accurate results. -rick
  4. @bluehash those might be something to add to the store -rick
  5. Rickta59

    Efficient Code

    You didn't mention which compiler you are using. If you are using msp430-gcc you should look at the 'msp430-objdump -S' command to view the compiler generated code. On CCS, there are check boxes that will output the mixed C + asm code. Make sure you are using compiler optimization before you bother to look. naken430util will give you cycle counts to help you decide which code is better. -rick
  6. Thanks for link! I agree with most of those great common sense suggestions. Personally, I think '_' underscores add nothing to readability. I tend to favor CamelCase as I find it easier to type and read. CamelCase vs underscores studies have been done that seem to give better marks to my choice. I also prefer K&R style curly braces over ANSI/ISO. I'm not sure where the science falls with that one. -rick
  7. I'm using c++ code with msp430-gcc with great results. I'm getting small code with readable syntax. My msp430-gcc was built with C++ support using gordon's fetcher/builder script. To compile c++ code I just use: msp430-gcc -Os -g -mmcu=msp430g2553 -o test.elf test.cpp There are some C++ things you probably want to avoid: 1.) libc++ - dynamic memory on micros is a recipe for disaster. Avoid new and delete unless used with placement new. 2.) new and delete ( reason already stated above ) 3,) exceptions and rtti - you don't want the overhead associated with these features. T
  8. 1. Bluehash------------------2 2. GeekDoc------------------6 3. Rickta59------------------3 4. 5.
  9. If you have a scope or a frequency setting on your digital meter, enabling the direction and selection bits will output the SMCLK on P1.4 The code below shows that and some different measurements I did on an msp430g2553 using the different no-modulated bit settings. These don't seem to jitter that much on the chip I was testing. @JMac3108, what kind of jitter are you experiencing? With the the 9.9MHz setting I used below I'm seeing a fluctuation between ~9.914MHz - ~9.928MHz. It seems like that is less than 1%. I'm not using precision instruments so this is probably bogus. Are you
  10. I was thinking more the song being from from the "I Robot" album. Mainly wondering if there was a template based robot on the horizon : ) -rick
  11. So does the Alan Parsons Project music indicate you have loftier goals than just a Nokia display? -rick
  12. I think you are getting a timer overlow interrupt and you don't have an ISR setup for it so it ends up in the wrong place. Add something like this: /* Interrupt Service Routines */ #pragma vector = TIMERA1_VECTOR __interrupt void TIMEROVERFLOW_ISR(void) { switch(TAIV) { case 0x0a: // timer overflow P1OUT ^= 0x01;// XOR bit0 of port 1 break; default: break; } } -rick
  13. I bought an Instek gds-1062a from tequipment.net however I see that have the Rigol ds1052E for $349 http://www.tequipment.net/RigolDS1052E.html?Source=Google I had a good buying experience with them. I'm guessing buying a Rigol from them would be good too. -rick
  14. I looked at EasyMSP before bothering with this code. Unfortunately the version I tried with msp430-gcc generated really bloated code. I could have modified the code to use macros to get the code size down, however then I would have lost the advantage of typesafe code checking I get for free with templates. However, I agree, it would be great to have a framework that works well with both msp430-gcc and CCS and isn't limited to 16k. There seems to be different approaches to makes it easier to write code for the msp430. If you live in the TI CCS world you can use GRACE to generate applica
  15. Maybe something like this: #include void _main() { // real code here } int main(void) { _main(); return 0; } -rick
  16. Have you see this? http://sourceforge.net/tracker/?func=detail&aid=3420924&group_id=42303&atid=432701 and this: http://sourceforge.net/projects/mspgcc/forums/forum/138167/topic/4952004 -rick
  17. Is 'i' a stack variable in main()? I seem to recall a bug and a partial fix in gcc. The partial fix meaning stack variables in main weren't fixed. Try calling a function from main that never returns. -rick
  18. You can always buy a microSD card that comes with an SD adapter. Something like the Transcend 2 GB microSD Flash Memory Card TS2GUSD or the Sandisk one. -rick
  19. It would be nice if they officially announced the new chip change. I'm guessing it would probably get TI a lot of attention. My Jan-18 order came with a Rev 1.5 board. It feels shiny and new. OK, I think it is time to tell all your friends the MSP430 water is fine, come on in! -rick
  20. I've been learning Eagle Cad. However, I thought about using it for something different than most of you. I like to keep my local Radio Shack in business so I created an msp430gxxx protoboard that is meant to be built with the RS part # (276-158B). http://www.radioshack.com/product/index.jsp?productId=2103798 That board has 750 predrilled holes with square solder pads on one side with column and row markings. First I created a board the size of the prototype, laid out my components, and routed the traces. Once I had it looking that way I wanted, I used the export feature to create an
×
×
  • Create New...