SHIFTOUT syntax not understood - can't send any variables contents, while text is ok


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: SHIFTOUT syntax not understood - can't send any variables contents, while text is

    SHIFTOUT sends the content of the variable in "binary" format, not as ASCII text - which I believe is what the display is expecting. It's like sending a variable using HSEROUT where you use the DEC-modifer to send the content of a variable as text instead of as a "raw number".

    Unfortunately SHIFTOUT does not (AFAIK) support any modifiers (DEC, HEX etc) so you need to do it manually. This compile but I can not test it.
    Code:
    temp = CNT_A / 1000
    GOSUB SendIt
    
    CNT_A = CNT_A - (temp * 1000)
    temp = CNT_A / 100
    GOSUB SendIt
    
    CNT_A = CNT_A - (temp * 100)
    temp = CNT_A / 10
    GOSUB SendIt
    
    temp = CNT_A - (temp * 10)
    GOSUB SendIt
    
    END
    
    SendIt:
      SHIFTOUT SDO, SCK, MODE, [temp + 48]
    RETURN
    /Henrik.

  2. #2
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Re: SHIFTOUT syntax not understood - can't send any variables contents, while text is

    Thanks a lot Henrik.

    Your code works effectively

    I'm not used to use the SHIFTOUT command so I got to learn how it works.

    Thank you.
    Roger

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