Kastun27
Newbie
Hello everyone. I'm trying to figure out a method to output an angle from -90° to 90° on a 4-digit seven-segment LCD display via ADC and PIC16F84. Here are my components:
1) PIC16F84
2) ADC0831 ADC
3) AY0438 LCD driver
4) Varitronix VI-422-DP-RC-5 four-digit LCD
5) SCA60C tilt sensor
I'm using MPLAB and have managed to get this setup to display an input analog voltage from 0-5V using some basic code and a lookup table, but I'm a little stumped on how to output -90° to 90° from my tilt sensor. The SCA60C outputs 0.5V - 4.5V from -90° to 90°, with 2.5V at 0°. I'm assuming the output won't be the greatest considering it's an 8-bit micro, but close will suffice. I suppose 0-180° would work as well if it's easier, but I figured I could just use the middle segment of the 4th digit on the display for the negative values if possible.
1) PIC16F84
2) ADC0831 ADC
3) AY0438 LCD driver
4) Varitronix VI-422-DP-RC-5 four-digit LCD
5) SCA60C tilt sensor
I'm using MPLAB and have managed to get this setup to display an input analog voltage from 0-5V using some basic code and a lookup table, but I'm a little stumped on how to output -90° to 90° from my tilt sensor. The SCA60C outputs 0.5V - 4.5V from -90° to 90°, with 2.5V at 0°. I'm assuming the output won't be the greatest considering it's an 8-bit micro, but close will suffice. I suppose 0-180° would work as well if it's easier, but I figured I could just use the middle segment of the 4th digit on the display for the negative values if possible.