Help with ppi and def files for 24FJ256GA704 - Page 2


+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Senior Member SimonJA's Avatar
    Join Date
    Mar 2006
    Posts
    844
    Thumbs Up
    Received: 14
    Given: 16
    Total Downloaded
    1.03 GB

    0 Not allowed!

    Default Re: Help with ppi and def files for 24FJ256GA704

    So I managed to track down the problem or a problem.

    My code passes a string to a procedure and that causes the error.

    I made a simple program to show the problem:

    Code:
    Main:
    HRSOut "this works "
    
    Toggle PORTB.11
    
    stringOut("this doesn't")
    
    Toggle PORTB.12
    
    
    
    DelayMS 1000
    
    GoTo Main
    
    
    
    '********************************************************************************************
    Proc stringOut(sOut As String * 20)
    
    HRSOut Str sOut, 13,10
    
    EndProc
    When running this on the pic only the first port is toggled and the first string sent out, it does this repeatedly and never executes the code in the procedure.

    Running this on a 24FJ64GA004 it works as expected.

    Comparing the asm produced from the same code on the different pics there are differences, the main one is within the problem code (the procedure tx) mov.w W0 , PSVPAG appears within the working code (24FJ64GA004) but not on the 24FJ256GA704.

    PSVPAG = Program Space Visibility Page Address Register

    I think the issue I'm having is how memory is managed on the newer chip, the 704 does not have that register but there are registers that may do similar things. At the moment I don't know if it is just a matter of changing the locations and register names in the ppi file or maybe things are completely different on this chip.

    Les, again your input would be very helpful as this is far too complicated for me and two minutes of your time is worth two days of mine.

    Here is the asm compared rhs is 704:


  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #17
    Senior Member SimonJA's Avatar
    Join Date
    Mar 2006
    Posts
    844
    Thumbs Up
    Received: 14
    Given: 16
    Total Downloaded
    1.03 GB

    0 Not allowed!

    Default Re: Help with ppi and def files for 24FJ256GA704

    I think my problems at the moment are down to memory organisation, the 24FJ256GA704 uses extended data space, has different registers and a different way of addressing memory.

    It's getting a bit beyond my capabilities so not sure I can do much more.

    Maybe there are some other pic's that are supported by Proton (and work) that use a similar system and so have the registers set up correctly in the ppi file, I've not checked yet.

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #18
    Member craig's Avatar
    Join Date
    Dec 2010
    Posts
    219
    Thumbs Up
    Received: 10
    Given: 0
    Total Downloaded
    1.52 GB

    0 Not allowed!

    Default Re: Help with ppi and def files for 24FJ256GA704

    I wish I could help Simon but this is way over my head. I hope that Les or someone on the forum can give some insight into these issues and give you the necessary support that you deserve !

    Kind Regards

    Craig

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #19
    Senior Member SimonJA's Avatar
    Join Date
    Mar 2006
    Posts
    844
    Thumbs Up
    Received: 14
    Given: 16
    Total Downloaded
    1.03 GB

    0 Not allowed!

    Default Re: Help with ppi and def files for 24FJ256GA704

    After just a little reading I see that 16 bit pics either use Program Space Visibility (PSV) or Extended Data Space (EDS), the 704 uses EDS

    I can't see anything in the ppi file that specifies which system is used.

    I'd like to find another pic that uses EDS so I can look at the ppi file although that may not be correct either.


    For now I would just like to get the memory settings at the beginning of the ppi file correct.

    Code:
    [INFOSTART]
    Device Information Definitions
    CORE=24    ; Core type (24 or 33)
    OSCDIV=2   ; Fosc division
    TYPE=70    ; Device type (E(69), F(70), H(72))
    RAMAMOUNT=16384    ; Total amount of RAM (in bytes)
    CODEAMOUNT=262144  ;Total amount of code memory (in bytes)
    DMAAMOUNT=0  ; Amount of DMA RAM (in bytes)
    XRAMSTART=0x800  ; Starting address of X RAM
    YRAMSTART=0x00  ; Starting address of Y RAM
    DMARAMSTART=0x00 ; Starting address of DMA RAM (if any)
    PORTS=3    ; Amount of ports
    ADC=1      ; ADC available (1 or 0)
    EEPROM=0   ; Amount of on-board eeprom (in bytes)
    UART=2     ; Amount of UART peripherals
    USB=0      ; USB available (1 or 0)
    SPI=3      ; Amount of SPI peripherals
    I2C=2      ; Amount of I2C peripherals
    RTCC=1     ; RTCC available (1 or 0)
    PMP=1      ; PMP available (1 or 0)
    HPWM=3     ; Amount of Output Compare channels
    DAC=0      ; Amount of DAC channels
    DMA=0      ; Amount of DMA peripherals
    PPS=1      ; PPS available (1 or 0)
    BLOCK=384   ;0 Size of the code memory write segment (in 3-byte words)
    ERASE=3072   ;0 Size of the code memory erase segment (in 3-bytes words)
    [INFOEND]

    Code:
    RAMAMOUNT=16384    ; 16k sram from datasheet
    CODEAMOUNT=262144  ; 256k program memory from datasheet
    DMAAMOUNT=0  ; this chip does have dma but i'm leaving this blank for now
    XRAMSTART=0x800  ; I think this is correct and is the start of EDS data space memory
    YRAMSTART=0x00  ; not sure what this is
    DMARAMSTART=0x00 ;left as 0
    
    DMA=0      ;left as 0 but may be 6 if it refers to channels
    
    BLOCK=384   ;this is from the data sheet but in bytes, see below*
    ERASE=3072   ;his is from the data sheet but in bytes, see below*
    [INFOEND]
    * these values are taken from the datasheet but are in bytes, ppi file asks for it in 3 byte words, not sure what that means.

    So if anyone can spot any errors in this lot please let me know.
    Also if you know how I might specify that EDS is used in the ppi file.

    Thanks Simon

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #20
    Senior Member Stephen Moss's Avatar
    Join Date
    Jan 2006
    Posts
    550
    Thumbs Up
    Received: 33
    Given: 7
    Total Downloaded
    3.87 GB

    0 Not allowed!

    Default Re: Help with ppi and def files for 24FJ256GA704

    Quote Originally Posted by SimonJA View Post
    After just a little reading I see that 16 bit pics either use Program Space Visibility (PSV) or Extended Data Space (EDS), the 704 uses EDS
    You may be correct, although from a quick cursory scan through sections 4.2.5 & 4.3 of the data sheet as well as the EDS document in the note at the beginning of section three I get the impression it may be more complicate than that, in that all P24 devices may have PSV but for those with EDS the PSV may have to be accessed via the ESD window as opposed to using a more direct method. But it is difficult to be sure and would take much more time to try and unravel than I have at this juncture.

    With so few Proton users currently using P24/33 devices I don't know who (other than Les) may be able to help you now as you are going beyond my limited knowledge & experience with P24 devices.
    Last edited by Stephen Moss; 13th May 2019 at 10:47.

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  11. #21
    Senior Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    532
    Thumbs Up
    Received: 61
    Given: 0
    Total Downloaded
    408.14 MB

    0 Not allowed!

    Default Re: Help with ppi and def files for 24FJ256GA704

    I'd like to find another pic that uses EDS so I can look at the ppi file although that may not be correct either
    From what I recall the 24EP/33EP family use EDS memory.

  12. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  13. #22
    Senior Member SimonJA's Avatar
    Join Date
    Mar 2006
    Posts
    844
    Thumbs Up
    Received: 14
    Given: 16
    Total Downloaded
    1.03 GB

    0 Not allowed!

    Default Re: Help with ppi and def files for 24FJ256GA704

    Not much progress on this but I did try a compile on a 24EP128GP204 which does use EDS memory (thanks tumbleweed).

    I don't have any hardware to test this but compiling on this chip and looking at the ASM did produce a mov.w W0,DSRPAG instruction within the section of code that falls over in the 24FJ256GA704 (the 704 asm does not have this).

    DSRPAG selects a page in EDS memory so could well be the issue.

    I can't see anything in the ppi files that would indicate why this might be missing from the 24FJ256GA704 asm file.

    Code:
    ;204 working maybe
    
        mov.w #stringOut_sOut,W1
        mov.w #psvpage(str__lb2),W0
        mov.w W0,DSRPAG
        mov.w #psvoffset(str__lb2),W0
        mov.w #21,W2
        call __load_string_to_string
        call stringOut
    
    
    ;704 not working
    
        mov.w #stringOut_sOut,W1
        mov.w #psvpage(str__lb2),W0
                       
        mov.w #psvoffset(str__lb2),W0
        mov.w #21,W2
        call __load_string_to_string
        call stringOut

  14. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  15. #23
    Senior Member SimonJA's Avatar
    Join Date
    Mar 2006
    Posts
    844
    Thumbs Up
    Received: 14
    Given: 16
    Total Downloaded
    1.03 GB

    0 Not allowed!

    Default Re: Help with ppi and def files for 24FJ256GA704

    I think that is as far as I can go with this for now, I'm already in way over my head.

    Les, I don't know why you don't want to help with this, surely having this chip working would make Proton better.



    For anyone who wants to take this further I've attached a modified ppi file below.

    24FJ256GA704_ppimod.zip

    USART and I2C do work using this modified ppi file but there are memory problems and though I've identified one instance of this (passing a string to a procedure) there are almost certainly others which could give unpredictable results.
    Thanks to everyone who helped.

  16. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. Replies: 0
    Last Post: 15th November 2018, 00:37
  2. DEF and PPI files
    By yvesmazzon in forum Tips 'n Tricks
    Replies: 4
    Last Post: 29th July 2016, 22:24
  3. [SOLVED !] PIC18F24J50 PPI+def files
    By RayEllam in forum Proton Plus Compiler v3
    Replies: 15
    Last Post: 9th June 2012, 22:12

Posting Permissions

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