Ok, solved the issue, perhaps this should be written in the blink files:
On PIC18F25K50 (and probably others) if you keep the programmer connected
on the ICSP and the LVP is ENABLED,
the LED connected on pinA0 will not blink until you disconnect the
programmer from the ICSP port.
The reason why this happen  is described in the datasheet: "While in
Low-Voltage ICSP™ mode,
MCLR is always enabled, regardless of the MCLRE bit"
meaning that with the programmer connected permanently to the
microcontroller, the microcontroller will be continuously in reset,
the effect will be no blink of the LED and the wrong conclusion can be that
the oscillator was not configured correctly.
thank you

On Sat, Feb 13, 2021 at 10:28 AM vsurducan <[email protected]> wrote:

> Hi all,
> Perhaps you can see where the problem is below, the 18F25K50 doesn't want
> to run with an internal oscillator and PLL. Thanks!
>
> include 18f25k50                     -- target PICmicro
> --
> -- This program assumes that no resonator or crystal
> -- is connected to pins OSC1 and OSC2.
> pragma target clock 48_000_000      -- oscillator frequency
> --
> pragma target OSC      INTOSC_NOCLKOUT           -- internal oscillator
> pragma target PLLSEL   PLL3X                     -- 3x16MHz = 48MHz
> pragma target PLLEN    ENABLED                   -- PLL on
> pragma target CPUDIV   P1                        -- CPU uses system clock
> 48MHz
> pragma target LS48MHz  P8                        -- USB 48MHz/8 = 6MHz
> pragma target WDT      DISABLED                  -- watchdog
> pragma target XINST    DISABLED                  -- do not use extended
> instruction set
> pragma target DEBUG    DISABLED                  -- no debugging
> pragma target BROWNOUT DISABLED                  -- no brownout reset
> pragma target FCMEN    DISABLED                  -- no clock monitoring
> pragma target IESO     DISABLED                  -- no int/ext osc
> switching
> pragma target LVP      ENABLED                   -- low voltage programming
> pragma target MCLR     EXTERNAL                  -- external reset
> --
> -- The configuration bit settings above are only a selection, sufficient
> -- for this program. Other programs may need more or different settings.
> --
> OSCCON_IRCF = 0b111                 -- select INTOSC to 16MHz
> OSCCON_SCS = 0b00                   -- select primary clock defined by
> CONFIG1H <FOSC3:0>
> OSCCON2_PLLEN = TRUE                -- use PLL
> --
> enable_digital_io()                 -- make all pins digital I/O
> --
> -- A low current (2 mA) led with 2.2K series resistor is recommended
> -- since the chosen pin may not be able to drive an ordinary 20mA led.
> --
> alias  led       is pin_A0          -- alias for pin with LED
> --
> pin_A0_direction = OUTPUT
> --
> forever loop
>    led = ON
>    _usec_delay(100_000)
>    led = OFF
>    _usec_delay(400_000)
> end loop
> --
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/CAM%2Bj4qv4wTqPAdxVCz94kX_w9Se_fMUhtHuJ4hNZjqbmn8MuSA%40mail.gmail.com.

Reply via email to