I found the DS1077, a "dual-output, programmable, fixed-frequency oscillator". I was wondering if it would be possible to let this chip provide the clock signal for the PIC(18F46K22) that operates the chip over I2C. So, what I'd like to do is this:


simulate this circuit – Schematic created using CircuitLab

The advantage of this would be that I would be able to change the frequency (i.e. the MIPS) on the fly. What I'm going to do with that, I don't know yet.

The thing is, I'm not sure if the output signal of the DS1077 will be compatible with the PIC and what kind of circuit I'd need for this. Until now, I only used crystals and the internal oscillator.

Also, I don't know if there will be a problem with the I2C communication when I change the frequency of the PIC on the fly?

  • 1
    \$\begingroup\$ One thing to watch out for: how do you start after a power up? Either the DS must output a clock signal right from the start, or you must start on another (18F internal?) oscillator and then switch over (can your 18F do this?) \$\endgroup\$ – Wouter van Ooijen Apr 12 '13 at 18:49
  • \$\begingroup\$ @WoutervanOoijen not sure, but the DS1077 has a non-volatile frequency memory, so I hope it will start as soon as you power it on, but I can't find this in the datasheet. If not, the 18F46K22 can switch clocks (it's on page 41 of the datasheet), and starting up with the internal oscillator is a good idea indeed! \$\endgroup\$ – user17592 Apr 12 '13 at 18:55
  • \$\begingroup\$ I2C specification is down to DC, but not all chips follow that part of the spec. \$\endgroup\$ – jippie Apr 12 '13 at 20:40

This device appears to output a simple 5V square wave, so configuring the PIC in EC mode (external clock) should 'just work'. The clock is applied to OSC1/CLKIN, leaving OSC2 free to use as a GPIO line.

Bear in mind also that this PIC device has an internal PLL, so you should have some flexibility in changing the frequency even without the external clock module.

The MSSP baud rate is generated from the oscillator frequency, so the BRG value will need to change whenever \$ F_{OSC} \$ changes.

  • \$\begingroup\$ And I can just connect the output of the DS1077 to the CLKIN of the PIC? No external components needed? \$\endgroup\$ – user17592 Apr 12 '13 at 16:12
  • 1
    \$\begingroup\$ Yes, I believe so. \$\endgroup\$ – Adam Lawrence Apr 12 '13 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy