Matt, David and Joshua. There is *nothing* in the header that defines the port direction to allow using them as outputs. Since all ports start up as inputs, writing values to them will have no effect. The #include statement only defines *where* the ports are, not how they are set up. I don't know the variety of C that David is using, but look for a function with "tris" somewhere in the name, since this is the instruction used on the 12bit PIC's to set the I/O characteristics of a port. Alternately, if your flavour of C allows #ASM statements, set the port up directly with PIC assembler. CIAO - Martin. P.S. - the #use pragma in the header *should* correctly set up the timer. ______________________________ Reply Separator _________________________________ ---------------------- Information from the mail header ----------------------- Sender: pic microcontroller discussion list Poster: Matt Bonner Organization: Sunada Technology Corp. Subject: Re: Newbie Question ------------------------------------------------------------------------------- David VanHorn wrote: > > I don't do C, but shouldn't you have some sort of chip setup code that > defines those pins as outputs, and maybe sets up a timer or something?? > > The frequency of the crystal also enters into it, else how to know when N > seconds have passed? All the chip knows is xtal clocks, which don't have a > finite relationship to realtime. David, The 2 issues you raise are likely being handled by the following lines in Joshua's code: #include <16c715.h> #use delay(clock=20000000) Joshua, I don't know the PCM compiler, but your code looks OK (if my comments above to David are correct). Can you describe your hardware? --Matt