Jump to content
43oh

danieldlo09

Members
  • Content Count

    8
  • Joined

  • Last visited

Posts posted by danieldlo09

  1. Hi again, maybe you guys are getting tire of me by now, but i'm trying to make the exercises and all what appears on the tutorial http://www.43oh.com/2010/08/10-beginner-msp430-tutorials-and-counting/.

    Well, i got 

    count = contador();
    for (j=1; j<count; j++){
    P1OUT |= LED_L + LED_R;
    delayfun();
    P1OUT &= ~(LED_L + LED_R);
    delayfun();
    }
    

    it turns out that, it calls the function contador() normally and it do what it has to do, but when it has to call the function delayfun(), it skip it. and both of the functions are declared

    void delayfun (void);
    int unsigned contador (void);
    int main (void){...}
    int unsigned contador (void){...}
    void delayfun (void){
    int i;
    for (i=0; i<50000; i++){};
    return;
    }
    
    

    I all ready tried without the return statement, and also changing the type of the function for int and putting return 0 too, even i probed the pushy_G2211.c that is in the tutorial (http://mspsci.blogspot.com/2010/07/tutorial-07-pushing-buttons.html) and it does the same thing.(Obiously i changed the msp430g2211.h to the micro of my own)

     

     

     

     

  2. Not so long ago i bougth the LaunchPad MSP-EXP430G2 and ordered some free samples of MSP430g2152, later when i was doing testing codes i checked that when i assign an output to the P1OUT register, the P1IN register take the same value that the P1OUT, This was odd to me, so i went to the datasheet of the msp430 family and as i was expecting the registers have two different address (P1IN 020h and P1OUT 021H), now i don't know if i have something wrong in my code or if in fact the microcontroller change both registers. Can anyone explain me what's going on or if it is normal? I'm using Code Composer Studio

     

    Traducci

×
×
  • Create New...