18f4525 Config


Closed Thread
Results 1 to 3 of 3

Thread: 18f4525 Config

  1. #1
    Join Date
    Jan 2007
    Posts
    11

    Default 18f4525 Config

    Of course a new guy once again with a goofy question.

    I have been trying to use the CONFIG directive with PBP but I can't seem to get it to compile as in all the examples I have seen.

    I have tried:
    @ CONFIG OSC=ECIO6
    config OSC=ECIO6
    @__config OSC=ECIO6
    @config OSC=ECIO6

    And they all come up with errors.

    But this works:
    @__config_OSC_ECIO6_1H

    but I am unable to put an "&" on the end to add additional directives.

    Also how do I configure the directive:
    WDT = ON

    I found this in the MPASM 18F4525.INC file:

    ; IMPORTANT: For the PIC18 devices, the __CONFIG directive has been
    ; superseded by the CONFIG directive. The following settings
    ; are available for this device.
    ;
    ; Oscillator Selection:
    ; OSC = LP LP
    ; OSC = XT XT
    ; OSC = HS HS
    ; OSC = RC RC
    ; OSC = EC EC-OSC2 as Clock Out
    ; OSC = ECIO6 EC-OSC2 as RA6
    ; OSC = HSPLL HS-PLL Enabled
    ; OSC = RCIO6 RC-OSC2 as RA6
    ; OSC = INTIO67 INTRC-OSC2 as RA6, OSC1 as RA7
    ; OSC = INTIO7 INTRC-OSC2 as Clock Out, OSC1 as RA7
    ;
    ; Fail Safe Clock Monitor:
    ; FCMEN = OFF Disabled
    ; FCMEN = ON Enabled
    ;
    ; Internal External Osc. Switch Over:
    ; IESO = OFF Disabled
    ; IESO = ON Enabled
    ;
    ; Power Up Timer:
    ; PWRT = ON Enabled
    ; PWRT = OFF Disabled
    ;
    ; Brown Out Reset:
    ; BOREN = OFF Disabled
    ; BOREN = ON Enabled
    ; BOREN = NOSLP Enabled except SLEEP, SBOREN Disabled
    ; BOREN = SBORDIS Enabled, SBOREN Disabled
    ;
    ; Brown Out Voltage:
    ; BORV = 45 4.5V
    ; BORV = 42 4.2V
    ; BORV = 27 2.7V
    ; BORV = 25 2.5V
    ;
    ; Watchdog Timer:
    ; WDT = OFF Disabled
    ; WDT = ON Enabled


    Any help would be nice for yet another newbie.
    Last edited by Firegod; - 27th February 2007 at 05:37.

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


    Did you find this post helpful? Yes | No

    Default Try This

    The register data indicates WDTCON, BOD,. . . registers. Looks like you have to do table write as detailed in section 23.1 of the data sheet, which sends you back to section 6.5 to see how to flash the internal memory , Definatly Clear as Mud. I would try accessiing through the registers, something like WDTCON = %00000001 'wdt on OR WDTCON=%00000000 ' WDt off.
    Now I am about as sure of this as I am of having all 6 numbers in the lottery, but unlike the lottery this cost nothing but some time to try.
    JS
    Last edited by Archangel; - 27th February 2007 at 05:57.
    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
    Jan 2007
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    This is what was doing to get around the @__config statement:

    WDTCON.0=1
    OSCCON.0=0
    OSCCON.1=0
    TRISA.6 = 0

    Is this the correct way to configure the oscillator mode to ECIO (External Clock with I/O on RA6)?

Similar Threads

  1. A/D conversion with PIC18F67J50
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2009, 01:48
  2. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 23:51
  3. Error 0X0000008E when connecting a 18F2550 USB HID
    By FranciscoMartin in forum USB
    Replies: 8
    Last Post: - 16th October 2008, 17:20
  4. PortE problems (PIC18F4455)
    By RubenR in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 12th July 2006, 15:26
  5. Installation sequence
    By Demon in forum General
    Replies: 23
    Last Post: - 11th July 2006, 03:56

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