|
|
View previous topic :: View next topic |
Author |
Message |
tugrulex84
Joined: 10 Nov 2008 Posts: 9
|
pic24f problem?? |
Posted: Thu Nov 13, 2008 7:57 am |
|
|
hi;
I wrote an easy program with my CCS C compiler to see pic24f but it doesn't work. When I try this kind of program for 16f it works but with pic 24F it doesn't work and gives 17 errors. I don't understand the problem. I need help. Thank you.
Code: |
#include <24FJ64GA006.h>
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES XT //Crystal osc <= 4mhz
#FUSES PR #FUSES NOCKSFSM #FUSES NODEBUG //No Debug mode for ICD
#FUSES NOSYNC //No sync between I/O and clock
#FUSES NOPUT //No Power Up Timer
#FUSES BROWNOUT //Reset when brownout detected
#FUSES BORV47 #FUSES LPOL_HIGH //Low-Side Transistors Polarity is Active-High (PWM 0,2,4 and 6)
#FUSES HPOL_HIGH //High-Side Transistors Polarity is Active-High (PWM 1,3,5 and 7)
#FUSES NOPWMPIN //PWM outputs drive active state upon Reset
#FUSES MCLR //Master Clear pin enabled
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOWRT //Program memory not write protected
#FUSES NODEBUG //No Debug mode for ICD
#FUSES INT250KHZ //Internal 250 khz Osc
#FUSES INT125KHZ //Internal 125 khz Osc
#FUSES RESERVED //Used to set the reserved FUSE bits
Reserved
#FUSES RC_IO //Resistor/Capacitor Osc
#use delay(clock=4000000,RESTART_WDT)
void main()
{
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_OFF);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
setup_low_volt_detect(FALSE);
setup_oscillator(False);
// TODO: USER CODE!!
while(1)
{
output_high(pin_B0);
delay_ms(250);
output_low(pin_B0);
delay_ms(250);
}
}
|
|
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Thu Nov 13, 2008 1:02 pm |
|
|
I see, that you are using a lot of fuses, that is unknown by PIC24F. There's an info page Valid Fuses in PCWHD, check it. |
|
|
|
|
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
|