Hi,
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

Version 1:

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
enable_digital_io()                -- disable analog I/O (if any)
--

enable_digital_io()                -- make all pins digital I/O
--
-- Specify the pin to which the LED (with serial resistor!) is
connected:
alias   led      is pin_A0
pin_A0_direction =  output
--
forever loop
   led = on
   _usec_delay(250_000)
   led = off
   _usec_delay(250_000)
end loop
--




Version 2:




include 18f43k20                    -- target PICmicro
--

pragma target clock 8_000     -- oscillator frequency
-- configuration memory settings (fuses)
pragma target OSC INTOSC_NOCLKOUT
pragma target WDT      disabled     -- no watchdog
pragma target DEBUG    disabled     -- no debugging
pragma target LVP      disabled     -- no Low Voltage Programming
pragma target MCLR external        -- reset externally

enable_digital_io()                -- make all pins digital I/O
--
-- Specify the pin to which the LED (with serial resistor!) is
connected:
alias   led      is pin_A0
pin_A0_direction =  output
--
forever loop
   led = on
   _usec_delay(250_000)
   led = off
   _usec_delay(250_000)
end loop
--

-- 
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.

Reply via email to