I'm using a PIC16F876A to do a self balancing robot. But I'm having a problem and I don't know more what I can do to solve this.
In addition to PIC I'm using one accelerometer and one gyroscope supplied by sparkfun in IMU combo board:
To simplify the accelerometer(ADXL320) when perpendicular to the earth surface will output 2.5V. For every gravity acceleration it's possible to see 312mV change on the 2.5V