Quote:
Originally Posted by Team2002
I was trying the following for our IR board and nothing seems to happen
Code:
if (rc_dig_in15 == 1)
{
pwm_13 = 256;
}
This was just to test if pressing a button on the remote did anything (the remote was already programmed etc,.)
is there anything wrong that we are doing?
|
Yes. The valid range of values for a pwm output is 0-254. Since the pwm "variables" in the code are of type
unsigned char, trying to set one to 256 will actually end up with it set to zero.
Quote:
This snippet was placed in the user_routines.c
is that the correct place or should it be under user_routines_fast.c?
|
You'll need to be a lot more specific about where you put the code. The filename is not really important. What matters is the name of the
function in which it appears: Process_Data_From_Master_uP(), Default_Routine(), Process_Data_From_Local_IO(), etc.