Shop OBEX P1 Docs P2 Docs Learn Events
Reading the AD592 using the RC TIME command How would I do the Math for this Ce — Parallax Forums

Reading the AD592 using the RC TIME command How would I do the Math for this Ce

sam_sam_samsam_sam_sam Posts: 2,286
edited 2008-07-31 03:32 in General Discussion
How can·I change the reading from degrees Kelvin to Fahrenheit

······· ·K]·=·([noparse][[/noparse]°F]·+·459.67)·×·59

How would I do the Math for this



Fahrenheit to Celsius C = (F - 32) x 5/9





Figure 2-9b Temperature Conversion Formulas Conversion Formula Example



Celsius to Kelvin K = C + 273 21 oc = 294·K

Kelvin to Celsius C = K - 273 313 K = 40 oC

Fahrenheit to Celsius C = (F - 32) x 5/9 89 oF = 31.7 oC

Celsius to Fahrenheit F = (C x 9/5) + 32 50 oC = 122 oF



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·idea.gif·that you may have and all of your time finding them

·
·
·
·
Sam

Post Edited (sam_sam_sam) : 7/31/2008 1:02:02 AM GMT

Comments

  • ZootZoot Posts: 2,227
    edited 2008-07-31 01:02
    Algebra:
    K = ([noparse][[/noparse]°F] + 459.67) × (5⁄9)
    K / ( 5/9 ) = F + 459.67
    ( K / ( 5/9 ) ) - 459.67 = F

    Integer Math:
    KelvinOffset CON 460 ' 459.67 from above
    ' 1 / (5/9) = 1.8
    ' 1.8 * 256 = 460.8
    KelvinK CON 461 ' 460.8 from above
    Faren VAR Word

    Faren = K */ KelvinK - KelvinOffset

    Then remember that if the result (Faren) ends up with BIT15 being set to 1, then the result (Faren) is a NEGATIVE number.

    Also, I have no idea if that formula is ideal -- I bet others could weigh in w/more accurate conversions (see emesystems.com -- I bet Tracy Allen covers this, with more precise math)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2008-07-31 03:32
    Zoot

    Thank You for your help with the math

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
Sign In or Register to comment.