Ttelmah
Joined: 11 Mar 2010 Posts: 19254
|
|
Posted: Tue May 09, 2017 12:32 am |
|
|
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. |
|