Serin serout problem


Closed Thread
Results 1 to 40 of 337

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post

    ZeroF: ' cases when zero celcius and 0 Fahrenheit

    end
    You do realize that 0C is not 0F right?
    0C = 32F
    0F = -17.78C

    Maybe it would be easier (if you really need to display both C and F) if you'd convert your initial celsius reading from the serin statements over to the Kelvin scale (0C = 273K, 0K = -273C), add in the correction factors, and then convert them back, taking into account the + and - as needed right before displaying the final numbers
    Last edited by skimask; - 29th December 2006 at 01:31.

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    You do realize that 0C is not 0F right?
    0C = 32F
    0F = -17.78C
    ------------ at 0F the program jumps to ZeroF taking into account that now both C anf F are negative


    Maybe it would be easier (if you really need to display both C and F) if you'd convert your initial celsius reading from the serin statements over to the Kelvin scale (0C = 273K, 0K = -273C), add in the correction factors, and then convert them back, taking into account the + and - as needed right before displaying the final numbers
    ----------- If I do that I will still have three posibilities with the same conversion won't I?
    I mean
    1) +C and +F
    2) -C and +F
    3) -C and -F

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    ----------- If I do that I will still have three posibilities with the same conversion won't I?
    I mean
    1) +C and +F
    2) -C and +F
    3) -C and -F
    And all based from the celsius value....
    1) if tempC > 0 then both C and F are positive
    2) if tempC => -17 and tempC <=0 then C is negative, F is positive
    3) if tempC < -17 then both C and F are negative

    or in Kelvin terms...
    1) if tempK > 273 then C/F +
    2) if tempK => 256 and tempK <=273 then C- and F+
    3) if tempK < 256 then C/F -

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    yes exactly, that,s what i meant, I omitted the numerical degrees.
    I believe this is what I have in my program.
    One glitch is that when is hits ZERO, it immediatly shows -5C, the conversion from C to F is good (making conversion from -5 to 23F) BUt it is not getting the right values between 0 to -5 C

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  3. serout and serin problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th April 2006, 19:44
  4. Replies: 11
    Last Post: - 13th July 2005, 19:26
  5. SerIn and SerOut
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 21st July 2004, 15:54

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts