Hot!PLLR is not set in Simulator

Author
vyou
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2011/07/08 10:07:00
  • Location: 0
  • Status: offline
2018/09/23 07:50:01 (permalink)
0

PLLR is not set in Simulator

MPLAB IDE v5.05
MCC v3.65.1
XC8 v2.00
PIC16F1619
 
I'm trying to run simulator with PIC16F1619. When I set the internal clock to PLL Enabled with 8 MHz in MCC, Simulator never goes through OSCILLATOR_Initialize because PLLR is never set as shown in the attachment. Actually, OSCSTAT seems always 0x00 in Simulator and this situation applies to some other PICs as far as I checked.
Am I misunderstanding something or is this a bug in Simulator? I may be able to comment out the PLLR check loop, but, I do not want to do that if anyone can give me a better solution. 
 

Attached Image(s)

#1

5 Replies Related Threads

    jtemples
    Super Member
    • Total Posts : 10949
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: PLLR is not set in Simulator 2018/09/23 13:41:11 (permalink)
    +1 (1)
    Things like the oscillator and PLL are generally not simulated since they have no effect on the simulation (check the "limitations" section of the documentation).  Make a "simulator" configuration in the project, and set a #define that lets you #ifdef out things that aren't supported.
    #2
    vyou
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2011/07/08 10:07:00
    • Location: 0
    • Status: offline
    Re: PLLR is not set in Simulator 2018/09/23 14:59:04 (permalink)
    +1 (1)
    Hi jtemples,
     
    Thank you for the explanation and pointing me a direction. That seems making sense and is a great help to me. 
     
    #3
    vyou
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2011/07/08 10:07:00
    • Location: 0
    • Status: offline
    Re: PLLR is not set in Simulator 2018/09/23 19:19:41 (permalink)
    0
    Using Stimulus may not be a bad solution. 
     
     

    Attached Image(s)

    #4
    GeorgePauley
    Moderator
    • Total Posts : 1004
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: offline
    Re: PLLR is not set in Simulator 2018/09/24 08:52:45 (permalink)
    +1 (1)
    Simulator doesn't implement the oscillator.  Both because it's not really needed, and because it really seems like every single device has a different oscillator (and we'd spend all of our time implementing oscillators!)  :P

    And yes, you can use stimulus, or SCL, or simulator plug-ins to manually set PLLR.  It's basically impossible for the simulator to handle all the silicon functionality, so we make the simulator very extensible so that users can handle any special situations that their application code needs.
    #5
    vyou
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2011/07/08 10:07:00
    • Location: 0
    • Status: offline
    Re: PLLR is not set in Simulator 2018/09/24 18:34:12 (permalink)
    0
    Hi George,
     
    Thank you for the information. That made me feel comfortable as now I know I was not misunderstanding something and the tool was working as expected. 
    #6
    Jump to:
    © 2018 APG vNext Commercial Version 4.5