18F1220 newbie


Closed Thread
Results 1 to 17 of 17

Thread: 18F1220 newbie

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,720


    Did you find this post helpful? Yes | No

    Default Re: 18F1220 newbie

    the pbp 2.6 inc file for an 18f1220 looks like this
    ;************************************************* ***************
    ;* 18F1220.INC *
    ;* *
    ;* By : Leonard Zerman, Jeff Schmoyer *
    ;* Notice : Copyright (c) 2006 microEngineering Labs, Inc. *
    ;* All Rights Reserved *
    ;* Date : 06/05/06 *
    ;* Version : 2.47 *
    ;* Notes : *
    ;************************************************* ***************
    NOLIST
    ifdef PM_USED
    LIST
    "Error: PM does not support this device. Use MPASM."
    NOLIST
    else
    LIST
    LIST p = 18F1220, r = dec, w = -311, w = -230, f = inhx32
    INCLUDE "P18F1220.INC" ; MPASM Header
    __CONFIG _CONFIG1H, _XT_OSC_1H
    __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
    __CONFIG _CONFIG4L, _LVP_OFF_4L
    NOLIST
    endif
    LIST
    EEPROM_START EQU 0F00000h
    BLOCK_SIZE EQU 8

    i'm guessing your config should look like this , you need to check the config word for each setting
    I you version is older then , I can't help much more

    Code:
    asm
            __CONFIG    _CONFIG1H, _XT_OSC_1H
            __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
            __CONFIG    _CONFIG4L, _LVP_OFF_4L
    endasm
    Last edited by richard; - 24th July 2014 at 09:14. Reason: white space

  2. #2
    Join Date
    Nov 2011
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: 18F1220 newbie

    Quote Originally Posted by richard View Post
    the pbp 2.6 inc file for an 18f1220 looks like this



    i'm guessing your config should look like this , you need to check the config word for each setting
    I you version is older then , I can't help much more

    Code:
    asm
            __CONFIG    _CONFIG1H, _XT_OSC_1H
            __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
            __CONFIG    _CONFIG4L, _LVP_OFF_4L
    endasm
    Hi Richard, my P18F1220.inc does not look anything like that.
    I tried your config suggestion with slight mod ( see below) but it still does not work. I also tried with a copy of the .inc from MPLABX - also does not work.

    Ta
    Hebe
    -------------------------------------------------------------------
    asm
    __CONFIG _CONFIG1H, _INTIO2_OSC_1H;_XT_OSC_1H
    __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_512_2H
    __CONFIG _CONFIG4L, _LVP_OFF_4L
    __CONFIG _CONFIG3H, _MCLRE_OFF_3H
    endasm
    ------------------------------------------------------------------------

  3. #3
    Join Date
    Nov 2011
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: 18F1220 newbie

    Hi, I have now installed MPLABX , PBP3 and MCSX. Now I get [ASM ERROR] 18F1220 NOVA BX.ASM (30) : Symbol not previously defined (_INTIO2_OSC_1H) .
    I've tried a lot of permutations and found that some config statements don't give an error and others give a similar error ( or errors ) as above.
    Any ideas?

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,720


    Did you find this post helpful? Yes | No

    Default Re: 18F1220 newbie

    in your pbp 3 directory you should have a folder called DEVICE_REFERENCE
    have a look in there for a pic18f1220.info file , all the possible config are listed there
    IN A FORMAT like this

    #CONFIG
    CONFIG WDTEN = OFF
    CONFIG PWRTEN = ON
    CONFIG BOREN = OFF

    CONFIG DEBUG = OFF
    CONFIG XINST = OFF
    #ENDCONFIG

  5. #5
    Join Date
    Nov 2011
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: 18F1220 newbie

    Hi Richard , thank you for your patience.
    I tried all the changes you suggested but could not get it to work. I reverted back to PBP 2.6 and downloaded
    MPLAB 8.9 which contains MPASM v5.5. I now get a bit further with seven lines of errors
    similar to "overwriting previous address contents (0000)" .

    Hebe

  6. #6
    Join Date
    Nov 2011
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: 18F1220 newbie

    Hi Richard , It's blinking now. I changed the config settings in the .inc file that exists in the
    PBP 2.6 folder and I have no config statements in my source program.
    Thank you very much for guiding me on this problem. Your help has given me confidence to continue migrating to 18F.
    Hebe
    Last edited by Hebemabo; - 25th July 2014 at 00:26.

Similar Threads

  1. 18F1220 A/D Converter
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 31st May 2011, 17:50
  2. 18F1220 fuse help
    By mr.sneezy in forum General
    Replies: 6
    Last Post: - 24th May 2010, 15:54
  3. 18F1220 LCD and Sleep
    By jderson in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th July 2008, 19:58
  4. 18F1220 and DT Instant Interrupts
    By jderson in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th June 2008, 06:37
  5. Sleep command with 18F1220
    By suded in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 7th April 2005, 12:11

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