mb91
Joined: 30 Oct 2007 Posts: 2
|
PCD compiler, PIC 24 and external oscillator |
Posted: Tue Nov 06, 2007 7:44 am |
|
|
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 |
|