Announcement

Collapse
No announcement yet.

meCONFIG: cfig1 = _INTRC_IO

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • meCONFIG: cfig1 = _INTRC_IO

    Darrel:

    First, thanks for all of your work developing the meCONFIG files -- what a top drawer effort.

    I'm developing an application using the PIC 16F88 and want to use the internal 8 MHz or 4 MHz clock, plus use the I/O functions of both RA6 and RA7.

    After setting cfg1 = _INTRC_IO, do I need to set OSCON, IRCF<2:0>: Internal RC Oscillator Frequency Select bits, to the clock of either: 8 Mhz (111) or 4 MHz (110)?

    Or is DEFINE OSC (x) required? And if this is the case, if DEFINE OSC (X) is omiitted, does PBP assume a default value for DEFINE OSC 4 and calculates the program execution based upon a 4 MHz system clock?

    Thanks,

    Bob Wills

  • #2
    Hi Bob,
    I'll take a stab at this if you don't mind.
    DEFINE OSC x "only" informs the compiler at which frequency you intend to run the PIC. It does in no way make the PIC run at that speed - it's entierly up to you to see to it that it runs at the speed you specify (or timings etc will be off). So yes, you need to set the frequency select bits appropriately.

    If you omitt the DEFINE OSC x the compiler is going to asume 4MHz.

    /Henrik.

    Comment


    • #3
      Thanks for the informative reply

      Henrik Olsson

      Hi Henrik:

      I certainly appreciate your advise.

      I'll make it a practice to use your advice by setting the clock bits and adding the DEFINE OSC x as is appropriate.

      Many Thanks,

      Bob Wills

      Comment

      Working...
      X
      😀
      🥰
      🤢
      😎
      😡
      👍
      👎