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

Project Wizard Problem

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



Joined: 07 Sep 2010
Posts: 24
Location: West Australia

View user's profile Send private message

Project Wizard Problem
PostPosted: Sat Sep 18, 2010 11:40 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Sep 19, 2010 6:10 pm     Reply with quote

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.
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