Warning and Message


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2005
    Posts
    1,073

    Default Warning and Message

    PBP2.50
    MPASM
    PIC12F509

    I'm seeing...
    • Warning[202] ... Argument out of range. Least significant bits used.
      Message[306] ... Crossing page boundary -- ensure page bits are set.

    What do they mean? What, if anything, need I do?
    Code:
    '=======================| RF RECEIVER |=========================
    'MR26X.BAS
    'PIC12C509A @ 4MHz          529 words		uses MPASM
    
    'Pin 1 - Vdd
    'Pin 2 - GPIO.5
    'Pin 3 - GPIO.4
    'Pin 4 - GPIO.3
    'Pin 5 - GPIO.2 RS232 output @ 9600bps
    'Pin 6 - GPIO.1 Receives up to 48 bits of PDM/PWM RF with lead-in of 2-9mS
    'Pin 7 - GPIO.0
    'Pin 8 - Vss
    
    'TMR0 1:64 30=1.9mS, 145=9.3mS - 1:16 50=0.8mS, 94=1.5ms, 155=2.5ms
    '===============================================================
    
    @ __config _IntRC_OSC & _WDT_ON & _MCLRE_ON & _CP_OFF
    
    DEFINE OSCCAL_1K 1 
    DEFINE OSC 4
    	
    RF      VAR 	byte[6]
    i       VAR 	byte  
    bytes	VAR	byte           	
    sof  	VAR 	byte
    	                 
            SerOut GPIO.2,2,["MR26X",13,10]
            SerOut GPIO.2,2,["Copyright © 2009  dlh",13,10]
            
    init:	RF[0]=0:RF[1]=0:RF[2]=0:RF[3]=0:RF[4]=0:RF[5]=0
    	OPTION_REG=%01000101		'TMR0 1:64 prescaler, no PU
            While !GPIO.1:Wend		'wait rising edge	
            TMR0=0		                'clear TMR0
            While GPIO.1:Wend               'wait falling edge
            sof=TMR0			'read TMR0
            If (sof<30) Then init		'1920µS
            If (sof>145) Then init		'9280µS
            OPTION_REG=%01000011		'TMR0 1:16 prescaler, no PU
            While !GPIO.1:Wend		'wait rising edge
            TMR0=0				'reset TMR0	        	
            i=0
            Repeat
              While GPIO.1                  'wait falling edge
    	    If TMR0>155 Then break  	'2480µS
              Wend				'falling edge
              While !GPIO.1                 'wait rising edge
    	    If TMR0>155 Then break 	'2480µS
              Wend				'rising edge
              If (TMR0<50) Then init	'800µS
              If (TMR0>94) Then		'1500µS
                RF.0(i)=1				
              EndIf
              TMR0=0
              i=i+1
            Until (i>47)
    break:  If (i<12) Then init
            bytes=i/8
            If i//8 Then
    	  bytes=bytes+1
            EndIf
            SerOut GPIO.2,2,[i]
            For i = 0 to bytes-1
      	  SerOut GPIO.2,2,[RF[i]]
            Next    
            SerOut GPIO.2,2,[32,sof,13,10]
            GoTo init
    		
            End

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    dhouston, I would look at the .LST file and find the occurance of "warning" and then see what variable it is trying to manipulate. This should give you a clue...

    Dave Purola,
    N8NTA

  3. #3
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Here's the .LST file section...
    Code:
    00F9   0918               M         call    SEROUT
                          00078         SEROUT?C        0FFA9h
    Warning[202]: Argument out of range.  Least significant bits used.
    00FA   0CA9               M         movlw   0FFA9h
                              M         L?CALL  SEROUT
    By commenting out each SerOut instance (one-by-one) and recompiling, I isolated it to the copyright message. Without it, both the warning and message go away.

    I'll have to wait until Digikey ships my 12F509 chips to test it.
    Last edited by dhouston; - 10th September 2009 at 13:45.

  4. #4
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    dhouston , I just ran your code and if you get rid of the copyright character the code compiles... Where are you getting the copyright symbol anyways? I don't think the assembler understands it....

    Dave Purola,
    N8NTA

  5. #5
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dave View Post
    Where are you getting the copyright symbol anyways? I don't think the assembler understands it....
    It was copied and pasted from my source code for an Atmel AVR compiler. The ASCII chart in Appendix D of the PBP manual only goes to 127 so any extended character is likely to cause this. © is ascii 169 (depending on the font).

    EDIT: The same copyright line compiles and works OK with a 12F629. It must be a limitation of the 12-bit cores. Anything greater than Ascii 126 causes the error.
    Last edited by dhouston; - 10th September 2009 at 17:15.

Similar Threads

  1. PIC16F690 PBP boundary crossing warning message
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 9th May 2008, 11:17
  2. Advice please - Warning message
    By malc-c in forum mel PIC BASIC Pro
    Replies: 50
    Last Post: - 23rd January 2007, 13:20
  3. Micro Code Studio - Warning message
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th November 2006, 21:17
  4. MicroCode Studio Boundary Warning Message
    By coyotegd in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th March 2006, 09:13
  5. warning message
    By pic beginner in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 23rd July 2004, 02:53

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