On Dec 31, 2008, at 4:57 PM, Forrest Christian wrote: > > You might want to pick up an EasyPIC5 board from mikro-e, or their us > distributor circuit-ed. Plus, start with the free Mikro-Basic or > Mikro-C compiler, both can be upgraded to the full version if needed > later. I might be inclined to point you toward BASIC, although if you > can get your head around C, that would work as well or better. I have been looking at Mikroelektronika's products for some time. I have their free C compiler, and have wondered about the development boards. (Interestingly, you can order the EasyPic5 directly from the Mikroe website for about $20 cheaper than from Circuit-Ed.) The EasyPic5 looks like a good value. However, since I have a pretty extensive junkbox, I wonder if a product like this would enhance my learning. I already have the majority of any needed components that I can assemble on a solderless breadboard for experimenting and learning. I'll admit to liking 'toys' though, and having everything on one board might be convenient. Of course, like everyone else, I'm a bit more conservative in spending money nowadays. > > Most "line powered" clocks are actually timed from the 60 hz line. I've always liked this option. I have found line-based clocks to be as accurate if not more so than most crystal controlled clocks. My understanding is the 60Hz line in the US / Canada is spot on, and I imagine the 50Hz throughout Europe is likely just as stable. Some other countries, however, apparently do not have as reliable a power source, and xtal control is a better option. > If I was implementing a clock, I would take a ~6VAC transformer, > run the > unfiltered AC through a resistor, and then a couple of clamp diodes > (aka > reverse biased diode to VCC and to GND), and then into the T1CKI pin. > In this way, each cycle of the AC line can increment the 16 bit > timer 2, > and then it keeps track of how many 60hz "ticks" (might be 120Hz > depending on how you wire it up) since the timer was reset. It looks > like the t1cki pin is schmitt triggered on the 'f887 datasheet I'm > looking at, so this should be safe to do. Once you have a counter > counting cycles, then you can go from there. Timer 1 may also be > interesting. I'd look strongly at the Microchip Clock app note > someone > else mentioned. I did not know how to do this previously! I've always seen external xtal control. I never thought that the line frequency itself might be buffered and used as an external oscillator. > Mikro-E actually has an addon board which has a > Philips PCF8583, which is ready to go.. Other RTC chips might be > better suited to your app, but this would get you going. > You are certainly a good spokesman for Mikro! :-) I'l give some serious thought to purchasing the EasyPic5 board. Thanks! Joe -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist