Hi all, I'm using a 10MHz crystal in HS_PLL OSC mode on a PIC18F44J11. I should have 40MHz internal frequency, however blinking the standard LED sample gives 2S instead of 500uS period (4 time lower like PLL is not enabled). If I'm running in HS mode, blinking is OK.
I've found the problem, good to know: enable the PLL from OSCTUNE register before setting the pragma -- ------------------------------------------------------ -- Title: Blink-a-led of the Microchip pic18f44j11 -- -- Author: Rob Hamerling, Copyright (c) 2008..2010, all rights reserved. -- -- Adapted-by: -- -- Compiler: 2.4n -- -- This file is part of jallib (http://jallib.googlecode.com) -- Released under the BSD license ( http://www.opensource.org/licenses/bsd-license.php) -- -- Description: -- Sample blink-a-led program for Microchip PIC18f44j11. -- -- Sources: -- -- Notes: -- - File creation date/time: 7 Mar 2010 10:06:06. -- -- ------------------------------------------------------ -- include 18f44j11 -- target PICmicro -- -- This program assumes that a 10 MHz resonator or crystal -- is connected to pins OSC1 and OSC2. -- (unspecified configuration bits may cause a different frequency!)( pragma target clock 40_000_000 -- oscillator frequency -- configuration memory settings (fuses) OSCTUNE_PLLEN = 1 -- enabling the PLL is missing!!!!!!!!! pragma target OSC HS_PLL -- HS crystal PLL enabled pragma target WDT disabled -- no watchdog -- 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_D2 pin_D2_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.
