Today 08:22
Forum: Proton Plus Compiler v3
Starter: towlerg
Views: 0
Replies: 6
Go to last post By: shantanu@india
Today 08:01
Forum: The Lounge
Starter: John Drew
Views: 0
Replies: 1
Today 07:44
Forum: Projects discussion
Starter: Colin G3YHV
Views: 0
Replies: 5
Today 07:38
Forum: Absolute Beginners Section
Starter: amod
Views: 0
Replies: 6
Yesterday 23:22
Forum: Proton Plus Compiler v3
Starter: kbaykar
Views: 0
Replies: 4
Go to last post By: normnet
Yesterday 14:41
Forum: Pre-Sales and Upgrade Questions
Starter: normnet
Views: 0
Replies: 2
+ Reply to Thread
Results 1 to 9 of 9

Thread: The address of the CONFIG block133 days old

  1. #1
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,590
    Thumbs Up
    Received: 100
    Given: 137
    Total Downloaded
    2.60 GB

    0 Not allowed!

    Default The address of the CONFIG block

    Is there a way to find the start address of the CONFIG block for all supported devices? Some devices have a section in their PPI file called [CONFIGSTART] which gives that address but some have the section but not the address eg P16F628A.PPI?
    George

  2. #2
    Fanatical Contributor Les's Avatar
    Join Date
    Feb 2002
    Posts
    3,366
    Thumbs Up
    Received: 300
    Given: 117
    Total Downloaded
    1.50 GB

    0 Not allowed!

    Default Re: The address of the CONFIG block

    The datasheet for each device has the config address George.
    For more example programs for Proton and Proton24 or updates, please visit: Proton WIKI or Proton Files

  3. #3
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,050
    Thumbs Up
    Received: 92
    Given: 20
    Total Downloaded
    1.12 GB

    1 Not allowed!

    Default Re: The address of the CONFIG block

    The question is "Why do you need it?". You set the fuses at the start of the program, so you know what they are. There are some fuses that can be cleared at runtime (e.g. CPx and WRTx whith some devices) but the question is why one should want to do this. The file "8bit_device.info" contains the addresses in the strings like "CONFIGREG_INFO_TYPE<300001><0><7><3>", followed by the fuses, but they are not in a specific order and do not contain the bit numers.
    Last edited by hadv215; 15th January 2018 at 21:53.

  4. #4
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,590
    Thumbs Up
    Received: 100
    Given: 137
    Total Downloaded
    2.60 GB

    0 Not allowed!

    Default Re: The address of the CONFIG block

    @Les, from a PC programme.

    @hadv215, I'm working on processing HEX files, and I need to find a particular line which occurs after the line that sets the address of the fuses eg. :020000040030CA
    Last edited by towlerg; 15th January 2018 at 21:56.
    George

  5. #5
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,050
    Thumbs Up
    Received: 92
    Given: 20
    Total Downloaded
    1.12 GB

    1 Not allowed!

    Default Re: The address of the CONFIG block

    George, you can use my 18F hex reader, it will show the addresses and the values at the bottom of the window. Note that this tool assumes config to start at 300000h, which may not be valid for all devices. I also have a 10/12/16F extended hex reader that will do the trick for those devices (and includes the extra instruction for the extended types). This will not show the configs but if you really need them I suppose I can try to extend the functionality.
    Last edited by hadv215; 15th January 2018 at 22:14.

  6. #6
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,590
    Thumbs Up
    Received: 100
    Given: 137
    Total Downloaded
    2.60 GB

    0 Not allowed!

    Default Re: The address of the CONFIG block

    Thanks guys, I have a work around. Its not optimal but it works.
    George

  7. #7
    Fanatical Contributor Les's Avatar
    Join Date
    Feb 2002
    Posts
    3,366
    Thumbs Up
    Received: 300
    Given: 117
    Total Downloaded
    1.50 GB

    1 Not allowed!

    Default Re: The address of the CONFIG block

    For standard 14-bit core devices, the config address is always $2007. For standard 14-bit core devices that have 2 config locations, it is $2007 and $2008.

    The compiler does not need the config address for standard 14-bit core devices with a single fuse location, because the assembler does it automatically with the __config directive. Standard 14-bit core devices with 2 fuse addresses do have the address within the PPI file because the __config directive also needs the address to write too. For example PIC16F88 PPI file, which contains:

    [CONFIGSTART]
    _CONFIG1 EQU 0X2007
    _CONFIG2 EQU 0X2008

    But these are not transferred to the BASIC program because it does not need them to write configs.

    The addresses are always located in the "Special Features Of The CPU" section of the datasheets.
    For more example programs for Proton and Proton24 or updates, please visit: Proton WIKI or Proton Files

  8. #8
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,590
    Thumbs Up
    Received: 100
    Given: 137
    Total Downloaded
    2.60 GB

    0 Not allowed!

    Default Re: The address of the CONFIG block

    Thanks Les, my solution is to have an entry in an ini file which the user adds when using a new device. BTW in your post you specified standard 14 bit devices, does constant 0X2007 apply to the whole range of 14 bit devices?

    I understand why the address of the config block isn't available in the output of the compiler. I assume its historic that some PPI file have this information and some don't?
    Last edited by towlerg; 16th January 2018 at 15:23. Reason: old and stupid
    George

  9. #9
    Fanatical Contributor Les's Avatar
    Join Date
    Feb 2002
    Posts
    3,366
    Thumbs Up
    Received: 300
    Given: 117
    Total Downloaded
    1.50 GB

    1 Not allowed!

    Default Re: The address of the CONFIG block

    The newer enhanced 14-bit core devices operate quite different to standard 14-bit core devices, and they can have multiple configs and they start at $8007.

    See the PPI files for the enhanced 14-bit core types. Their names normally contain 4 characters after the F. For example: 16F1877 is an enhanced 14-bit core device type, and it has quite a few fuse addresses.

    Open the PPI file for the 16F1877 and you'll see:

    _CONFIG1 EQU 0X8007
    _CONFIG2 EQU 0X8008
    _CONFIG3 EQU 0X8009
    _CONFIG4 EQU 0X800A
    _CONFIG5 EQU 0X800B

    The PPI file and the .def file both also contain the directive _ecore if it is an enhanced 14-bit core type, so that the compiler knows they are enhanced types and changes its internal code creation, almost completely. The $define _ecore in the device's .def file can be used within a BASIC program to distinguish an enhanced 14-bit core type.

    $ifdef _ecore
    ' Do this code only for an enhanced 14-bit core device
    $endif
    Last edited by Les; 16th January 2018 at 15:43.
    For more example programs for Proton and Proton24 or updates, please visit: Proton WIKI or Proton Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Block Cursor
    By pic-ignorant in forum The Lounge
    Replies: 6
    Last Post: 1st August 2012, 00:51
  2. issues with config-start, config end fuse settings on 18F
    By katesfb in forum Proton Plus Compiler v3
    Replies: 6
    Last Post: 29th August 2011, 06:07
  3. Writing a block of equal data with HBusout
    By Bodie in forum Proton Plus Compiler v3
    Replies: 4
    Last Post: 3rd December 2007, 15:35
  4. Internal Oscillator block
    By DanRiches in forum The Lounge
    Replies: 7
    Last Post: 8th October 2007, 19:10

Members who have read this thread : 26

Actions :  (Set Date)

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts