Oaldog_Nutrix wrote: > I'm new to pics. Whilst I understand the principles of the code, Which code? > I'm having > difficulty getting the head around the config settings in the header. I can understand "config settings", but what "header"? > I know I have to declare the settings in the header Config settings are not declarations, and even if they were there is no specific place like a "header" where they have to be. > One of the books simply gives a "standard" header and uses it over > and again Sounds like a bad book if it doesn't explain what it's doing. You seem to have some confusion between the code in the PIC and the source code you write. "Header" is a source code construct in some languages. The PIC knows nothing of headers. > whilst the other glibly states that "H'3FF0' sets up LP OSC, WDT OFF, > PUT ON, CP OFF. Put that book down, step back, and get out there fast. Unfortunately any idiot that can write a book. All it takes is to convince a untechnical editor at some publisher. That doesn't mean the stuff in the book is any good. Remember, books are not peer-reviewed. > I know that '3FF0' equals 11111111110000 in binary and I think I know > that these set the various bits. Yes. > However, suppose I don't want LP OSC, WDT OFF. Which bits do > what??? Ditch these books, they aren't doing you and favors. What you need to do instead is read the PIC datasheet. The config settings are described there. Often they are near the end in a chapter called "Special Features of the CPU". Sometimes they are in their own section elsewhere, but you appear to be using a PIC 16 (didn't it occur to you we might need to know which PIC you are using!!?) which all have this in the "Special Features ..." chapter as far as I can remember. At best these books don't garble the information from the datasheet to you. To be sure, cut out the middleman and read the datasheet yourself, especially since these books seem to be showing really bad programming. Config bits are how you specify some configuration information that the PIC needs before it can run code. For example, the code can't select where the oscillator source comes from, since it requires a oscillator to run code. There are other similar issues, like how MCLR works, code protection, and a few more. Again, these are all listed in the datasheet. That is a *must* read if you want to do anything with PICs. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist