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 CCS Technical Support

CCS Wizard

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



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

CCS Wizard
PostPosted: Mon Jun 10, 2019 11:47 pm     Reply with quote

Hi

I am trying to make a new project with the PIC16F1847. I have a few projects made with this controller, always using the CCS PIC wizard that at the end of the process I have the CCS Project, the .c file and the .h file.
The CCS website page regarding the PIC Wizard
http://www.ccsinfo.com/faq.php?page=project-wizard
Is how it was in the past (if I remember correct, long time I didn’t made a new project).
But today, I can’t get this page anymore when click on the wizard.
CCS PCH C Compiler, Version 5.059, 31220

I know Jay will say that the wizard is for lazy people, but is more easy for me to make a new project in this way Smile

Please help
Best wishes
Joe
Ttelmah



Joined: 11 Mar 2010
Posts: 19553

View user's profile Send private message

PostPosted: Tue Jun 11, 2019 12:31 am     Reply with quote

File
New
Project Wizard (or Project 24bit wizard).

You are then asked to put in the filename you want to use, and the
project wizard page appears.

The toolbar has been redesigned. The 'project' tab disappeared with
the launch of the V5 compiler.

The problem with the wizard, is that it leaves many things unset, which
on the more modern chips need to be set. It increases the probability
of not getting things actually configured to work... Sad
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Tue Jun 11, 2019 12:52 am     Reply with quote

Hi Ttelmah

Thank you for the reply.
I done as you said also before, just the path was wrong.
Now everything is OK. I ma getting old Smile
I know that have some errors, usually I am searching the forum for fixes Smile

Thanks again
Best wishes
Joe
temtronic



Joined: 01 Jul 2010
Posts: 9246
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Jun 11, 2019 4:11 am     Reply with quote

NO, not for lazy people BUT just be aware that the 'Wizard' is someone else's idea of default configurations ! It also probably changes 'defaults' for different PICs, or even compiler versions , though I've never used it but others may know.
I still think all I/O should default to digital I/O....
My 'cheat' is to have an #INCLUDE file that contains every fuse, one per line, with comment. I started this with the 46K22 5-6 years ago as there's more fuses than instructions. Having a known set of fuses is,well, kinda important and it's easier and safer to type one INCLUDE instead of 30-40 fuses lines ! It sure saves on typos and 'OK, WHY doesn't it work now' problems.....

Jay
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Tue Jun 11, 2019 3:25 pm     Reply with quote

Thanks Jay

I have also the PIC18F26K22, PIC16F648A and PIC16F1847 fuses in .txt files per your long time advice.
Still for me is more easy with the wizard to select the pins for different functions Smile

Best wishes
Joe
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Fri Jun 14, 2019 1:47 am     Reply with quote

Hi

PIC16F1847

CCS PCM C Compiler, Version 5.062, 31220

Still with the Wizard I am trying to make a file with the available options for:

CCP1 I get just the default pin RB3, can't change to RB0
CCP2 I get just the default pin RB6, can't change to RA7
I am getting setup_ccp1(CCP_PWM);
According to the wizard is on the default pin. How I can change to the alternative pins?

Supposed to be two I2C but in the Wizard I can setup just one, can select or the pins for SCL1 & SDA1 or the pins for SCL2 & SDA2
I stup:
Code:
#use i2c(Master,Slow,sda=PIN_B1,scl=PIN_B4,restart_wdt,force_hw)

I made myself:
Code:
#use i2c(Master,Slow,sda=PIN_B2,scl=PIN_B5,restart_wdt,force_hw)

In the .lst can see that the compiler uses the second #use I2C only

What I can do with or without the Wizard in both subjects?

Best wishes
Joe
Ttelmah



Joined: 11 Mar 2010
Posts: 19553

View user's profile Send private message

PostPosted: Fri Jun 14, 2019 4:01 am     Reply with quote

Always the place to look is the header file for your chip.

Quote:

#define CCP1_B3 0x00
#define CCP1_B0 0x100
#define CCP2_B6 0x00
#define CCP2_A7 0x100
#define CCP_P1A_B3 0x000
#define CCP_P1A_B0 0x100
#define CCP_P1C_B6 0x000
#define CCP_P1C_A7 0x200
#define CCP_P1D_B7 0x000
#define CCP_P1D_A6 0x400
#define CCP_P2B_B7 0x000
#define CCP_P2B_A6 0x200


The wizard does not support on any chip pin relocation (so not PPS
or the settings like this).

Just | in the options you want. So (for example):

setup_ccp1(CCP_PWM | CCP1_B0);
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Fri Jun 14, 2019 4:55 am     Reply with quote

Thanks Ttelmah, always useful answers Smile

I see in the header the lines you posted, just don't know how to use them.
Now I understand, as in your example:

Code:
setup_ccp1(CCP_PWM | CCP1_B0);


Best wishes
Joe
Ttelmah



Joined: 11 Mar 2010
Posts: 19553

View user's profile Send private message

PostPosted: Fri Jun 14, 2019 8:07 am     Reply with quote

The header does actually tell you how they are used. If you look at the
section heading, you see:
Quote:

// Constants used for SETUP_CCPx() are:

and then for the constants further down:
Quote:

// The following should be used with the ECCP unit only (or these in)


Understanding what they mean by "or these in", comes with a bit of reading
of some of the examples. Very Happy
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Fri Jun 14, 2019 4:29 pm     Reply with quote

Thanks again Ttelmah, I know need to read, sometimes my English not enough Smile

You can help also with the I2C?
Why I can't setup both?

Best wishes
Joe
ngonho



Joined: 18 Dec 2020
Posts: 1

View user's profile Send private message

Re project Wizard
PostPosted: Fri Dec 18, 2020 2:17 am     Reply with quote

I have created a project and am programming. I want to install more functionality but I don't know how to open and reuse wizard for programming project. Does CCS C support updating function settings by wizard? If there is support, how?
Ttelmah



Joined: 11 Mar 2010
Posts: 19553

View user's profile Send private message

PostPosted: Fri Dec 18, 2020 2:26 am     Reply with quote

No,
The Wizard is a 'one shot' thing used to create a project. If you want to change
things, change them yourself. You honestly need to learn how to do this,
the Wizard is poor way to actually do things. Restrictive, & does many things
wrong.
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