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 support@ccsinfo.com

PCD compiler, PIC 24 and external oscillator

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



Joined: 30 Oct 2007
Posts: 2

View user's profile Send private message

PCD compiler, PIC 24 and external oscillator
PostPosted: Tue Nov 06, 2007 7:44 am     Reply with quote

Hello,
I work on a project with a 24fj128ga010 processor and PCD Compiler.
The software do not work with the Primary Oscillator ?
I work with a explorer 16 demo board with an external oscillator at 14 745 600 Hz.... And the oscillator is never work... with a ccs firmware but yes with an other compiler...
Could you help me ?
Here the code use :

#include <24FJ128GA010.h>
#fuses XT
#use delay(xtal=14745600)
#use rs232(baud=9600,UART2 )
void main(void)
{
int i;
printf("hello world");
i=0;
while(1)
{
i++;
printf("%d",i);
delay_ms(10);
}
}

Here the code with the RC internal frequency (this configuration work):

#fuses FRC
#use delay(clock=8000000)
#use rs232(baud=9600,UART2 )
void main(void)
{
int i;
printf("hello world");
i=0;
while(1)
{
i++;
printf("%d",i);
delay_ms(10);
}
}
Could you give more detail about "#fuses" ?
In the include file all the option are listed but not discribed ?
//////// Program memory: 44032x24 Data RAM: 8192 Stack: 31
//////// I/O: 93 Analog Pins: 16
//////// Fuses: JTAG,NOJTAG,PROTECT,NOPROTECT,WRT,NOWRT,DEBUG,NODEBUG,COE
//////// Fuses: NOCOE,ICS0,ICS1,WDT,NOWDT,WINDIS,NOWINDIS,WPRES128,WPRES32
//////// Fuses: WPOSTS1,WPOSTS2,WPOSTS3,WPOSTS4,WPOSTS5,WPOSTS6,WPOSTS7
//////// Fuses: WPOSTS8,WPOSTS9,WPOSTS10,WPOSTS11,WPOSTS12,WPOSTS13,WPOSTS14
//////// Fuses: WPOSTS15,WPOSTS16,IESO,NOIESO,FRC,FRC_PLL,PR,PR_PLL,SOSC
//////// Fuses: LPRC,FRCDIV,CKSFSM,NOSKSFSM,OSCIO,NOOSCIO,NOPR,HS,XT,EC
////////
Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Nov 06, 2007 6:49 pm     Reply with quote

Quote:

#fuses XT
#use delay(xtal=14745600)

And the oscillator is never work.

Download the 24F Oscillator Reference manual.
http://ww1.microchip.com/downloads/en/DeviceDoc/39700a.pdf
Look at this table on page 10:
Quote:
Table 6-2: Primary Oscillator Operating Modes

What oscillator mode does it suggest for your crystal frequency ?
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