help with pic16f887


Closed Thread
Results 1 to 40 of 61

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    You do not have to learn MPLAB. If you are using Micro Code Studio, or whatever for an editor, just tell it to use MPASM for the assembler.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    HUmmm..
    I am using Notepad++ as my editor and just use the command in Dos to complie. Iwould use MPLAB strictly to program my chip.
    Now that I have Win7, I cannot compile in Dos and I found out how in MPLAB.

    Why would I want to use MPASM for the assembler as you mention earlier ??
    What is that going to give me more, any advantage ?
    thanks

    K

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    You can still use DOS.
    Here is the guts of a *.bat file. Running Win7 64 bit.
    Change the paths and file name as needed.
    Code:
    cd
    c:\pbp\pbpw -e -s -ac:\C:\Program Files (x86)\Microchip\MPASM Suite -p16f676  C:\PICPROGS\T1\T1.bas
    cd C:\Program Files (x86)\Microchip\MPASM Suite
    MPASMWIN.exe /e C:\PICPROGS\T1\T1.ASM
    cd\
    Why would I want to use MPASM for the assembler as you mention earlier ??
    Because you need it for the 18F parts and basically more advanced "stuff".
    Last edited by mackrackit; - 30th November 2010 at 18:55.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Ok I am home now and ready to make it work.
    I tried to compile it and it would not work I went into the the build configuration menu and removed the pasmwin option.
    here is what I am getting now in MPLAB:

    Executing: "C:\PBP2.60\PBPMPLAB.BAT" -p16F887 "C:\PBP2.60\eeprom.bas"
    Executing: "C:\PBP2.60\PBPW.EXE" -p16F887 "C:\PBP2.60\eeprom.bas"
    PICBASIC PRO(TM) Compiler 2.60A, (c) 1998, 2010 microEngineering Labs, Inc.
    All Rights Reserved.

    ERROR: Unable to execute PM.EXE.Halting build on first failure as requested.
    BUILD FAILED: Tue Nov 30 18:26:11 2010


    and my code:
    Code:
    '/////////////////////////
    '// Define section //
    '/////////////////////////
    
    @ __config _CONFIG1, _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _LVP_OFF & _CP_OFF
    OSCCON = %01110000 '8 Mhz
    DEFINE OSC 8
    ANSELH = 0

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Up in post #3 you were using mpasm, now you are using PM with MPLAB...
    I do not understand.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default ?????

    owowo I am lost now

    -I was previously using Picbasic pro under dos.
    -Now I installed windows 7 64bit, I can no longer use dos. I followed the instruction from Melabs to choose PBPMPLAB.BAT under MPLAB 8.56. I thought I was using the picbasic pro module and MPLAB and an interface between the two.

    I want to keep it simple... either way , dont know where to go from here

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Try installing the free version of Micro Code Studio that came with PBP.
    Then in the toolbar click View - Compiler and Program Options.
    There will be tabs on the dialog box.
    Under Compiler click find automatically.
    Under the Assembler tab check Use MPASAM and click find automatically.

    Then when you want to compile hit the F9 key.

    That is the simplest way.
    Dave
    Always wear safety glasses while programming.

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