ARRAYWRITE to print acsi string


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: ARRAYWRITE to print acsi string

    I will give that a try, but that will not suit my application. This is how I am trying to write to my 4D Systems display, I was hoping to minimize having to do a bajillion serout commands, and instead setup an array for the text.

    Code:
    myarray var byte[20]
    
    arraywrite myarray, ["Hello World",0]
    
    serout2 tx, baud, ["s", 0, 1, 2, white1, white2, myarray, $00]
    gosub wait1 'check for ACK from display
    Shawn

  2. #2
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: ARRAYWRITE to print acsi string

    Try
    Code:
    LCDOUT $FE,$80, STR myarray

  3. #3
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: ARRAYWRITE to print acsi string

    Thanks! Exactly what I needed!
    Shawn

  4. #4
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: ARRAYWRITE to print acsi string

    Do same for SEROUT2. STR sends bytes until it reaches byte with value 0. So always keep last byte in array cleared, because pbp doesn't check boundary.

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: ARRAYWRITE to print acsi string

    Or use STR myarray\x where x is the number of bytes.

    Ioannis

Members who have read this thread : 1

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