On Wed, 11 Aug 2010 10:54:55 -0700, Todd Lyons wrote: .... snip ... > Now I have a project I want to do, and the PIC seems perfect for > it. My project is straight forward: I want to make a powered ventilation > system for my attic (i.e. turn a fan off and on based on temperature, and > display the status to a user). I know, I know, you can buy those for not > a whole lot of money from Lowes or Home Depot or any number of sites on > the net. Well, what would I learn doing it that way? I'd much rather go > through the struggles of doing it myself and learn in the process. > > That being said, I'm looking for guidance (and trying to keep the stupid > questions to a minimum). > 1. From what I can tell, to use c as the programming language, I have to > be using a PIC18 or higher, and with PIC16 or lower, I must use assembly. > Yea or nay? Nay. My company has been using CCS C compiler for virtually *all* our PIC projects for the past 7 or 8 years. It doesn't get much mention on the PIC list but they have over 30,000 users and it's a solid product. Frequent updates, new devices added continuously (usually months before even Microchip has support) and a C source debugger that is much, much better than MPLAB. It's generally ANSI standard C with a few extensions as makes sense for small microcontroller use. Their tech support is responsive too, a big plus. Because they update frequently, bug fixes come fast relative to other companies (in my experience). Another plus is a good and active user's forum where there are also a lot of user contributed library and driver functions. Code generation is very good. I have done several projects with very low end 12 and 14 bit parts and did everything in C. CCS has some great peripheral driver libraries and built-in functions that manage PIC specific hardware things (Config, clock management, timer, ADC, UART, PSP, etc. setup and control functions). They also make it easy to bit twiddle if you want to get to that level as well as embedded assembly code. Source code provided for their device drivers as well so you can see how they did it and modify if necessary. Their ICD-U64 ICSP/Debug pod is quite excellent. Very fast and supports all the devices the compiler supports. For a modest investment you can have one compiler and development environment that supports everything from PIC10F to dsPIC. At my company we write virtually *everything* in C regardless of MCU and routinely port code between everything from PIC12/16 to AVR to MSP430 to ARM7 and ARM9. Without counting, we've probably developed 25 or 30 products with the CCS C tools and have found them to be cost effective, quality tools. > 2. In my project, I will need a display of some sort, a relay output, a > few buttons, a remote temp sensor, and maybe a pot (or could use buttons > to move target temp up/down). I don't have the means to design and build > my own board, but when you make a project, do you typically use some > prefab board? I have found a few that seem to be useful and reasonably > priced, but I'm just googling. I thought you might have some specific > recommendations. (I think > http://microcontrollershop.com/product_info.php?cPath=3D112_160_197&produ= cts_i > d=3D583 is possibly exactly what I need, but I don't yet grasp the > difficulty of driving a Hitachi HD44780 16 char x 2 line display in > assembly.) 3. I'm interested in using piklab and gpasm/gplink under > Linux, but am willing to use the MPLAB IDE if I have to. My limitations > are that I just don't know Windows like I know Linux. Any > recommendations or experiences would be welcome. > 4. Book recommendations are welcome. I also expect that online tutorials > and others' documented projects will be great teaching tools. > > Part of my personality is that I'm impatient. I want to do things and > make big dreams now! So I'm working on learning first, and not just > trying random stuff :-) (which is what I typically do). You should take a look at CCS C then. Take a look at their "blink a LED" webinar to get an idea how easy it is to get up and running. I believe they have a demo version you can download to give it a spin. No affiliation with them, just a satisfied customer. Matt Pobursky Maximum Performance Systems --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .