Jump to content
43oh

sven222

Members
  • Content Count

    41
  • Joined

  • Last visited

About sven222

  • Rank
    Advanced Member
  • Birthday 02/22/1977

Profile Information

  • Gender
    Male
  • Location
    Germany
  1. Slowly I think I find the problem. The linker options in the Codeblocks installation are like from the Codeblocks and MSP430 tutorial from this forum. And I did not change the compiler and linker settinge. When I change linker and compiler to the 2452 it compiles, but can not upload. So like you said Greg, that the start adress is wrong. If I change both settinge to the G2252 I get a new error message: ||=== Build: Debug in Brainmachine (compiler: GNU GCC Compiler for MSP430) ===| /usr/lib/gcc/msp430/4.6.3/libcrt0.a(_copy_data.o)||In function `__do_copy_data':| /build/buildd/gcc-msp430-4.6.
  2. Hi folks, sorry that I have so many questions in the moment, but I do not find to many other sources for help. I got a bunch of G2252IN20 for under 50cents a piece. Because of the pinout, that is quiet similar to the G2452 I thought I can program it with my launchpad. But when I put the chip into the launchpad, start mspdebug and try to download my code, I get the following error: Writing 818 bytes to 0xc000 fet: FET returned error code 7 (Could not write device memory) fet: failed to write to 0xc000 On an Energia site I found that this happens when you have choosen the wrong target, b
  3. I do not agree with you. The result on the bits is the same between &=0 end =0. So &=0 does definitely do something. With &= both bits have to be 1 for the result 1, so wit &=0 you set everything to zero. EDIT: I found another thing in one of ma former posts in this thread. This lines: P1DIR &= 0xFF; // Set P1.0 - P1.7 as output P2DIR &= 0xFF; // Set P2.0 - P2.7 as output They are useless and do nothing. They have to be replaced by: P1DIR = 0xFF; P2DIR = 0xFF; or P1DIR |= 0xFF; P2DIR |= 0
  4. Now I understand! So I should do always after reset, at the beginning of my program, P1SEL &= 0x00 and P2SEL &= 0x00? Then everything should be declared correctly. Thanks and greetings Sven
  5. @veryalive: Thanks for mentioning this. Even if I was not aware of this, I declared 2.6 and 2.7 at the beginning of my code as an output. After I got the information here, that I should declare all outputs, I did it this way: Declaring everything that is not an input as an output. And yes, you are right, I use a 2553, no energia. But the launchpad I only use to program the chip, the 2553 is on a single board, directly connected to a CR2032, a few switches as inputs and 4 outputs. Greetings Sven
  6. That is true. After all it is mostly a political/social decision to use gcc and other free software. The example code from the TI resource explorer supplied by TI also says often explicitly that you are not allowed to use this code in any project. WTF? Hello TI, that is not how you should treat your customers. I never understood the policy of any company, that you should pay for the development tools, if you use their hardware. So it is good, that TI supports the gcc development, but they still have a long way to go.
  7. I think that was not a battle. That was a disussion about some IDEs. That is ok and I also did not get more stupid through it. Up to now I did not know, that Energia can go to LPM4 for example.
  8. CCS for linux is realy a desaster. Nothing seems to be tested. The next thing is, that I am also not the biggest fan of eclipse, cause it is to heavy for an IDE. I prefer a silent computer and not a fan running on max speeb, only because I use a text editor. The enrgia editor is also not very comfortable. The toolchain of it is very comfortabel, so that is the easyest way to go. OK, discussion moved away from the original theme, but that was also solved. Thanks for all your help. Greetings Sven
  9. Thanks for all your replies. Yes I am not an Energia User. The MSP430 is for me the possibility to learn about
  10. Hi guys, on of the reasons for using the MSP430 is its ultra low power consumption but it is hard to find a short overview how to handle the IOs. My question is: If I go to LPM4 and only wake up through reset, how should I handle the IO Pins? Disconnect all pull ups/down? Make them input or output? My idea is, make them all outputs and write P1OUT and P2OUT to zero? Anything else important? I want to use a CR2032 and I think I do not need a power switch. Greetings Sven
  11. sven222

    Poor Man's PWM

    Hi Greg, thanks for your response. locks like it is the interrupts. So I have to have a lock for a real timer. Should be possible, because in the moment I only have two catch and compare used. Greetings Sven
  12. sven222

    Poor Man's PWM

    Hello to all, in one of my projects that is reincarnating every few month I needed some PWM. Unfortunately on a pin that does not support it. To keep things simple, I thought I can do some kind of poor man's PWM just in a simple for loop. But it seems to be more some kind of stupid man's PWM. Because it is flickering very strong. I thought I can do in the main routine something like: for (int i = 0; i < 10; i++){ // poor mans PWM if (i<brightness){ P1OUT |= 0x03; } el
  13. Thank you very much! The part with: IFG1 &= ~WDTIFG; IE1 |= WDTIE; I already found out, but I was still missing _EINT(); Now everything runs again. I also figured out why it was working the last time. Because before I did everything with CCS and the TI compiler. It seems to be more tolerant. Thanks for your help! Greetings Sven
  14. Can a moderator please move this in the msp430 general forum. I am not able to do so. Sorry for the inconvenience.
  15. Hello, a programm that was working on the MSP430G2553 is no not working any more. After a lot of trials, I found out, that my millis() function is not working any more. Since my Arduino times I like a function that is giving me ms back. Makes a lot of things easy. For this reason I set WDTCTL = WDT_MDLY_0_5; // (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1) /* 0.5ms at the end of my program, I call my interrupts, in this case: #pragma vector=WDT_VECTOR __interrupt void WDT(void){ doublemillis++; } and finally to come to my ms: // Function that is reuturning ms since startup unsigned long
×
×
  • Create New...