Quote:
|
Originally Posted by Morenoh149
so what does the (int) do?
does it make the PIC treat all variables (PWM_in2 & PWM_in1) in the Parenthesis like an int instead of a char ?
|
The (int) is something called an explicit typecast. It forces the variable right after it to be converted into an integer type, which in our case is a 16-bit signed type.
This "Limit Mix / why add 2000?" question is one that gets asked A LOT by teams up in Canada. I usually refer people to a post on the FIRST Greater Toronto Regional forums:
http://www.firstcanadianregional.org...opic.php?t=500
Hope that sheds some light into the situation!
-SlimBoJones...