Warning 202 Argument out of range. Least significant bits used


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Location
    Italy
    Posts
    72

    Default Warning 202 Argument out of range. Least significant bits used

    Hi to everyone.
    After compiling my 6200 PBP lines long program, all goes fine, but also I've the following:
    Warning[202] C:\<myProgramPath>\Program.mac 2246 : Argument out of range. Least significant bits used.
    The line 2246 of the Program.mac file is like that:

    Code:
    2245 HSEROUT?C macro Cin
    2246        movlw   Cin
    2247        L?CALL  HSEROUT
    2248     endm
    2249 HSEROUT_USED = 1
    I'm using a PIC18F87J50 at 16MHz and used the great Mister-E PicMulticalc to set the serial ports. HSER1 to 115200 bps and HSER2 to 9600 bps, PicBasic Pro2.60c
    I cannot yet test the program, because I'm waiting the board where the chip is used.
    Anyone knows why this warning and what could cause if ignored?

    Thanks in advance for an answer.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,383


    Did you find this post helpful? Yes | No

    Default Re: Warning 202 Argument out of range. Least significant bits used

    the problem is not the macro, you are attempting to hserout a constant that is too big for it to swallow.
    somewhere in those 6200 lines of code is an attempt to hserout an constant type item who's value exceeds a single byte in size
    Warning I'm not a teacher

  3. #3
    Join Date
    Nov 2019
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: Warning 202 Argument out of range. Least significant bits used

    I recently encountered this same error message, and was confused as my code was executing properly. I was able to trace it through searching the *.LST file for "WARNING", and found it in a LOOKUP command. My byte length "index" ranged only 1 - 12, and my "variable" was defined as VAR WORD. But 3 of my constant values exceeded 255. Oops! All it took was changing to the LOOKUP2 command in order to handle word length constants. My code was executing properly because my index value was not reaching any of the word length constants. It would eventually have crashed.

Similar Threads

  1. Getting around asm - argument out of range - error
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th May 2015, 11:33
  2. Argument out of range - how to find what is causing it?
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd November 2011, 03:00
  3. MASM error 202 argument out of range
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 29th October 2011, 10:14
  4. Warning[202]
    By Del Tapparo in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th October 2008, 18:41
  5. Warning[202]
    By KVLV in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 16th December 2007, 10:30

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