MikroC error (function)!

Status
Not open for further replies.

Mahmoud90

Newbie level 6
Joined
Feb 13, 2012
Messages
14
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,360
Hello,
I write this code for Flasher wave and need to use "pow" function but there is an error says "math_double.c"



Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void main()
{
  int i;
  TRISB = 0;
  while(1)
  {
      PORTB = 1;
      Delay_ms(300);
      for (i = 0; i<=7; i++)
        {
          PORTB = (PORTB*2);
          Delay_ms(300);
        }
  }
}



Thanks in advance
 
Last edited by a moderator:

You have to select math library in Library manager.
 

The code that shows the error :

Code:
void main()
{
  int i;
  TRISB = 0;
  while(1)
  {
      PORTB = 1;
      Delay_ms(300);
      for (i = 0; i<=7; i++)
        {
          PORTB = pow(PORTB,2);
          Delay_ms(300);
        }
  }
}
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…