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

    Code:
    @ device pic16F887, HS_OSC
    Is not correct for MPASAM.
    Try
    Code:
    @ __config _CONFIG1, _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _LVP_OFF & _CP_OFF
    OSCCON = %01110000 '8 Mhz
    DEFINE OSC 8
    Last edited by mackrackit; - 30th November 2010 at 13:58. Reason: Setup for internal OSC
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Hi,
    thats the same line from the Inc file: 16F887.INC except for the oscillation.
    Why doesn't it work in MPlab ??? does it read the INC files ??? maybe there a configuration that I need to point to that file ??

    K

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


    Did you find this post helpful? Yes | No

    Default

    Why doesn't it work in MPlab ???
    Because @ DEVICE is for PM
    The inc file tells you that.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Ooo yes in the comment on top I will try this . I would rather learn MPlab then installing XP on my Win 7 machine.

  5. #5
    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.

  6. #6
    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

  7. #7
    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.

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