missing high bits of word val


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    light speed project, that is funny! ;-)


    it just sends the array to a 2x16 lcd. hmmm, maybe i'm missing a modifier here


    Code:
    Print2LCD
      
        FOR Ndx=0 to 18
           hserout [  Tst_Array[Ndx] ]
        NEXT Ndx
        
    RETURN

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I do not have my manual with me but what if you change:
    Tst_Array VAR word[20]
    to
    Tst_Array VAR byte[20]
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Oct 2008
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    hey mackrackit & others

    i changed type to byte with the same results.

    when array is of type word, and using my debugger i see the element's value as of a word type having 16 bits. so the issue isn't with the array elements. i thinking it is the hserout performing as it is designed to do.

    what i'm seeing is the function hserout, and i assume the software version, serout, is sending values up to dec 255 then rolls back to dec 0 and starts the low bits all over again.

    going to try some things ... back soon ...

    thx

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Tst_Array[Ndx].highbyte, Tst_Array[Ndx].lowbyte ?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    Jan 2009
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    compiler returns this error: This style array syntax not supported

    i'm looking at this page now for some pointers,
    http://www.picbasic.co.uk/forum/show...ht=style+array


    maybe there is a limitation on the usart for sizes >byte or there is a register config setting i've missed on this 16f88.

    i'm looking into it, back later ...

  6. #6
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by archendekta View Post
    compiler returns this error: This style array syntax not supported

    i'm looking at this page now for some pointers,
    http://www.picbasic.co.uk/forum/show...ht=style+array


    maybe there is a limitation on the usart for sizes >byte or there is a register config setting i've missed on this 16f88.

    i'm looking into it, back later ...

    Then have a word variable like

    Code:
    Temp VAR WORD
    Then, modify the print routine as follow.

    Code:
    Print2LCD
      
        FOR Ndx=0 to 18
            Temp = Tst_Array[Ndx]       
            HSEROUT [Temp.LowByte,Temp.HighByte ]
        NEXT Ndx
        
    RETURN
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  7. #7
    Join Date
    Jan 2009
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    that worked sayzer. thanks.


    curious, this is the format for arrays in PBP to get word, longint values through usarts to radios?

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 08:55
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 16:23
  3. DS2760 Thermocouple Kit from Parallax in PicBasicPro
    By seanharmon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 9th July 2008, 00:19
  4. calculation problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2006, 16:23
  5. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 15:31

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