View previous topic :: View next topic |
Author |
Message |
Bill Legge
Joined: 07 Sep 2010 Posts: 24 Location: West Australia
|
Project Wizard Problem |
Posted: Sat Sep 18, 2010 11:40 pm |
|
|
Just started learning C and having a slight problem with the project wizard.
My target is a PIC18F8722, 10MHz xtal (running at 40MHz using PLL).
My compiler is: 4.112
The wizard produces:
Code: |
#include <main.h>
void main()
{
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_2|ADC_TAD_MUL_0);
setup_pp(PMP_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_timer_4(T4_DISABLED,0,1);
setup_ccp1(CCP_OFF);
setup_comparator(NC_NC_NC_NC);
);
//TODO: User Code
} |
When I compile this the 'setup_pp(PMP_DISABLED)' comes up as an error.
I get the same problem when the target is a PIC16F877A.
If I delete the line - all goes OK and the program runs.
No big deal but I suspect I'm doing something wrong and would like to learn about it.
And... apart from this site, are there any to be recommended for beginners in C?
Regards Bill legge _________________ Denmark in West Australia
'Where the forest meets the sea' |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Sep 19, 2010 6:10 pm |
|
|
If the CCS Wizard is producing code for a PIC and it doesn't compile,
then it's a bug. Comment out the line (it's not needed anyway) and
proceed with your project.
Then email CCS with the sample program posted above, and your
compiler version. Also give them the main.h code. |
|
|
|