PBP is driving me crazy trying to make an 18F chip blink


Closed Thread
Results 1 to 6 of 6

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by George View Post
    OK, yeah I've been reading that thread over and over, I got rid of the osc=hs define in the code and that got rid of most of my errors thanks, So if you want to define something that's listed in the INC you have to REM it out in the INC file?

    My issue now is the errors listed are missing "=" in parameter...

    the inc file is written like this: CONFIG _CONFIG1H, _OSC_HS_1H

    do I change it to read? CONFIG OSC=HS

    If so, why? Why hasn't this been done for me? This was brought up three years ago in the post that you mention, I've bought the latest version of PBP and downloaded the latest MPASM (v5.2) This is my first time using MPASM and the 18F chip, so may not really know wot I'm doing - but surely it shouldn't be this hard

    Thanks for your input
    Hi George,
    My first try with an 18F actually 18F4550, I copied one of my other programs to try it out.
    Configs are pretty much assembly, PBP whisks right past and MPASM chokes on them, EDIT: Mackrackit has the skinny on the settings below, Found in P18f8722.inc file in MPASM Suite directory.
    Last edited by Archangel; - 20th June 2008 at 06:23.
    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.

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


    Did you find this post helpful? Yes | No

    Default

    I normally set the configs in the *.inc, just a personal pref I guess.

    I do not have a 8722 so I can not test it, But this compiles.
    Code:
    DEFINE	OSC  10
    
    TRISB = 0
    TRISH = 0
    porth = 0
    
    Start:
    porth.0 = 1
    pause 500
    porth.0 = 0
    pause 1000
    goto start
    And this is the *.inc
    Code:
    LIST p = 18F8722, r = dec, w = -311, w = -230, f = inhx32
            INCLUDE "P18F8722.INC"	; MPASM  Header
            __CONFIG    _CONFIG1H, _OSC_HS_1H
            __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
            __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
            NOLIST
    And yes, if you set the fuses in code space, the *.inc needs to be REMed.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    171


    Did you find this post helpful? Yes | No

    Default

    Hey guys, finally got it going thanks for your input - changed the INC files and it works well - interesting that MPASM gets choked on the configs here's wot I changed it to finally

    NOLIST
    ifdef PM_USED
    LIST
    "Error: PM does not support this device. Use MPASM."
    NOLIST
    else
    LIST
    LIST p = 18F8722, r = dec, w = -311, w = -230, f = inhx32
    INCLUDE "P18F8722.INC" ; MPASM Header
    CONFIG OSC=HS
    CONFIG WDT=ON, WDTPS=512
    CONFIG MCLRE=ON
    CONFIG LVP=ON, XINST=OFF
    NOLIST
    endif
    LIST
    EEPROM_START EQU 0F00000h
    BLOCK_SIZE EQU 64

Similar Threads

  1. 18f series chip locked up
    By glkosec in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th August 2009, 08:27
  2. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th December 2005, 00:30
  3. Make your own I2C Chip
    By NL2TTL in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 11th August 2005, 18:29
  4. Why use an 18F chip
    By AndyP in forum General
    Replies: 3
    Last Post: - 16th August 2004, 17:38

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