Joe Bento wrote: > > It can get frustrating trying to track down information when one is > learning. This is true - which is one reason I started writing tutorials - but even when someone like me tries to write a guide, it doesn't always help, because there is simply a lot of information to take in. For C programming using HI-TECH C on a 16F690, I can refer you to my midrange C tutorials (http://www.gooligum.com.au/tut_midrange_C.html), where the answer to your question is to be found in lesson 1. But you might say that it's buried... > If I were writing this program from scratch, how would I know, and where > would I find 'DIS' for 'MCLRDIS' ? I searched on the web, and I see that > If > wanted MCLR enabled, the command is 'MCLREN'. No mention that I can see in > the manual. > > Since it's apparently related to the compiler, I don't expect to see the > reference in the datasheet, but the compiler manual itself seems devoid of > explanation. You are right that this isn't covered in the manual, because it's processor dependent. It's in the include files. Here's the relevant section from my tutorial (saves me writing the same thing again...) - see the last line: -------- The symbols relevant to specific processors are defined in include files. = But instead of including a specific file, as we would do in assembler, it is normal to include a single =93catch-all=94 file: =93htc.h=94. This file identifies the processor being used, and then calls other include files as appropriate. So our next line, which should be at the start of every HI-TECH C program, is: #include To set the processor configuration, a macro called =91__CONFIG(x)=92 is use= d, in a very similar way to the __CONFIG directive in MPASM: // Config: ext reset, no code protect, no brownout detect, no watchdog, // power-up timer enabled, 4MHz int clock __CONFIG(MCLREN & UNPROTECT & BORDIS & WDTDIS & PWRTEN & INTIO); Note that the configuration symbols used are different to those defined in the MPASM include files. For example, =91MCLREN=92 instead of =91_MCLRE_ON= =92, and =91INTIO=92 instead of =91_INTRC_OSC_NOCLKOUT=92. To see which symbols= to use for a given MCU, you need to look in the appropriate include file. For example, in this case (for the 12F629), these symbols are defined in the =93pic126x.h=94 file, found in the =93include=94 directory within the compi= ler install directory. -------- For the 16F690, you need to find the appropriate header file, and that means hunting in the include directory, within the HI-TECH C installation. The config symbols are defined there. -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist