PBP3 Compilation problem


Closed Thread
Results 1 to 7 of 7
  1. #1

    Default PBP3 Compilation problem

    Hi, I had Upgraded to PBP3 sometime ago but didn't used it upto now, started using it from yesterday. As expected initial unexpected problems have come up. Following is my configuration, I just need some advise to set it up properly:
    1) Upgraded to MPLAB IDE v 8.84
    2) PBP Version 3.0.5 compiler
    3) Windows 7 operating system
    4) 64 Bit operating system
    5) While creating project (Toolsite contents say - 'Micro Engineering......(pbpw.exe) BUT Location is set to c:PBP3/pbpx.exe

    The code I am writing gives the following error:
    Executing: "C:\PBP3\pbpx.exe" -ampasmwin -oq -z -p16F676 "PIR_676_New.bas"
    PICBASIC PRO(TM) Compiler 3.0.5.4, (c) 1998, 2012 microEngineering Labs, Inc.
    All Rights Reserved.
    ERROR: Bad command parameter. -z
    BUILD FAILED: Thu May 31 11:36:41 2012
    ___________________
    WHY things get boring when they work just fine?

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: PBP3 Compilation problem

    learned from few previous posts that the executable file should not be pbpx so, after changing it, I have progressed further but the error is still there. Now the following error comes:
    Executing: "C:\PBP3\PBPMPLAB.BAT" -ampasmwin -oq -z -p16F676 "PIR_676_New.bas"PBPMPLAB.BAT 4.0.0.0
    Using MPASM from C:\Program Files (x86)\Microchip\MPASM Suite\.
    Executing: "C:\PBP3\PBPX.EXE" -ampasmwin -oq -z -p16F676 "PIR_676_New.bas"
    PICBASIC PRO(TM) Compiler 3.0.5.4, (c) 1998, 2012 microEngineering Labs, Inc.
    All Rights Reserved.
    ERROR: Bad command parameter. -z
    BUILD FAILED: Thu May 31 14:06:22 2012
    I have read one post by Darrel Taylor in which he has advised someone with a similar problem to check the inherit global settings checkbox, But that box is not getting highlighted to be checked in my laptop, so I don't know where to go from here. Help please....
    ___________________
    WHY things get boring when they work just fine?

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


    Did you find this post helpful? Yes | No

    Default Re: PBP3 Compilation problem

    If you are compiling a project that was created with a previous version, MPLAB is probably still using the old plug-in settings.
    -Z is no longer used, so that indicates an old plug-in.

    If Inherit Global is greyed out, you are editing the global options instead of the files options.
    When entering the build options, select your file name, not "Project".

    In the build options, change one of the option checkboxes, and click Apply.
    Change the option back and click Apply.

    Insure that Inherit global is checked then click OK.

    This insures that MPLAB saves the current plug-in options to the project.

    Any new projects will automatically use the new plug-in options, but existing projects will still have the old options saved.
    DT

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: PBP3 Compilation problem

    Thanks a lot Darrel, as always, your first reply solved the problem. Just want to ask 2 more questions:
    1) How can I run and compile the codes I made previously using Version 2.5. I mean to ask what changes I need or patches I need to install to run that version parallel to this latest one.

    2)Now, I have this problem sorted, I am facing problem in using 2 analog channels side by side. Any special advise in doing this? Can two analog channels be used together provided ANSEL, ADCON0 & ADCON1 are set once and ADCIN is used for the two channels.
    Thanks
    ___________________
    WHY things get boring when they work just fine?

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


    Did you find this post helpful? Yes | No

    Default Re: PBP3 Compilation problem

    Great! Glad you got it working.


    1) PBP3 and MicroCode Studio 5.0 install seperately from any previous versions of PBP. I actually have every version since 2.41 on my computer.
    But it's difficult to switch to different versions in MPLAB. And Earlier versions of PBP need an earlier version of MPLAB (not fun).

    If you were using MicroCode Studio, you could switch between the versions easily from a drop-down box.

    2) There's no reason why you can't use 2 analog inputs to the ADC.
    Just set the ADC defines, and use ADCIN.
    DT

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: PBP3 Compilation problem

    Thanks Darell. While I have your attention, could you please have a quick glimpse and advise me of my mistake as I am struggling with it from last many days. My code only Debugs "TIME=0 & AMBIENT=0". The voltage on both Pins is set to 2.5volts, but I am not understanding why it is outputting 0 all the time.
    Code:
    ;-----------------PIC16F676---------------------------Include "modedefs.bas"
    DEFINE OSC 4
    DEFINE ADC_BITS 10
    DEFINE ADC_CLOCK 3
    DEFINE ADC_SAMPLEUS 50
    ;-------------CONFIGURATION FUSES SET HERE-------------------------
    #CONFIG
        ifdef PM_USED
            device  pic16F676, intrc_osc_noclkout, wdt_on, mclr_on, protect_off
        else
            __Config _XT_OSC & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _BODEN & _CP & _CPD
        endif
    #ENDCONFIG
    
    
    
    
    '----------------------------------------
    DEFINE DEBUG_REG    PORTC
    DEFINE DEBUG_BIT    5
    DEFINE DEBUG_BAUD 2400
    DEFINE DEBUG_MODE 0
    
    
    '-------Analog Input--------------
    Poten        Var    PortA.1
    Ldr        Var    PortC.3
    '--------------------------------------
    
    
    Time        Var    Word
    Time1        Var    Word
    Counter    Var    Byte
    Ambient    Var    Word
    
    
    ;------REGISTERS SET --------
    PORTA=0
    PORTC=0
    TRISA = 0010
    TRISC = 1110
    OPTION_REG = 128
    PORTA=0
    PORTC=0
    CMCON=7
    ANSEL=000010
    ADCON1=110000
    ADCON0=000000
    '---------------------------------------
    
    
    Main:
            GoSub LoadTime
        Pause 1000
        GoSub LoadLight
        Pause 1000
    
    Goto Main
    
    
    
    
    LoadTime:
            ADCIN Poten,Time : Pause 10
            DEBUG "TIME=",DEC Time,13,10
    Return
    
    
    LoadLight:
            ADCIN Ldr,Ambient : Pause 10
            DEBUG "AMBIENT=",DEC AMBIENT,13,10
    Return
    ___________________
    WHY things get boring when they work just fine?

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: PBP3 Compilation problem

    Got it. Found my mistake. The program is working fine now. Just realized that, it can't be aliases but need to be channel number at the ADCIN.
    ___________________
    WHY things get boring when they work just fine?

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