I'm trying to simulate a PIC24FJ in proteus for the most realistic way but even tough proteus is running the simulation it doesn't allow me to configure HS or XT oscillator for primary oscillator neither external oscillator , it is giving me the following message:

[PIC24 SETUP] PC=0x000000. Oscillator selected by POSCMDx (0b01) and FNOSCx (0b100) bits is illegal or reserved. Defaulting to FRC clock. [U1]

which means that it allow me to configure my oscillators as I want.

I can work that way but it'll force me to modify the timer values when I implement the real circuit.

Can someone tell me how to make the simulation works wih HS oscillator?


To make it an real answer:

Crystal in Proteus doesn't work and also for microcontroller projects you don't have to use crystal model in Proteus instead double click the MCU in Proteus and for Processor Clock Frequency enter somethink like 4MHz or 20MHz or the value you require and OK it.


  • 1
    \$\begingroup\$ Yes, thanks for the clarification. For the time in that I wrote the answer I didn't knew that by writing the frequency in the property window is the correct way to do for the primary oscillator. \$\endgroup\$ – vram Sep 12 at 22:39
  • \$\begingroup\$ You are welcome! \$\endgroup\$ – Mike Sep 13 at 5:48

Well, I found that at least in this model of PIC24F for proteus the simulations works as expected with POSCMOD = EC (external clock) but I let connected the crystal, in that mode the secondary oscillator also works but with an external clock (a clock model of proteus).

  • 4
    \$\begingroup\$ I can't tell -- does this mean you consider your question to be answered? \$\endgroup\$ – Dave Tweed Sep 10 at 11:33
  • \$\begingroup\$ @DaveTweed may be I didn't write it in the right way, I do consider the answer to the question is: "Is not possible to simulate PIC24F in Proteus with HS or XT oscillator mode", it simply doesn't work. \$\endgroup\$ – vram Sep 10 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.