New PBP and MCS -- a few errors


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

    Default New PBP and MCS -- a few errors

    I've mentioned before, I'm an occasional programmer so hard to commit things to memory -- hence the many questions.

    Ok -- so I bought the latest PBP gold (3.1) and MCS+ (V5) yesterday.

    I've been working on something with the 16F88 and all has been fine but needed more memory so going to the 16F1847 and updating all the software was needed for me to work with this chip.

    (1) I just compiled in MCS and get an error "unable to execute MPASMWIN". ?
    I do not have "use the mpasmx assembler" checked, as I never had that checked before in my old setup. Fact is, I'm confused about all of that anyway, when and why should I use the MPASM assembler? Or ever? (Never used it before).



    (2) If anyone knows, in my code for the 16F88, I had ADCON = 0 and CMCON = 7 (porta all digital and comparators off?) -- anyway, worked fine but with 16F1847, I get errors on both of these statements. I know each chip has different configuration needs -- what would they be for the 16F1847?


    THANKS. I'm sure I'll have more questions.

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: New PBP and MCS -- a few errors

    is it this for my 2nd question?

    ANSELA = 0
    ANSELB = 0

    CM1CON0 = 0
    CM1CON1 = 0
    CM2CON0 = 0
    CM2CON1 = 0

    OSCCON = %01101000 same osccon (4mhz) I used for 16F88 ?

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: New PBP and MCS -- a few errors

    Also -- I do have PBP listed as the default compiler in MCS. It's pointing to the PBP_3 folder.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: New PBP and MCS -- a few errors

    MCS is what's called an IDE, an Integrated Development Environment or put another way, a glorified text editor. You don't have to use it, you can write your programs in any text editor. I do recommend using MCS, I just want make it clear that it's not NEEDED.

    PBP is the compiler. The compiler converts your program into assembly language but that's not what the target device is using so in comes the last part, the assembler.

    The assembler takes the assembly code and converts into a binary file ready to be loaded into the chip your targeting.

    Previously, PBP used to ship with it own assembler, called PM, but it doesn't any more. In fact, the newer versions of PBP requires the use of MPASM or MPASMX. The checkbox in MCS is (or was) used to select if the compiler, when it's done spitting out assembly language, should invoke PM or MPASM. Since PM is no longer supported you should invoke MPASM(X) and for that to work you must have it installed - it comes with the MPLAB(X) IDE but I think we've covered that before.

    I don't have time to look up the datasheet for your part right now but you are correct that you can not and should assume that just because you did it one way on one chip it's the same for the other chip.

    /Henrik.

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: New PBP and MCS -- a few errors

    Ok -- tried both checked and unchecked. Using MPASM X as the assembler created MANY errors.
    There was a file I downloaded that was the Picbasic plug in? Anyway --an nbm file and when I open it doesn't respond. Do I install this after opening MPLAB ? If so, how?

    THANKS. so to be clear, you NEED to use MPLAB X in the updated PBP right?

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: New PBP and MCS -- a few errors

    No, you don't have to USE MPLAB X but you need to have it INSTALLED so that you have access to the assembler that comes with it. And, it doesn't HAVE to be the assembler from MPLAB X, it can be an older version from MPLAB 8 but then it won't be able to assemble programs for newer part.

    So, if you haven't installed MPLAB X then do so. I Believe the plugin you mention is when you want to so the reverse, ie use PBP as the compiler from within MPLAB X.

    /Henrik.

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: New PBP and MCS -- a few errors

    Thanks Henrik.

    Yes, I have had MPLAB X installed (latest) and was just playing around and got a successful assembly. Was getting some errors and maybe you can help me confirm what I was doing wrong (using 16F1847).

    I had -- (with the 16F88)

    @ DEVICE pic16F88, INTRC_OSC_NOCLKOUT
    ''' System Clock Options
    @ DEVICE pic16F88, WDT_ON
    ''' Watchdog Timer
    ETC

    but apparently the 1847 needs a hashtag like -- ?
    #CONFIG ; F1847.
    __config _CONFIG1, _FOSC_INTOSC & _WDTE_ON & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _BOREN_OFF
    __config _CONFIG2, _PLLEN_OFF & _LVP_OFF
    #ENDCONFIG

    also -- found this,

    @ ERRORLEVEL -306 ; turn off crossing page boundary message

    which got rid of my boundry error. ?

    does it FIX the boundry problem or just get rid of the message ? THANKS MUCH FOR HELP.


    Think I have it working right now.

  8. #8
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: New PBP and MCS -- a few errors

    Great, you're making progress!

    That #CONFIG / #ENDCONFIG is "new" in PBP3 and it is what you should use for ALL devices.

    In your PBP3 installation folder there's a sub folder called DEVICES_REFERENCE. If you look inside of that you'll find a file for each device the compiler supports and inside the file(s) you'll find all the available CONFIG bit options and what defaults PBP is using in case you DON'T include a #CONFIG / #ENDCONFIG block in your code. Also, make sure to read the manual as it explains it better than I can.

    The "boundry error" is not an error - it's a message ment to make you aware of the fact that the code is crossing a page boundry. If you're NOT using any embedded assembly code in your programs you don't have to worry about it and can safely have the message disabled.

    /Henrik.

  9. #9


    Did you find this post helpful? Yes | No

    Default Re: New PBP and MCS -- a few errors

    Good deal.

    I'll have to make note I can have all the config info handy -- always a hassle. Although I generally stick to one chip for what I do.

    Not as dumb as I sound, just impatient. Honestly, the documentation on both MCS and PBP could be much clearer especially for installing and possible mishaps. thanks.

  10. #10


    Did you find this post helpful? Yes | No

    Default Re: New PBP and MCS -- a few errors

    do you know how to open the .INFO file in device references?

    do you just rename it text or something?

  11. #11
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: New PBP and MCS -- a few errors

    Just open them with your favourite text editor or in MCS.

Similar Threads

  1. Replies: 1
    Last Post: - 4th April 2013, 02:31
  2. ELSEIF Command, PBP 2.60, and MCS
    By rsocor01 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th December 2011, 07:16
  3. MCS+ with PBP 2.50
    By BrianT in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st September 2007, 06:52
  4. Are these errors in the PBP manual?
    By websmith in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th November 2006, 09:22
  5. PBP+MCS+PICKit1
    By sincity337 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 21st December 2005, 03:12

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