|
|
View previous topic :: View next topic |
Author |
Message |
whmeade10
Joined: 27 Jan 2004 Posts: 12
|
DSP Won't Compile |
Posted: Wed Sep 19, 2007 9:34 am |
|
|
Just a couple days ago I upgraded to PCWHD so I can program a dsPIC30F2010. I used the PIC wizard to make the program below.
The compiler won't even get past the setup commands before the main sub-routine. Have I done something wrong or is the upgrade I purchased not ready for prime time? I am using PCD v4.057
Code: |
#include <30F2010.h>
#use delay(clock=20000000,RESTART_WDT)
#FUSES HS //High speed Osc (> 4mhz)
#FUSES PUT16 //Power On Reset Timer value 16ms
#FUSES NOBROWNOUT //No brownout reset
#FUSES BORV20 //Brownout reset at 2.0V
#FUSES NOMCLR //Master Clear pin used for I/O
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOWRT //Program memory not write protected
#use rs232(baud=9600,parity=N,xmit=PIN_F3,rcv=PIN_F2,bits=8,restart_wdt)
void main()
{
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_OFF);
setup_psp(PSP_DISABLED);
setup_spi(SPI_SS_DISABLED);
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);
while(TRUE)
{
}
}
|
These are the errors that I receive when trying to compile.
*** Error 12 "DSP_232.C Line 30(14,21); Undefined identifier ADC_OFF
*** Error 12 "DSP_232.C Line 31(4,17); Undefined identifier setup_psp
*** Error 12 "DSP_232.C Line 33(4,17); Undefined identifier setup_timer-0
*** Error 12 "DSP_232.C Line 34(4,17); Undefined identifier setup_timer-1
*** Error 12 "DSP_232.C Line 35(4,17); Undefined identifier setup_timer-2
*** Error 12 "DSP_232.C Line 36(4,17); Undefined identifier setup_comparator
*** Error 12 "DSP_232.C Line 37(4,14); Undefined identifier setup_vref
7 Errors, 0 Warnings |
|
|
Ttelmah Guest
|
|
Posted: Wed Sep 19, 2007 9:42 am |
|
|
Have you looked in the 30F2010.h file, to see what CCS have called the identifiers for the new chips?. Looking at the errors,it'd appear that they have changed the names for these.
Best Wishes |
|
|
whmeade10
Joined: 27 Jan 2004 Posts: 12
|
|
Posted: Wed Sep 19, 2007 12:31 pm |
|
|
I checked out the .h file, and sure enough, some of the names have been changed, some of the parameters don't exist, or some are correct but still won't work. I guess its a matter of lets get the program out and let the users tell us whats wrong with it. Thanks again for your help Ttelmah |
|
|
|
|
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
|