This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Temperature sensor from Analogue to Digital

I am currently doing a mini-project on temperature sensor using 8051 micro-controller.

The 8051 micro-controller will receive 8bit temperature data from Analogue-to-Digital Converter which is connected to a temperature sensor(eg. LM35)

I have a problem in translating the 8bit data from ADC to a temperature reading (eg. 38 celcius)in keil. I hope to understand the structure or the procedure in carrying out this step. Thank you!

Parents
  • how can i programme to allow the incoming binary to becoming a temperature reading appearing on the keil?

    How about using an array? For example:

    float temp_table [256] =
    { ... };

    You could fill the array with the temperature readings for each A/D value from 0 to 255. Then, your program could read from the array whenever it needed a temperature for an A/D reading.

    Personally, I would take a close look at my high-school algebra book and not use a table (certainly not a floating-point table).

    Jon

Reply
  • how can i programme to allow the incoming binary to becoming a temperature reading appearing on the keil?

    How about using an array? For example:

    float temp_table [256] =
    { ... };

    You could fill the array with the temperature readings for each A/D value from 0 to 255. Then, your program could read from the array whenever it needed a temperature for an A/D reading.

    Personally, I would take a close look at my high-school algebra book and not use a table (certainly not a floating-point table).

    Jon

Children
No data