Question about ARRAYWRITE


Results 1 to 14 of 14

Threaded View

  1. #10
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156


    Did you find this post helpful? Yes | No

    Unhappy

    I've been looking at this all day, and it just doesn't work:



    Code:
    'PIC18F6722
    OSC 40
    ARRAYSIZE  CON  20
    DJAM      CON     %01110111
    ACK       CON     $06 
    COMMAND   VAR     BYTE[20]
    MESSAGE   VAR     BYTE[20]
    
    LOOP1:
    ARRAYWRITE MESSAGE,[HEX ACK," ",BIN DJAM]
    ARRAYREAD MESSAGE, [COMMAND]
    DEBUG STR COMMAND,10,13                                                     
    ARRAYWRITE MESSAGE,[REP 0\ARRAYSIZE]
    PAUSE 1000
    GOTO LOOP1
    
    OUTPUT:
    61110111
    If I just say "HEX ACK" it produces 61110111 (no space as I specified). If I try to use "HEX2 ACK", it doesn't show the first value OR the space, just the binary number! I need to write some rather complicated structured messages and store them, but I've found that

    1) IN NO CASE will ARRAYWRITE write more than two items... (if there is more, they just don't show). The exact same structure prints fine using DEBUG.

    For example: ARRAYWRITE MESSAGE, ["DJ_TMR",DEC X,":",DEC DJ_TMR[X]] will only show the first two values... DJ_TMR, and DEC X - nothing further.

    2) ARRAYWRITE won't work with indexed variables.

    All efforts done in PBP 2.60A. If anyone can tell me what I'm doing wrong, I would be most grateful!

    L.
    Last edited by circuitpro; - 30th July 2010 at 05:56.

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