|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
integer division
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? |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The awesome NON-INVITE FANTASY FIRST Draft | Tim Delles | Fantasy FIRST | 73 | 29-04-2005 08:25 |
| IRI popularity index | Joe Ross | Fantasy FIRST | 5 | 03-07-2004 12:36 |
| Fantasy FIRST Battlecry Division 3 | Joe Ross | Fantasy FIRST | 76 | 23-06-2004 11:00 |
| FF CW Division #2 | Joshua May | Fantasy FIRST | 46 | 08-06-2004 00:45 |
| Fantasy FIRST BtB, division #3 | SilverStar | Fantasy FIRST | 46 | 21-05-2004 21:50 |