steveo
Joined: 27 Oct 2010 Posts: 2 Location: Australia
|
Problem with PLL clock setting |
Posted: Wed Oct 27, 2010 8:15 pm |
|
|
Hi, I am new to Pic C language and am having trouble setting PLL x 4 clock settings. I am using PCWHD compiler V 4.109 and 18F8722. I am using the Flex_Lcd.c driver and have changed the settings to suit my dev. board.
This works.
Code: |
#include <18F8722.H>
#fuses HS,NOLVP,NOWDT,NOPROTECT,NOSTVREN
#define LED PIN_H0
#use delay(clock = 10000000)
#include "flex_lcd.c"
//==========================
void main() {
while(1) {
lcd_init(); // Always call this first.
Delay_ms(1000);
lcd_putc("\fHello World\n");
lcd_putc("A new start");
output_high(LED);
Delay_ms(1000);
output_low(LED);
//Delay_ms(1000);
}
}
|
but this does not.
Code: | #include <18F8722.H>
#fuses H4,NOLVP,NOWDT,NOPROTECT,NOSTVREN
#define LED PIN_H0
#use delay(clock = 40000000)
#include "flex_lcd.c"
//==========================
void main() {
while(1) {
lcd_init(); // Always call this first.
Delay_ms(1000);
lcd_putc("\fHello World\n");
lcd_putc("A new start");
output_high(LED);
Delay_ms(1000);
output_low(LED);
//Delay_ms(1000);
}
}
|
I have tried a number of variations found on an earlier post but no luck. Any help would be great to get me started.
Thanks. |
|