View previous topic :: View next topic |
Author |
Message |
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
CCS Wizard |
Posted: Mon Jun 10, 2019 11:47 pm |
|
|
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
Please help
Best wishes
Joe |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19553
|
|
Posted: Tue Jun 11, 2019 12:31 am |
|
|
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... |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
|
Posted: Tue Jun 11, 2019 12:52 am |
|
|
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
I know that have some errors, usually I am searching the forum for fixes
Thanks again
Best wishes
Joe |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9246 Location: Greensville,Ontario
|
|
Posted: Tue Jun 11, 2019 4:11 am |
|
|
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
|
|
Posted: Tue Jun 11, 2019 3:25 pm |
|
|
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
Best wishes
Joe |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
|
Posted: Fri Jun 14, 2019 1:47 am |
|
|
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
|
|
Posted: Fri Jun 14, 2019 4:01 am |
|
|
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
|
|
Posted: Fri Jun 14, 2019 4:55 am |
|
|
Thanks Ttelmah, always useful answers
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
|
|
Posted: Fri Jun 14, 2019 8:07 am |
|
|
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. |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
|
Posted: Fri Jun 14, 2019 4:29 pm |
|
|
Thanks again Ttelmah, I know need to read, sometimes my English not enough
You can help also with the I2C?
Why I can't setup both?
Best wishes
Joe |
|
|
ngonho
Joined: 18 Dec 2020 Posts: 1
|
Re project Wizard |
Posted: Fri Dec 18, 2020 2:17 am |
|
|
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
|
|
Posted: Fri Dec 18, 2020 2:26 am |
|
|
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. |
|
|
|