CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC J Series Issue with PLL

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rajshek_2010



Joined: 24 Nov 2005
Posts: 5

View user's profile Send private message Send e-mail Yahoo Messenger

PIC J Series Issue with PLL
PostPosted: Tue Dec 16, 2008 8:48 am     Reply with quote

Hi,
I have recently upgraded my compiler to support J Series.
The current compiler version is 4.083.

We are using PIC18F65J11 with 10 MHz crystal. We wanted to use 4 x PLL clock multiplier.

When we try debugging the debug windows shows that micro is working in 10MHz while we have configured for 10 MHz x 4 PLL.

When we tried PIC18F8722 with 10 MHz, it works well with compiler. The debug window shows as 40 MHz.

Can someone help?
Code:
#include <18F65J11.h>
#device ICD=TRUE
#device adc=8

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES WDT128                   //Watch Dog Timer uses 1:128 Postscale
#FUSES H4_SW                    //High speed osc with SW enabled 4x PLL
#FUSES NODEBUG                  //No Debug mode for ICD
#FUSES NOXINST                  //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES NOSTVREN                 //Stack full/underflow will not cause reset
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOFCMEN                  //Fail-safe clock monitor disabled
#FUSES NOIESO                   //Internal External Switch Over mode disabled
#FUSES PRIMARY                  //Primary clock is system clock when scs=00

#use delay(clock=10000000)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)

void main()
{
   setup_adc_ports(NO_ANALOGS|VSS_VDD);
   setup_adc(ADC_OFF|ADC_TAD_MUL_0);
   setup_psp(PSP_DISABLED);
   setup_spi(SPI_SS_DISABLED);
   setup_wdt(WDT_OFF);
   setup_timer_0(RTCC_INTERNAL);
   setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
   setup_comparator(NC_NC_NC_NC);
   setup_vref(FALSE);
//Setup_Oscillator parameter not selected from Intr Oscillator Config tab

   // TODO: USER CODE!!
   while(1)
   {
      output_high(PIN_B1); delay_ms(1000);
      output_low(PIN_B1);delay_ms(1000);
   }

}
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Dec 16, 2008 9:33 am     Reply with quote

You did not use the correct value for the delay parameter

Code:
#use delay(clock=10000000)


should be

Code:
#use delay(clock=40000000)

_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group