Jump to content

miria

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. miria

    execution time

    Hi all, my question is how to calculate the execution time of a code in milliseconds. I'm using msp430f16. Thanks a lot
  2. I change the code like you said and the result is xk1=49902
  3. I wrote a simple code in C, but when I port it to mspgcc it doesn't give me the right value. This is my code: #include #include "uart1.h" #include #include #include #include int putchar(int c) { return uart1_putchar(c); } int main(void) { //variables unsigned short int xk=3588, yk=47541, yk1, sig=10, de=1; unsigned long xk1; uart1_init(); xk1=( xk+(sig*((unsigned long)yk-xk)*de)); yk1=xk1 % 65535; printf("xk1=%6lx\t\n,",xk1); printf("yk1=%u\t\n,",yk1); } THe result that I want is xk1=443118 and yk1=49908, but in mspgcc it gives me xk1=fffbc2ee and yk1=49902 I'm working with msp430-gcc-4.4.3 any idea thanks
×