Trying to migrate to 18F..


Closed Thread
Results 1 to 30 of 30

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Location
    Stockholm
    Posts
    80

    Default Trying to migrate to 18F..

    I been using 16Fx for some time now, and now I wanted to use something more powerful, I looked up a nice PIC, 18F4620, and checked that it was PBP compatible, yes, and ordered.

    First I tried to just recompile a program written for 16F877A, since they are basically pin compatiblie, and it was a very easy program.

    BUT.. pbpw says that MP does not support 18F family and that I should use mpasm instead.

    First problem, mpasm does not exist.. I reinstall the latest version of mplab IDE, still doesnt work, google a bit, set the path to include mpasm catalog, but still no go, there are no mpasm.exe ? ..but there are a mpasmwin.exe and in the documentation it says that its supported too, so I tried..

    C:\PBP>pbpw -p18f4620 -ampasmwin tst10
    PICBASIC PRO(TM) Compiler 2.50b, (c) 1998, 2008 microEngineering Labs, Inc.
    All Rights Reserved.
    Error[118] C:\PBP\TST10.ASM 103 : Overwriting previous address contents (0000)
    Error[118] C:\PBP\TST10.ASM 103 : Overwriting previous address contents (0001)
    Error[118] C:\PBP\TST10.ASM 109 : Overwriting previous address contents (0002)
    Error[118] C:\PBP\TST10.ASM 109 : Overwriting previous address contents (0003)
    Error[118] C:\PBP\TST10.ASM 115 : Overwriting previous address contents (0004)
    Error[118] C:\PBP\TST10.ASM 115 : Overwriting previous address contents (0005)
    Error[118] C:\PBP\TST10.ASM 121 : Overwriting previous address contents (0006)
    Error[118] C:\PBP\TST10.ASM 121 : Overwriting previous address contents (0007)

    C:\PBP>

    Fail..

    ANd I have no idea why..

    First I thought it was the config switches, but after playing around with them it doesnt get any better

    Any idea what I have missed ?

    I wrote an even simpler program that would just blink a LED, and get the same errors..

    ..I dont like mpasm

  2. #2
    Join Date
    Sep 2008
    Location
    Stockholm
    Posts
    80


    Did you find this post helpful? Yes | No

    Default

    Hmm, looking in the tst.asm I can see that all errors points to my config lines

    Its REALLY REALLY stupid that the config lines are in different formats between mp and mpasm

    Theese are the config switches I used the last time.. but I tried at least 20 more variants..

    @ __CONFIG _CONFIG1H, _OSC_HS_1H
    @ __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_512_2H
    @ __CONFIG _CONFIG3H, _PBADEN_OFF_3H
    @ __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_ON_4L

    This was my original attempt after reading the docs..

    @ __config _OSC_HS &_LVP_OFF &_WDT_OFF

    ..And yes I am using a external xtal @24MHz, and yes I know that there are a internal osc in this pic.

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


    Did you find this post helpful? Yes | No

    Default

    Did you comment out the correct lines in the inc file?
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Did you comment out the correct lines in the inc file?
    From the error I would say no. Note: you will have to comment them again after a PBP upgrade too.
    In case you are not aware what Mackrackit is talking about, or if someone new to PBP reads this, the file Mackrackit is refering to is the 18f4620.inc file located in the root directory of your PBP installation. If you already know this, great someone new who sees this might not.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

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


    Did you find this post helpful? Yes | No

    Default

    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Sep 2008
    Location
    Stockholm
    Posts
    80


    Did you find this post helpful? Yes | No

    Default

    Aha, so I cannot really override settings with statements in my sourcecode, as I can with pm ?

    ..Since this is a 18F device PM isnt supported anyway, so I guess I can change as I like in the file.

    Now I just changed the .INC file to my needs, and it worked. (well, at least it compiled without warnings, I never uploaded it to my pic)

    Can I just comment out everything there, and then ALWAYS set the defaults in each sourcecode ? ..then I have to write it mpasm style ofcourse, but since it's a 18F device I will never use PM for it anyway. (If ME-labs doesn't release a version of PM supporting 18F.. wich I really would love if they did.)

    ..As I said, I never use neither 18F devices or mpasm before..


    Anyway, Thanks for the help, without this forum I probably would have given up on PBP a long time ago.. now I nearly convinced several guys at work to start using it too

Similar Threads

  1. 16F to 18F transition pains
    By lurker in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th December 2008, 01:35
  2. 18F Config fuses
    By Angus Anderson in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 18th December 2007, 15:59
  3. Super easy 18F print strings to UART
    By Bruce in forum Code Examples
    Replies: 0
    Last Post: - 26th August 2007, 23:19
  4. Upgrading 16F to 18F
    By Ron Marcus in forum General
    Replies: 1
    Last Post: - 29th March 2006, 09:44
  5. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30

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