Difference between revisions of "A C Program Header Example"
Jump to navigation
Jump to search
Russ hensel (talk | contribs) |
(link to related articles, etc.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
It has taken me a while to work out a header for C programs that I like. It is for both me and for those who try to reproduce or modify the project. | It has taken me a while to work out a header for C programs that I like. It is for both me and for those who try to reproduce or modify the project. | ||
+ | (This particular example is from [[PIC based Stepper Motor Dancing Analog Clock]], | ||
+ | but every project could use a similar header | ||
+ | filled out with specific details that will be helpful to help people reproduce or modify that project). | ||
== The Example == | == The Example == | ||
Line 50: | Line 53: | ||
// Heap size:208 bytes, Heap max single alloc:95 bytes | // Heap size:208 bytes, Heap max single alloc:95 bytes | ||
// | // | ||
+ | |||
+ | == Comments == | ||
+ | Something to add, take away... | ||
+ | |||
== Got another Example? == | == Got another Example? == | ||
+ | |||
+ | |||
+ | [[Category:BoostC]][[Category:PIC]] |
Latest revision as of 10:38, 28 January 2023
What[edit]
It has taken me a while to work out a header for C programs that I like. It is for both me and for those who try to reproduce or modify the project. (This particular example is from PIC based Stepper Motor Dancing Analog Clock, but every project could use a similar header filled out with specific details that will be helpful to help people reproduce or modify that project).
The Example[edit]
// Overview: // A program to drive the PIC based Stepper Motor Dancing Analog Clock // Author: russ_hensel, see: http://www.opencircuits.com/User:Russ_hensel // // // Environment: // SourceBoost BoostC 6.90 full version on XP // PIC: 16f877A // Check: Settings -> Options -> Extra compiler options: <none> // Check: Settings -> Options -> Extra linker options: -v -swcs 6 2 // Check: Settings -> Options -> Tools -> Compiler and Linker Location to match your configuration // Clock: see pragma and #define below // // // Hardware Assignment // // RB.0 interrupt input from IR reviever // Timer1 timing for IR // Serial Pins for serial interface // // // Reminder notes: // keep help db up to date as to the location of libraries, for this the serial comm library // see help db "serial comm" // // check out clock speed and baud rate! // // adjust CYC_PER_SEC to set to demo or true speed // // check version in rptVersion() // arrays may be in rom or not, trade off for which resource seems more restricted. ( tested for most arrays ) // Status of comments // take with a grain of salt, in particular the effect on globals may be incomplete // // // status/history ( indented when done ) // location now: C:\Russ\PER\_XX\PIC\BoostC\DDClock_OpenCircuits\DDClock.__c // seems to work, fine, but want to enhance // // Compile results: // Serial WClock version = Dec 24 2008 a // RAM available:368 bytes, used:160 bytes (43.5%), free:208 bytes (56.5%), // Heap size:208 bytes, Heap max single alloc:95 bytes //
Comments[edit]
Something to add, take away...