• AVR Freaks

Hot!Simulator: 18F27Q43 + X5.30 problem ?

Author
K8LH
Super Member
  • Total Posts : 1878
  • Reward points : 0
  • Joined: 2004/03/26 05:12:34
  • Location: Michigan, USA
  • Status: offline
2020/07/11 10:36:36 (permalink)
5 (1)

Simulator: 18F27Q43 + X5.30 problem ?

Am I messing up?  I'm trying to simulate an assembly language program for 18F27Q43 in MPLABX 5.30 version.  The simulator is showing 'beta' support for 18F27Q43 but, unfortunately, I can't really check out the simulator in MPLABX 5.40 version because it doesn't seem to support an assembler tool.
 
Basically, I can't seem to MOVF STATUS,W,ACCESS and see the correct value in the watch window, nor can I get a BTFSS STATUS,C instruction to actually 'skip'...  Am I doing something wrong, guys?  Here's code excerpts;
 
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;  K8LH DelayCy() subsystem macro generates four instructions     ~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        radix dec
clock   equ     16              ; 4, 8, 12, 16, 20 (MHz), etc.
usecs   equ     clock/4         ; cycles/microsecond multiplier
msecs   equ     usecs*1000      ; cycles/millisecond multiplier
dloop   equ     5               ; loop size, 5 to 8 cycles
;
; -- loop --  -- delay range --  -- memory overhead ----------
; 5-cyc loop, 11..327690 cycles, 9 words (+4 each macro call)
; 6-cyc loop, 11..393226 cycles, 10 words (+4 each macro call)
; 7-cyc loop, 11..458762 cycles, 11 words (+4 each macro call)
; 8-cyc loop, 11..524298 cycles, 12 words (+4 each macro call)
;
DelayCy macro   cycles          ; range, see above
    if (cycles<11)|(cycles>(dloop*65536+10))
        error " DelayCy range error "
    else
        movlw   high((cycles-11)/dloop)+1
        movwf   delayhi
        movlw   low ((cycles-11)/dloop)
        rcall   uLoop-(((cycles-11)%dloop)*2)   ; (18F version)
;       call    uLoop-((cycles-11)%dloop)       ; (16F version)
    endif
        endm

 

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test
        DelayCy(1000)           ; reset stopwatch & run
        nop                     ; insert breakpoint here
 
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;  K8LH DelayCy() subsystem 16-bit uLoop subroutine               ~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

a = dloop-1
    while a > 0
        nop                     ; (cycles-11)%dloop entry points  | 
a -= 1
    endw
uLoop   addlw   -1              ; subtract 'dloop' loop time      |
        btfss   STATUS,C        ; borrow? no, skip, else          |
        decfsz  delayhi,F,1     ; done? yes, skip, else           |
        bra     uLoop-dloop*2+10 ; do another loop (18F version)  |
;       goto    uLoop-dloop+5   ; do another loop (16F version)   |
        return                  ;                                 |

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

post edited by K8LH - 2020/07/11 10:41:00
#1

8 Replies Related Threads

    Mark Yampolsky
    Super Member
    • Total Posts : 122
    • Reward points : 0
    • Joined: 2009/04/03 18:50:36
    • Location: Russia Fryazino Moskow reg
    • Status: offline
    Re: Simulator: 18F27Q43 + X5.30 problem ? 2020/07/11 10:51:06 (permalink)
    +1 (1)
    K8LH
    Am I messing up?

    Of course not! )))
    In the current version of the simulator, the ACCESS mode does not work.
    They promised to fix in IDE version 5.45
    #2
    K8LH
    Super Member
    • Total Posts : 1878
    • Reward points : 0
    • Joined: 2004/03/26 05:12:34
    • Location: Michigan, USA
    • Status: offline
    Re: Simulator: 18F27Q43 + X5.30 problem ? 2020/07/11 10:54:02 (permalink)
    +1 (1)
    Mark Yampolsky
    K8LH
    Am I messing up?

    Of course not! )))
    In the current version of the simulator, the ACCESS mode does not work.
    They promised to fix in IDE version 5.45


    Bummer!  I'm not sure that will work for me...  These new versions don't support the assembler language tool, do they?
    #3
    Mark Yampolsky
    Super Member
    • Total Posts : 122
    • Reward points : 0
    • Joined: 2009/04/03 18:50:36
    • Location: Russia Fryazino Moskow reg
    • Status: offline
    Re: Simulator: 18F27Q43 + X5.30 problem ? 2020/07/11 11:00:14 (permalink)
    0
    I answered you in another thread. I myself switched to mixed code (XC8+pic-as) for this chip.
    #4
    dan1138
    Super Member
    • Total Posts : 3841
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Simulator: 18F27Q43 + X5.30 problem ? 2020/07/11 13:42:19 (permalink)
    +1 (1)
    There are a lot of things that Microchip has left really messed up in MPLABX v5.40 with the pic-as(v2.20) tool chain.
     
    The most annoying is symbolic debug is crippled.
     
    I have worked out a method that is a PITA to use but works better than the "official" suggestion from the Microchip tools team.
     
    See my git repository for demo code an a screen capture video.
    #5
    GeorgePauley
    Moderator
    • Total Posts : 1268
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: offline
    Re: Simulator: 18F27Q43 + X5.30 problem ? 2020/07/13 09:54:53 (permalink)
    -1 (1)
    Mark Yampolsky
    In the current version of the simulator, the ACCESS mode does not work.
    They promised to fix in IDE version 5.45



    Fixed in 5.40 I think?
    #6
    K8LH
    Super Member
    • Total Posts : 1878
    • Reward points : 0
    • Joined: 2004/03/26 05:12:34
    • Location: Michigan, USA
    • Status: offline
    Re: Simulator: 18F27Q43 + X5.30 problem ? 2020/07/13 12:23:05 (permalink)
    +1 (1)
    GeorgePauley
    Mark Yampolsky
    In the current version of the simulator, the ACCESS mode does not work.
    They promised to fix in IDE version 5.45



    Fixed in 5.40 I think?



    I have X5.40 installed...  Unfortunately, the PIC18F27Q43 program is assembler and there doesn't seem to be a language tool for that in X5.40.  Yes, no?
     
    Cheerful regards, Mike, K8LH (Michigan, USA)
    #7
    ric
    Super Member
    • Total Posts : 28365
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Simulator: 18F27Q43 + X5.30 problem ? 2020/07/13 15:47:51 (permalink)
    0
    K8LH
    ...
    I have X5.40 installed...  Unfortunately, the PIC18F27Q43 program is assembler and there doesn't seem to be a language tool for that in X5.40.  Yes, no?

    There is "pic-as", but it is nowhere near "production ready" status yet. Maybe it will improve in v5.45.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #8
    dan1138
    Super Member
    • Total Posts : 3841
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Simulator: 18F27Q43 + X5.30 problem ? 2020/07/13 16:04:18 (permalink)
    +1 (1)
    K8LH
    I have X5.40 installed...  Unfortunately, the PIC18F27Q43 program is assembler and there doesn't seem to be a language tool for that in X5.40.  Yes, no?

    As ric said the pic-as(v2.20) tool chain integration with MPLABX v5.40 is not ready for prime time, but it can be manually installed in the MPLABX v5.40 IDE.
     
    See this thread for hints on how to do this.
     



    #9
    Jump to:
    © 2020 APG vNext Commercial Version 4.5