HSEROUT using STR modifier - length parameter as variable not working


Results 1 to 15 of 15

Threaded View

  1. #10
    Join Date
    May 2013
    Location
    australia
    Posts
    2,686


    Did you find this post helpful? Yes | No

    Default Re: HSEROUT using STR modifier - length parameter as variable not working

    it fails of course for more than 255 chrs

    Name:  roger.jpg
Views: 11329
Size:  159.9 KB



    Code:
    BalBuffer VAR BYTE[300]
    BalCount VAR word
    latb.7=1
    clear
    for   BalCount= 0 to 59
    BalBuffer[BalCount]=BalCount+"0"
    next
    
    
    for   BalCount= 1 to 59
    BalBuffer[BalCount+60]=BalCount+"0"
    next
    for   BalCount= 1 to 59
    BalBuffer[BalCount+120]=BalCount+"0"
    next
    for   BalCount= 1 to 59
    BalBuffer[BalCount+180]=BalCount+"0"
    next
    for   BalCount= 1 to 59
    BalBuffer[BalCount+240]=BalCount+"0"
    next
    BalBuffer[0]=13
    BalBuffer[60]=13
    BalBuffer[120]=13
    BalBuffer[180]=13
    BalBuffer[240]=13
    pause 2000
    debug "ready",13,10
    
    
    
    
    BalCount = 40
    HSEROUT ["40 ",STR BalBuffer\BalCount,13,10]
    debug   "40 ",STR BalBuffer\BalCount,13,10
    debug "full load "
    debug   STR BalBuffer,13,10
    HSEROUT ["full load ",STR BalBuffer,13,10]
    
    
    
    
    BalCount = 255
    HSEROUT ["255 ",STR BalBuffer\BalCount,13,10]
    HSEROUT [13,10]
    HSEROUT ["260"]
    BalCount = 260
    HSEROUT [STR BalBuffer\BalCount,13,10]
    end
    Last edited by richard; - 22nd February 2021 at 11:29.
    Warning I'm not a teacher

Similar Threads

  1. Determining variable length (number of digits) possible?
    By CuriousOne in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 21st December 2020, 21:05
  2. Measuring a variable freq/length pulse and generating more pulses.
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 18th September 2014, 10:10
  3. hserout not working with parity
    By Pic2008 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 24th March 2010, 14:25
  4. HSERIN for variable length string
    By Pic2008 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th February 2010, 06:58
  5. Serin2 and STR Modifier
    By _Ian in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 22nd June 2005, 17:25

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