Nov 10, 2012 #1 M 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: Nov 11, 2012
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
Nov 11, 2012 #2 I internetuser2k12 Banned Joined Jul 25, 2012 Messages 1,192 Helped 171 Reputation 342 Reaction score 162 Trophy points 1,343 Activity points 0 You have to select math library in Library manager.
Nov 11, 2012 #3 Tahmid Advanced Member level 6 Joined Jun 17, 2008 Messages 4,756 Helped 1,798 Reputation 3,588 Reaction score 1,656 Trophy points 1,413 Location Berkeley, California Activity points 30,586 Upload the code where you've used "pow" - the code that shows the error.
Nov 12, 2012 #4 M 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 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); } } }
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); } } }