Hot!Runtime Watch

Author
goran.hult
Starting Member
  • Total Posts : 37
  • Reward points : 0
  • Joined: 2007/03/26 05:37:01
  • Location: 0
  • Status: offline
2017/03/01 04:54:32 (permalink)
0

Runtime Watch

I am confused with the behavior of the simulator in MPLABX 3.55
Consider the code below:
LATAbits.LATA0 = PORTBbits.RB0 && PORTBbits.RB1;

1) If I only use the "I/O Pins" Window to inject signals and watch signals everything work fine at runtime.

2) If I use the "Stimulus" Window and inject signals in the Asynchronous tab and look at the registers in the SFR-window everything works fine at runtime.

3) If I use "I/O Pins" Window to inject signals it is not possible to look at the registers in the SFR-window at runtime.

4) If I use "I/O Pins" Window to inject signals it is not possible to look at the registers in a Watch-window as a  "Runtime Watch" at runtime.

5) If I use "Stimulus" Window and inject signals in the Asynchronous tab it is not possible to look at the registers in the "I/O Pins" window at runtime.

6) If I use "Stimulus" Window and inject signals in the Asynchronous tab it is not possible to look at the registers in a Watch-window as a  "Runtime Watch" at runtime.

It feels like there are two simulators which are not communicating with each other.
What is going on?


MPLABX 3.55, XC8 compiler 1.41 , PIC 16F1827, Windows 7, Windows 10
post edited by goran.hult - 2017/03/01 12:21:21
#1

