Hi John,
On 16-10-11 17:54, John in WI wrote:
First time I've tried using internal oscillator.... no success. I've
tried 2 different setups, posted below. Both compiled& downloaded
with no errors. No Blinking on A0. What am I doing wrong?
> Thanks! John
I see no reason why the led would not blink. The same program (but on a
18f24k20) works here OK, except that the blinking frequency is
incorrect, see below.
include 18f43k20 -- target PICmicro
--
pragma target clock 8_000_000 -- oscillator frequency
-- configuration memory settings (fuses)
pragma target OSC INTOSC_NOCLKOUT -- INTOSC
pragma target WDT disabled -- no watchdog
pragma target LVP disabled -- no Low Voltage Programming
pragma target MCLR external -- reset externally
OSCCON = 0x7f
Explain why you set OSCCON to 0x7F. The datasheet says something
different when you want it to run at 8 MHz. I suggest to specify:
OSCCON_IRCF = 0b110 -- select 8 MHz
OSCCON_SCS = 0b00 -- clock selected via config bits (OSC)
Maybe your led is defect or mounted the wrong way or there is a wiring
error.
Regards, Rob.
--
R. Hamerling, Netherlands --- http://www.robh.nl
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.