At 09:14 AM 2/23/02 -0500, you wrote: >So why not simply get the project started and see how far you get. I have >a sunrise/sunset controller with display, knob/pushbutton interface, timer >code, calandar, sunrise/sunset interpolation, and relay control interface. >It takes barely 600 bytes of assembly. Even at 3x code bloat by switching to >an High Level Language, that's less than 2K. I've not found a straightforward way to compare the two. Without "control" stuff, the ratio is nowhere near 3:1, but I find that C forces me to use floating point for things I would have used very compact 32-bit fixed-point integer routines for such as polynomial evaluation and precision PID control. Using library functions like printf and sscanf can increase the code size quite a bit (the MSP430 with IAR printf has an overhead of several K (bytes) just for printf(!), not nearly so bad on the PIC, but it's not as complete an implementation. You can get around most of this by writing your own stuff, but that takes away a lot of the advantages of using a HLL. These fixed overheads don't show up until you actually use those functions, because the relevant code isn't linked in unless the compiler finds that it is required. Looking at a real example right now, a controller design that would easily fit into 2K of PIC words using assembler is now taking up about 3,400 words, using C, so about double, overall. When I look back and see what I've been able to squeeze into 2k of assembly code, it's pretty amazing, but it definitely takes longer to write and is harder to maintain, even with copious comments. I also find it harder to evaluate when someone else has written it for me. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com 9/11 United we Stand -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu