the following is part of kevins accelerometer code
Code:
#include "p18f452.h"
#include "accel.h"
unsigned int X_Axis_Total_Period = 2/1000; // x-axis total cycle time (T2 in the data sheet)
unsigned int X_Axis_Pulse_Period = 0; // x-axis amount of time the pulse is high (T1 in the data sheet)
unsigned int Y_Axis_Total_Period = 2/1000; // y-axis total cycle time (T2 in the data sheet)
unsigned int Y_Axis_Pulse_Period = 0; // y-axis amount of time the pulse is high (T1 in the data sheet)
my debugger says it loops in a file called 16 bit integer division leading me to think that it hangs on the 2/1000 definition of t2
any ideas?