Hello I have been working on an analog temperature sensor TMP36 and I am trying to get the temperature and display it on the NEXYS3 SSD. I am aware the NEXYS3 does not have an analog pin and I built an analog to digital converter using the TI ADC0804 an 8-bit ADC. The part I need help with is particularly getting the input from the temperature sensor. I do not understand the data sheet well enough to come up with the formula in verilog. The only example I found was for an arduino in the link below
https://learn.adafruit.com/tmp36-temperature-sensor/using-a-temp-sensor
DATA SHEET
http://www.analog.com/static/imported-files/data_sheets/TMP35_36_37.pdf
I am powering the ADC with 5 volts and need help converting their formula to verilog.
Voltage at pin in milliVolts = (reading from ADC) * (5000/1024) Centigrade temperature = [(analog voltage in mV) - 500] / 10
Those are the two formulas I need help with. I need an formula equivalent in Verilog. The output to the SSD is an 8-Bit number in other words am only interested in temperatures 0-99 for my project. Thanks any help would be appreciated.