On Fri, Feb 23, 2007 at 01:16:22PM -0800, picnoob wrote: > > ok, i am doing a new project, u guessed it...a clock. Been there. Done that. Got the tee shirt. > now, i have read some guides about this on the www, but the give > different > info. Is it true that the frequency of the oscillator used is > divided by 4, > and instructions are executed at this new frequency? That's true for PICs. >im using a pic16f84a. What exactly is this clock supposed to do? There's probably better choices than the 16F84 if you want to perform this activity. One reason is that other PICs have multiple timers. In particular 16F PICS with timer 1 can be driven from an external oscillator independant of the PIC oscillator > also, i wanted to know, what is different between 16f and 16c etc....? Marketing. Nothing really worth talking about. I'd advise you take a read on newer PICs if PIC are where you are planning to work. I've argued over the years that the 16F84 limitations makes getting tasks done difficult. Finally just so you won't go away empty handed you can take a look at my code for my sunrise/sunset outdoor light controller, which is basically a calendar/clock that turns outdoor lights on about dusk and off around dawn. Code is here: http://www.finitesite.com/d3jsys/clock.asm It's written for a 16F877 and drives timer 1 with a 32 khZ watch crystal to generate a 2 second counter. Accuracy is a bit problematic. Crystals will vary in oscillation rates based on temperature. I always planned to update the project to use the 60 Hz power line signal, but just never got back to it. Hope this helps, BAJ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist