| Swordfish Code Snippet - External Oscillator and PLL |
|
|
| Saturday, 04 April 2009 10:15 | |
|
The fastest a 16F PIC micro can run is 5 Million Instructions Per Second (MIPS), almost every 18F PIC micro can run at 10 MIPS, some more. Here's an extract from an 18F datasheet;
for frequencies up to 10 MHz. A PLL then multiplies the oscillator output frequency by 4 to produce an internal clock frequency up to 40 MHz."
Device = 18F458 Clock = 40 Config OSC = HSPLL // Start Of Program...
The above code is simply the start of the program. OSC = HSPLL enables the High Speed (HS) PLL feature, but there are some limitations to take into account.
Remember that the PIC usually executes an instruction once every 4 oscillator cycles, with PLL, it can be reduced t a 1:1, that is, one oscillation = 1 instruction. With this in mind, and the PIC's max speed (10 MIPS), the greatest external crystal that can be used is 10Mhz. If you compared the speed to a PIC running normally, it would be that of a PIC running with a 40Mhz crystal. That is why the Clock setting is declared as 40Mhz, allowing the compiler to generate the right delays etc when required.
Some 18F PIC's can operate at 48Mhz (12 MIPS), check the datasheet for more information about the PIC your using. |
|
| Last Updated ( Tuesday, 14 April 2009 10:47 ) |
Whos Online
- andyo
- Jon Chandler
Forum Activity
LCD / 18F1320 - jon chandler Saturday, 20 March 2010 07:58 - [4 replies]
A 'throw-away" PIC board - mrdeb Thursday, 18 March 2010 06:19 - [32 replies]
Credit Where Credit's Due - jon chandler Tuesday, 16 March 2010 12:01 - [9 replies]
Marching LEDs - mrdeb Saturday, 13 March 2010 22:54 - [7 replies]
USB 8 Channel Servo Controller - andyo Saturday, 13 March 2010 01:19 - [2 replies]
Dedicated Servo Controller - graham Friday, 12 March 2010 17:58 - [0 replies]
Must have....delta temperature glowies! - graham Friday, 12 March 2010 17:31 - [3 replies]




Do you have a model number for the ZIFs? Know of a reputable place...
Nice. The TAP-28 boards are looking good. When I've had a buzzi...
The author (Hop) suggests to "set the target PIC's configuratio...
Graham, Thanks for fixing the spacing on the array. This is how i...
Thanks Graham, It is a problem with Flowcode because the demo wa...
Looks like you've pretty much solved every minor issue that was enc...
The low-cost servo does have one other feature. The origina...
I am not familiar with flowcode, though did you try powering the bo...