Just tested the jallib blink sample (which is running at 4 MHz). At
pin_A4 see a freq. of 0.998 MHz. So it seems like you have a
hardware/wiring problem..
On 14-12-2024 12:15, vsurducan wrote:
Hi Rob,
I'm trying to understand the PWM in PIC12F1572, for which the pwm
library can not be used.
I need to see the system clock.
The problem is that I can not make it visible on clockout pin. The
following code should do it?
include 12f1572 -- target PICmicro
--
;pragma target clock 32_000_000 -- oscillator frequency
pragma target clock 8_000_000 -- oscillator frequency
--
pragma target OSC INTOSC_NOCLKOUT -- internal oscillator
pragma target PLLEN DISABLED -- PLL off
pragma target CLKOUTEN ENABLED -- clock output enabled
pragma target WDT DISABLED -- watchdog
pragma target BROWNOUT DISABLED -- no brownout reset
pragma target LVP ENABLED -- low voltage
programming
pragma target MCLR EXTERNAL -- external reset
--
OSCCON_SCS = 0 -- select primary oscillator
OSCCON_IRCF = 0b1110 -- 8 MHz
;OSCCON_SPLLEN = ENABLED -- software PLL on 8x4=32MHz
OSCCON_SPLLEN = DISABLED - 8Mhz OSC
--
enable_digital_io() -- make all pins digital I/O
pin_A4_direction = output ; output osc/4
--
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 visit
https://groups.google.com/d/msgid/jallib/CAM%2Bj4qskr5urcQxa_Ok3gHTeq4nMBAtz%2BkmziB4kBf1HBuHCJg%40mail.gmail.com
<https://groups.google.com/d/msgid/jallib/CAM%2Bj4qskr5urcQxa_Ok3gHTeq4nMBAtz%2BkmziB4kBf1HBuHCJg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
*Rob H*amerling, Vianen, NL
--
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 visit
https://groups.google.com/d/msgid/jallib/1c978896-3436-41c8-be39-b2d1bd05dc3b%40gmail.com.