PIC16LF1939 Configuration Errors


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    644

    Default PIC16LF1939 Configuration Errors

    Hi,

    I've been using this 16LF1939 chip for a while. I always configure it with the Melabs U2 programmer software, which is the easy way to do it . Now, I'm trying to set the fuses in the program like this

    Code:
    @  DEVICE PIC16LF1939
    @  __CONFIG _CONFIG2, _FOSC_INTOSC & _WDTE_OFF & _PWRTE_OFF & _MCLRE_OFF & _CP_ON & _CPD_ON & _BOREN_OFF & _CLKOUTEN_OFF
    @  __CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF & _WRT_OFF & _PLLEN_OFF & _STVREN_OFF & _BORV_25 & _LVP_OFF
    And, I'm getting some errors. I'm using PBP2.60c and MPASM. Any ideas of what I'm doing wrong? I suspect the first line is part of the problem.

    P.S. There are two *.inc files for this chip. One in the PBP2-60 directory and another one in the MPASM SUITE directory. Do I need to make any changes to these files?
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default Re: PIC16LF1939 Configuration Errors

    1. Drop the DEVICE line and select the device from the IDE (say MicroCode or FineLine).
    2. Comment out the config lines in the *.inc file of the PBP folder.

    HTH,
    Ioannis

  3. #3
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    644


    Did you find this post helpful? Yes | No

    Default Re: PIC16LF1939 Configuration Errors

    Thanks, I'll try that. But, does it work by selecting the device from the IDE only? I need to get the HEX file with the full configuration of the chip and the type of chip. I have seen this "@ DEVICE PIC16LF1939" line been used before by people here in the forum, so I don't know why it doesn't work in my case.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

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


    Did you find this post helpful? Yes | No

    Default Re: PIC16LF1939 Configuration Errors

    Because you are using MPASM and
    "@ DEVICE PIC16LF1939"
    is for PM.

    http://www.picbasic.co.uk/forum/showthread.php?t=543
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default Re: PIC16LF1939 Configuration Errors

    Yes it works OK. Don't worry about that.

    It makes sense if your IDE does not support it. For example compiling from Command Line.

    Ioannis

  6. #6
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    644


    Did you find this post helpful? Yes | No

    Default Re: PIC16LF1939 Configuration Errors

    Thank you guys. Now, it works fine. There is a "condensed" version of the thread that Dave mentioned that was really helpful.

    http://www.picbasic.co.uk/forum/cont...o-your-Program

    The tricky part (at least for me) to make it work was figuring out that I needed two CONFIG statement lines. One for CONFIG1 and another one for CONFIG2.

    Code:
    @  __CONFIG _CONFIG1, .......
    @  __CONFIG _CONFIG2, .......
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

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