Trying to migrate to 18F..


Closed Thread
Results 1 to 30 of 30

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

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

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

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

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

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


    Did you find this post helpful? Yes | No

    Default

    You will not even notice MPASM after awhile. For that matter I have never used PM....

    Yes to setting the configs in source. But only comment out the actual config lines in the inc.
    The other stuff is needed no matter what.
    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

    Well, I'm back again...

    Last time I got so tired of it so I quitted that project and started with other stuff instead, PIC16F based, coz there I never get any of those troubles.

    *Every* single time I try to use a 18f pic I seriously considering to get another hobby, I really really really HATE mpasm.. it NEVER f**ing work.. I dont want to know how many hour I been using on this crap

    I write a program, compile it with like 87665 errors, trying to get the config bits correctly (wich always works on 16f and mp) and after some hour or so I MAYBE can compile it witn just warnings, and then I upload it to the pic, and it does NOT work..

    I REALLY try to read both the includes of mpasm AND microchips datasheets, but still, I never get it right.. I try to comment out all config directives in the PBP include (tor the correct pic), or sometimes just the ones I want to change.. but nonono.

    ..If I at that point change the config bits to "mp-style" and compile it for a 16f (with mp), it ofcourse works directly with no problems... so its NOT my code, its the configbits.

    The pic I try to use now is a PIC18F2520 and since my long advanced program (that works perfectly fine on a pin compatible 16F876A) OFCOURSE didn't work, I created a reeeally simple short program that just blinked two LED's..

    Code:
    @	 __CONFIG    _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
    @  __CONFIG   _CONFIG1H, _FOSC_INTOSCIO_EC_1H
    '@  __CONFIG   _CONFIG2H, _MCLRE_OFF_2H
    @  __CONFIG    _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H
    @  __CONFIG    _CONFIG3H, _PBADEN_OFF_3H
    @  __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
    
    DEFINE OSC 20	' Lets work at 20 MHz
    
    blueled		var PORTB.4
    redled		var PORTB.5
    
    main:
    	low redled
    	low blueled
    	pause 500
    	high redled
    	pause 500
    	high blueled
    	pause 500
    	goto main
    This compiles with no errors, but warnings (about deprecated __CONFIG for example)

    ..I have a pulldown on MCLR and the LED's are connected with resistors.. I want to use the internal oscillator, and no WDT.

    all __CONFIG statements in the PBP 18F8520.INC are commented out.

    Can anyone point me to somwhere this are explained ? or tell me what the problem is ?

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


    Did you find this post helpful? Yes | No

    Default

    ..I can add that this is one of MANY MANY different config settings I have tried..

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