17 Replies Related Threads

    GeorgePauley
    Moderator
    • Total Posts : 797
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: offline
    Re: Run Time Watch 2017/03/01 10:44:18 (permalink)
    0
    What exactly do you mean by "..it is not possible to look at..." whatever window?  Are you referring to the the fact that the windows in question occupy the same position in the MPLAB X screen?  If so, please realize that all of these windows can be dragged to other locations, or even made to float independently of each other.
    #2
    goran.hult
    Starting Member
    • Total Posts : 37
    • Reward points : 0
    • Joined: 2007/03/26 05:37:01
    • Location: 0
    • Status: offline
    Re: Run Time Watch 2017/03/01 10:53:08 (permalink)
    +1 (1)
    My bad English. I mean the registers in the windows is not updated.
    #3
    1and0
    Access is Denied
    • Total Posts : 6612
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: Run Time Watch 2017/03/01 11:02:11 (permalink)
    +1 (1)
    Runtime Watch is available ONLY with the RealICE.
    #4
    goran.hult
    Starting Member
    • Total Posts : 37
    • Reward points : 0
    • Joined: 2007/03/26 05:37:01
    • Location: 0
    • Status: offline
    Re: Run Time Watch 2017/03/01 11:13:13 (permalink)
    0
    Are you sure.
    In previous versions of MPLABX (2.35) the "New Runtime Watch" was greyed out and not possible to select when you used MPLAB SIM. In MPLABX 3.55 it is possible to select it and when I select it the registers get updated in a very erratic manner.
    post edited by goran.hult - 2017/03/01 12:24:05
    #5
    1and0
    Access is Denied
    • Total Posts : 6612
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: Run Time Watch 2017/03/01 12:27:50 (permalink)
    0
    That must be a new feature in MPLABX v3.55, which I have not installed yet. It would be nice if MPLAB SIM supports Runtime Watch. George should know more about this.
    #6
    GeorgePauley
    Moderator
    • Total Posts : 797
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: offline
    Re: Run Time Watch 2017/03/02 09:20:28 (permalink)
    +1 (1)
    Simulator now supports runtime watch.  I can't remember exactly when this happens, but it's been with the last year.
     
    Now that I understand the issue, I've asked the runtime watch "guru" to take a look.
    #7
    GeorgePauley
    Moderator
    • Total Posts : 797
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: offline
    Re: Run Time Watch 2017/03/07 09:47:37 (permalink)
    0
    Everything appears to be working fine here in Chandler.  Can you give step by step instructions on how to replicate (just one of, for now) the issue?
    #8
    goran.hult
    Starting Member
    • Total Posts : 37
    • Reward points : 0
    • Joined: 2007/03/26 05:37:01
    • Location: 0
    • Status: offline
    Re: Run Time Watch 2017/03/07 10:45:42 (permalink)
    0
    How can I upload a screen dump here?
    I get a access denied when I try to attach a file and when I paste a screen dump directly in the reply  nothing happens when I press Submit Post
    #9
    CinziaG
    PORCAMADONNA
    • Total Posts : 2438
    • Reward points : 0
    • Joined: 2016/12/07 14:20:36
    • Location: Wien
    • Status: offline
    Re: Run Time Watch 2017/03/07 11:09:15 (permalink)
    0
    goran.hult
    How can I upload a screen dump here?
    I get a access denied when I try to attach a file and when I paste a screen dump directly in the reply  nothing happens when I press Submit Post




    try here
    http://www.microchip.com/forums/m974690.aspx
     
    there are random blocks in some threads...

    PORCAMADONNA
    #10
    goran.hult
    Starting Member
    • Total Posts : 37
    • Reward points : 0
    • Joined: 2007/03/26 05:37:01
    • Location: 0
    • Status: offline
    Re: Run Time Watch 2017/03/07 11:35:07 (permalink)
    +1 (1)
    Thank you Cinzia.
    It was a pain even to attach my file in the other thread but after 5 trials it eventually attached it.

    GeorgePauley: Look at http://www.microchip.com/forums/m974690.aspx
     
    #11
    qhb
    Superb Member
    • Total Posts : 4750
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: Run Time Watch 2017/03/07 12:25:00 (permalink)
    +1 (1)
    Here is the image from that topic.
     

    #12
    goran.hult
    Starting Member
    • Total Posts : 37
    • Reward points : 0
    • Joined: 2007/03/26 05:37:01
    • Location: 0
    • Status: offline
    Re: Run Time Watch 2017/03/27 07:35:55 (permalink)
    0
    Anybody else who has the problem that PORTA and PORTB are not updated in Runtime Watch window?
    #13
    qhb
    Superb Member
    • Total Posts : 4750
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: Run Time Watch 2017/03/27 12:08:00 (permalink)
    +1 (1)
    goran.hult
    Anybody else who has the problem that PORTA and PORTB are not updated in Runtime Watch window?

    When?
    Nothing is updated while your program is running full speed. That is just how it works.
    If you mean something else, please be more explicit.
    As with any problem, explain what you expected to see, and what you actually did see. Don't assume it is obvious.
     
    #14
    goran.hult
    Starting Member
    • Total Posts : 37
    • Reward points : 0
    • Joined: 2007/03/26 05:37:01
    • Location: 0
    • Status: offline
    Re: Run Time Watch 2017/03/27 12:56:49 (permalink)
    +1 (1)
    I expect that a Runtime Watch window should be updated at runtime without the need to pause the simulation. Otherwise i will use a normal Watch and not a Runtime Watch.

    As seen in image in post #12, PORTA and PORTB is updated at runtime in the SFR-window but not in the Watch window
    #15
    goran.hult
    Starting Member
    • Total Posts : 37
    • Reward points : 0
    • Joined: 2007/03/26 05:37:01
    • Location: 0
    • Status: offline
    Re: Run Time Watch 2017/07/17 00:18:21 (permalink)
    0
    This thread has 1500 views but it seems that nobody has tried the Runtime Watch in MPLABX.
    Please can someone try the code below and see if LATA and PORTB selected as Runtime Watch is updated correctly when you inject signals to RB0 and RB1 in either the "Stimulus Window" or the  "I/O Pins Window".
    I have tried this in MPLABX 3.50-3.65 and the Runtime Watches are not updated correctly in any of these versions.


     
    #include <xc.h>   

    #pragma config CPD=OFF, BOREN=OFF, IESO=OFF, FOSC=INTOSC, FCMEN=OFF, MCLRE=ON,\
                   WDTE=OFF, CP=OFF, PWRTE=ON, CLKOUTEN=ON 
    #pragma config PLLEN=OFF, WRT=OFF, STVREN=ON, BORV=LO, LVP=OFF 

    void init(void);

    void main()
    {    
        init();
        while(1)          
        {
           LATAbits.LATA0 = PORTBbits.RB0 && PORTBbits.RB1;
        }
    }
     

    void init()
    {     
         OSCCON=0b01101000;   
         LATA=0x00;          
         LATB=0x00;          
         ANSELA=0b00000000;   
         ANSELB=0b00000000;
         TRISA=0b00100000;   
         TRISB=0b00000011;  
    }


    MPLABX 3.50 - 3.65, XC8 compiler 1.41 , PIC 16F1827, Windows 7, Windows 10


    post edited by goran.hult - 2017/07/17 00:47:21
    #16
    GeorgePauley
    Moderator
    • Total Posts : 797
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: offline
    Re: Run Time Watch 2017/07/17 09:58:54 (permalink)
    0
    Again, working fine for me.
    #17
    RISC
    Super Member
    • Total Posts : 4022
    • Reward points : 0
    • Status: online
    Re: Run Time Watch 2017/07/17 10:58:09 (permalink)
    +1 (1)
    Goran,
    Maybe worth to post a zipped version of your project including injection scripts ?
    So multiple users can try and report their experience ;=)
    Regards
     
    #18
    Jump to:
    © 2017 APG vNext Commercial Version 4.5