Created Thu, 03 May 2012 07:36:14 +0000 by dancc
Thu, 03 May 2012 07:36:14 +0000
Hello,
I am using two chipkit Max32 boards, which both control DACs to produce sine wave outputs. Each one works nicely, but I want to get them running at exactly the same frequency so that there is always the same phase between all the analog outputs.
I guess the best way to do this is to use one chipkit as a "master", which outputs its 80 MHz clock signal to be used as an external clock input by the "slave" chipkit(s).
Does anybody have any experience of setting up external clock signals like this? I have seen one or two arduino posts, but nothing on the chipkit. I guess it's a case of setting some fuses somehow, and finding the right pins to use.
Many thanks to anyone who reads this, Dan
Tue, 22 May 2012 14:49:01 +0000
For anyone who is interested, I got this working reasonably well.
On the "slave" chipkit I removed the small zero-ohm resistor, R32. I then connected OSC1 of the slave to OSC2 of the master (which should be giving out an 8 MHz signal).
OSC1 (on the slave): Soldering a thin wire on to the bottom right pin of the crystal oscillator (close to C23 and C17) seemed like the easiest place to make a connection.
OSC2 (on the master): Solder a thin wire to the top left pin of the crystal X1.
The clock of the slave is now synced to the clock of the master. There is a constant 125ns (1/8MHz) phase difference between the two chipkits, which does not cause any problems in my application. I'm sure this could be fixed easily enough if it was a problem.
Keep your wires and ground paths short, and have fun.
Mon, 28 May 2012 12:54:57 +0000
Good that you posted the solution here. It really helped me.