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

MATLAB/SIMULINK Code Generation with CCS
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah



Joined: 11 Mar 2010
Posts: 19222

View user's profile Send private message

PostPosted: Tue May 09, 2017 12:32 am     Reply with quote

The Wizard saves you nothing.

It doesn't make any attempt to set things sensibly. It'll do exactly what you tell it to do. So, it is perfectly usable, provided _you_ know exactly how things should be set. If you know how things should be set, then why use the Wizard?....

You are far better off forgetting the Wizard, and for the chip you are using spending twenty five minutes with the data sheet, and making sure you set every peripheral, and fuse how it needs to be for your project. You then _know_ the settings being used.

For instance, I spent an afternoon at the weekend, typing comments into a file associated with a new project.
First twenty lines describing what each pin has to do, and what it is connected to. Then the clocks, then the peripherals in use.
This is then attached to the source code, followed by two further include files, one actually setting the clock/fuses, the second doing any explicit TRIS settings, and configuring the peripherals. This also has a remark saying where the drivers are for each peripheral.
Then start testing each peripheral in turn to verify the settings, before actually switching to the 'code'.

Five years from now, I or another person, can come back to the project, and know what peripheral is on what pin, how it is configured, and where the code for it is.

It is vital, both for clear structured actual code development, and to prevent things decaying into an incomprehensible mess. It then stands you in great stead, when in a few years time, somebody says 'do you remember this project', and wants you to do something based on it, or update it for a new version.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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