William Ruehl wrote: > > PICsters, > What is the best way to have two 16F84's on the same board share > the same crystal? Can the chips share the crystal in parallel? or is > there > a more elegant approach? > > Bill Ruehl One question: Why not just use 2 crystals or 2 ceramic resonators? 2 easy possibilities; a) Put the F84's fairly close to each other, connect crystal across # 1 F84 with caps as per normal, connect the Osc2/ClkOut pin of that one to the Osc1/ClkIn pin of #2 (treating it like an external oscillator.) Want the Osc. trace from Pic #1 to #2 short, here. And stray capacitance from that lead may slightly affect the frequency of oscillation of the Xtal. So if you buffer this output through a gate, that improves things (perhaps a spare inverter?) If careful, you can skip the gate. YMMV. b) BETTER: Set up a standard inverter-style oscillator & use that to drive both PICs, through a second inverter, into Osc1/ClkIn. See the data sheets for how to make such an oscillator Also could just use a clock oscillator module & drive both F84's off that. A caveat: You aren't guaranteed that the 2 PICs are running on the same clock phase, they should stay at a constant skew, though. So don't assume this! (i.e. When Pic #1 is in the Q1 state, Pic # 2 may be in any of the Q1, Q2, Q3 or Q4 states, for all we know. So if you want to pass data back & forth quickly, you cannot do it on a 2-instruction loop etc. ) Anyone on list know of any way to Q-state synchronize a pair of F84's, please let ME know! Though I suppose you could do it with starting with a slow clock, watching for a rising edge on one output, and holding the first PIC to raise that edge in "hold" (i.e. no clock state change) until the other PIC's output goes high, then speeding up both PIC clock rates (use a programmable clock divider system, for all this.) Fancy hard way to do an un-necessary thing, methinks Mark