BUG With MPLAB 8.89 ...


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648

    Default BUG With MPLAB 8.89 ...

    Hi, The team

    a new message arrived with Mplab 8.89

    Executing: "C:\PBP3\PBPX.EXE" -ampasmwin -k# -p12F1840 "Voltmètre12B.bas"
    PICBASIC PRO(TM) Compiler 3.0.6.4, (c) 1998, 2012 microEngineering Labs, Inc.
    All Rights Reserved.
    Message[303] C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\VOLTMèTRE12B.ASM 21 : Program word too large. Truncated to core size. (EF9C)
    Message[303] C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\VOLTMèTRE12B.ASM 22 : Program word too large. Truncated to core size. (DFFF)
    Message[303] C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\VOLTMèTRE12B.ASM 723 : Program word too large. Truncated to core size. (EF9C)
    Message[303] C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\VOLTMèTRE12B.ASM 723 : Program word too large. Truncated to core size. (DFFF)
    Loaded C:\Program Files\Microchip\MPLAB IDE\Projets\Voltmètre12B.COF.
    BUILD SUCCEEDED: Sun Jan 20 11:33:44 2013
    asm line 21/22
    Code:
    	__CONFIG	_CONFIG1, _FOSC_INTOSC & _WDTE_ON & _PWRTE_ON & _MCLRE_OFF & _BOREN_ON & _IESO_OFF
    	__CONFIG	_CONFIG2, _PLLEN_ON & _BORV_LO & _LVP_OFF
    line 723
    Code:
    	END
    This deals with the #CONFIG and END directives.

    Everything was fine with 8.88 Version.

    the .bas program :

    Code:
    '*******************************************************************************
    'Voltmètre12.bas
    '
    ' R/C Expanded scale Voltmeter W/ Calibration @ 5v000
    ' Pic 12F1840
    ' 12 Multiplexed Leds
    
    ' 2 Display modes :
    ' - Jumper ON is Actual voltage BAR Display
    ' - Jumper OFF is Minimun reached Voltage in BAR Mode, plus Actual Voltage in DOT Mode
    ' ( intended to show Voltage swing under load )
    '
    ' 985 Lines
    '*******************************************************************************
    
    ' Defines
    '*******************************************************************************
    DEFINE OSC 32							' not to disturb multiplexing !!!
    DEFINE BUTTON_PAUSE 255
    
    ' Config
    '*******************************************************************************
    
    #CONFIG
    
    	__CONFIG	_CONFIG1, _FOSC_INTOSC & _WDTE_ON & _PWRTE_ON & _MCLRE_OFF & _BOREN_ON & _IESO_OFF
    	__CONFIG	_CONFIG2, _PLLEN_ON & _BORV_LO & _LVP_OFF
    
    #ENDCONFIG
    
    '#DEFINE Debugg
    
    OPTION_REG	= %00000001
    WPUA		= %00001000
    OSCCON 		= %11110000					' !!! SCS 1:0 = 00 pour PLL ON !!!
    INTCON 		= 0
    PIE1 		= 0
    T1CON 		= 0
    T1GCON		= 0
    CM1CON0		= 7
    ADCON0		= %00000001
    ADCON1		= %11100011
    FVRCON		= %11010011
    
    LATA 		= 0
    TRISA		= 255
    
    '*******************************************************************************
    ' Aliases
    
    Modeselect 	VAR PORTA.3
    
    '*******************************************************************************
    ' Variables
    
    Nvalue	VAR WORD
    Ivalue	VAR WORD
    Calval	VAR WORD
    Nominal VAR WORD
    
    Mvalue	VAR BYTE
    Dvalue 	VAR BYTE
    Value 	VAR BYTE
    I		VAR BYTE
    J		VAR BYTE
    
    mode	VAR BIT
    modeI	VAR BIT
    
    CLEAR
    
    Mvalue 		= 12
    Dvalue 		= 12
    Nominal 	= 8388
    
    VDD_Res		CON 10
    FVrefmv 	CON 4096
    VRef_AD5	CON EXT
    @Vref_AD5 = (_FVrefmv *100000) / (500000000/ (1 << _VDD_Res))
    
    
    '*******************************************************************************
    FirstCalib:										' !!! 5v000 Supply for calib.!!!
    
    READ 0,WORD Calval
    IF Calval = $FF THEN Calib						' Calibration ever done ?
    PAUSE 2000										' Settling time
    
    Jumperon:
    
    BUTTON Modeselect,0,255,0,I,1,Calib				' Jumper ON : redo calib.
    GOTO test										' Jumper OFF : measure
    
    
    Calib:
    
    TRISA 	= %11111001									' Red Led ON
    LATA 	= %00000100
    
    PAUSE 1000											' Time to show LED
    
    ADCON1 = %10110000									' ADC temp. setting
    													' for Calibration
    WHILE !FVRCON.6 : WEND
    ADCIN 31,Calval										' Nominal 838.86 @ 5v000
    Calval = Calval * 10
    
    WRITE 0, WORD Calval
    	
    ADCON1 = %11100011									' ADC Norm. resetting
    
    LATA 	= 0
    TRISA 	= %11001111
    LATA	= %00010000									' Green Led ON
    
    PAUSE 1000											' Time to show Led !
    LATA = 0											' Display OFF
    												
    '*******************************************************************************
    test:
    
    Calval = Nominal									' just for the test !!!
    
    FOR Value = 1 to 12
    
    	Mode = 0 : ModeI = 0
    	GOSUB Display
    	PAUSE 200
    
    NEXT Value
    
    LATA	=	0
    Dvalue = 0
    
    '*******************************************************************************
    'Take jumper OFF While test or after PWR OFF to get Alternate mode @ first run
    '*******************************************************************************
    Displaymode:
    
    BUTTON Modeselect,0,255,0,I,0,First				' Display actual Voltage
    ModeI = 1										' IF Jumper OFF then Alternate mode
    
    '*******************************************************************************
    First:											' 
    
    ADCON0.1 = 1									'Launch First Conversion
    
    Wait0:
    FOR I = 1 to 16
    
    	IF ADCON0.1 = 0 THEN 
    		Nvalue = ADRESH*256 + ADRESL			' read ADC result if ready
    	ELSE
    		GOTO Wait0								' 50µs per conv.
    	ENDIF
    	
    	ADCON0.1	= 1								' relaunch conversion	
    	Ivalue = ( Nvalue +(Ivalue*9)) /10			' First Value for Ivalue
    												' = True value for Mvalue !
    NEXT I
    
    PAUSE 1000
    
    
    '*******************************************************************************
    Main:
    
    WHILE 1
    
    Wait1:
    	IF ADCON0.1 = 0 THEN
    	 	Nvalue = ADRESH*256 + ADRESL			' read ADC result if ready
    	ELSE
    		GOTO Wait1
    	ENDIF
    	
    	ADCON0.1	= 1								' relaunch conversion
    	Ivalue = (Nvalue + (Ivalue*9))/10			' Rolling average
    
    	Nvalue = Nvalue * Calval					' Works
    	Ivalue = DIV32 Nominal
     
    	GOSUB Convert
    	
    	IF Dvalue < Mvalue THEN	Mvalue = Dvalue		' Memorize Minimum
    
    '*******************************************************************************
    ' Prepare value to be displayed
    	
    	IF ModeI = 1 THEN 
    	
    		FOR I = 0 to Dvalue						' Bar Display Actual value
    			Value = I
    			GOSUB Display
    		NEXT I
    
    		ELSE
    
    		FOR I = 0 to Mvalue						' Bar Display Min Value 
    			Value = I
    			GOSUB Display
    		NEXT I
    
    			Value = Dvalue						' Add Actual Value dot
    			GOSUB Display
    	ENDIF
    
    WEND
    END
    
    ' SUBROUTINES
    '*******************************************************************************
    '*******************************************************************************
    Display:
    
    LATA = 0										'Prevent Ghosting
    
    LOOKUP Value,[%11111111,%11111001,%11111001,%11101101,%11101101,%11011101,%11011101,_
    			  %11101011,%11101011,%11011011,%11011011,%11001111,%11001111], TRISA
    
    LATA.1	= !!(value == 2)|| (value == 4) || (value == 6)
    LATA.2	= !!(value == 1)|| (value == 8) || (value ==10)
    LATA.4	= !!(value == 3)|| (value == 7) || (value ==12)
    LATA.5	= !!(value == 5)|| (value == 9) || (value ==11)
    
    
    PAUSE 1
    RETURN
    '*******************************************************************************
    Convert:										'Convert ADC Counts to LED#
    
    LOOKDOWN2 Ivalue, < [513,526,538,551,563,576,588,601,613,626,638,651,663,1024], Dvalue
    IF Dvalue > 12 THEN Dvalue = 12
    
    '*******************************************************************************
    ''Test purpose values set
    'LOOKDOWN2 Ivalue, < [551,563,576,588,601,613,626,638,651,663,676,688,700,1024], Dvalue
    'IF Dvalue > 12 THEN Dvalue = 12
    '*******************************************************************************
    RETURN
    END
    This is a nice multiplexed 12 Leds Volmeter ...

    Alain
    Last edited by Acetronics2; - 20th January 2013 at 10:43.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: BUG With MPLAB 8.89 ...

    This issue affects all languages. It is not specific to PicBasic Pro.
    It only affects the Enhanced core devices (12F1xxx and 16F1xxx).

    Programs are compiled correctly, but non-critical messages are reported.

    Those messages can be supressed with ...
    Code:
    #HEADER
      errorlevel -303  ; suppress Program word too large
    #ENDHEADER
    Hopefully Microchip will fix it.
    If not, PBP will need to suppress it by default.
    DT

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default Re: BUG With MPLAB 8.89 ...

    Quote Originally Posted by Darrel Taylor View Post

    Programs are compiled correctly, but non-critical messages are reported.
    Thank you Darrel ...
    as we ( mere mortals ) do not have possibility to verify compilation is correct ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Update

    This seems to be a permenant problem with MPLAB now.

    So with PBP 3.0.7.x and later, all [303] messages will be suppressed on the Enhanced core devices.

    If you are getting the "Program word too large. Truncated to core size." messages ... update your version of PBP3.
    Or, Even if you're not getting those messages ... update your version of PBP3.

    If you already have PBP3, the updates are free. So keep it up to date.
    http://pbp3.com/download.html

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Update

    After updating to 3.0.7.4 I get

    ERROR: Unable to execute MPASMWIN.

    My MPLAB is 8.85, does it matter?

    Ioannis

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default Re: Update

    Hi, Ioannis

    as the " bug " was linked to the lasts revs of MPLAB ... seems obvious you have to update MPLAB ...

    Everything fine here with MPLAB 8.90 and MCSPX ...

    Regards
    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Update

    Hi Alain. Yes it compiles OK now. I am in general reluctant to update MPLAB with no apparent reason.

    Of course now it (MPLAB) does not "see" my Pickit3...

    Thanks,
    Ioannis

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default Re: Update

    I played somewhat with my PK3 and the 18F45K20 demo board, from MPLAB IDE ...

    no problem noticed ... what happens to you ?

    BTW ... MPLAB became 8.91 version, now ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Update

    Yes, I downloaded 8.91.

    Normally I use the stand alone application for the Pickit2 and 3.

    From within the Mplab IDE, it says that Pickit3 was found but then it expected 4 bytes which were never received.

    ICD3 works OK by the way.

    It is not very serious problem for me, since I have other alternatives, just noticed it.

    Ioannis

Similar Threads

  1. A new MPLAB IDE
    By Acetronics2 in forum mel PIC BASIC Pro
    Replies: 55
    Last Post: - 6th May 2011, 15:31
  2. Mplab x ide
    By fowardbias in forum Off Topic
    Replies: 14
    Last Post: - 3rd February 2011, 08:32
  3. MPLAB 8.20 and PBP 2.50B
    By fbraun in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th February 2009, 16:50
  4. Using MPLAB SIM
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th July 2006, 04:20
  5. Mplab 7.22
    By Patrick in forum Documentation
    Replies: 3
    Last Post: - 1st June 2006, 06:32

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