HSEROUT No Output Problem


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1

    Default HSEROUT No Output Problem

    I have a problem that I can not seem to figure out. If I use the line of code:

    hserout [sign,dec3 temp/10,".",dec1 temp//10,10]

    I get nothing display in my serial window however it says that it is receiving bytes. If I remove the "sign" from the line it works fine. Can someone shed some light on this one for me because it is driving me nuts.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Have you tried using the DEC modifier before sign?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3


    Did you find this post helpful? Yes | No

    Default

    I load the variable with:

    Code:
        if temp.8 = 1 then                          ' If bit8 of temperature is set then its negative		
         sign = 45                                  ' Indicate temperature is NEGATIVE
         temp.lowbyte = temp.lowbyte ^ 255	        ' Reverse the bits of the lowbyte of TEMP
         sign = 160                                 ' Indicate temperature is POSITIVE
    	endif
    If I use DEC then my output is messed up. I did try it though and it does output.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Try this;
    Code:
    if temp.8 = 1 then                          ' If bit8 of temperature is set then its negative		
         sign = "-"                                  ' Indicate temperature is NEGATIVE
         temp.lowbyte = temp.lowbyte ^ 255	        ' Reverse the bits of the lowbyte of TEMP
         sign = "+"                                 ' Indicate temperature is POSITIVE
    	endif
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Same thing, I tried this approach as well.

  6. #6


    Did you find this post helpful? Yes | No

    Default

    I don't understand what it actually is that I'm sending since there is nothing displayed in the serial window. It just keeps increasing by 6 bytes at a time.

Similar Threads

  1. I2C Slave with a PIC
    By ralfmayr in forum mel PIC BASIC Pro
    Replies: 129
    Last Post: - 21st August 2016, 17:44
  2. HSEROUT and Commas, What? Help Me Understand
    By altech6983 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 20th July 2009, 19:12
  3. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 03:46
  4. HSEROUT Newbie question/problem
    By Mark Scotford in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 11th July 2006, 14:44
  5. HSEROUT Problem
    By Keith in forum General
    Replies: 2
    Last Post: - 25th June 2005, 15:09

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