Is there a way to sinc two mcu colcks with internal oscillator or the external crystal (not crystal oscillator!).
PS: I'm not lucky with crystal oscillators. there is never one when you need it.
Is there a way to sinc two mcu colcks with internal oscillator or the external crystal (not crystal oscillator!).
PS: I'm not lucky with crystal oscillators. there is never one when you need it.
That's "sync" - short for "synchronise" - I presume?
But what, exactly, do you mean by "sync two mcu colcks" ?
Normally, syncing the clocks is not the thing to do - it is more common to sync events: https://www.avrfreaks.net/forum/s...
I mean sync the clock. When I try to communicate between two mcus I get 14% output frequency drop, because their clocks are slightly shifted, so I need to make them run from same clock pulse, but I can't figure out how to do that with internal oscillator, or external cristal. I have my event sync handled already with master-slave priority.
I'll answer your question with a question and maybe one of the pros on here can prove or disprove.
If you set the CKOUT fuse on one of the processors and use it as clock for the other would this work. Just curious!
YOu can use a crystal on one MCU and drive the other from the X2 pin(IIRC) to the X1 pin. Or a better choice would be to use a TCXO - it looks like a little metal can with DIP legs and feed it's output to both X1 pins of the MCU's. Make sure you set the fuse bits properly in all cases
Oh. I'm dumb. I'm literary dumb. I forgot there was a clout pin on the bloody thing. Thanks a lot for helping me
I might try this as well. Thank you
Is there a way to sinc two mcu colcks with internal oscillator or the external crystal (not crystal oscillator!).
While the above answers are all correct, it still begs the question: Why synch the two uC's?
If you run the two micros, each with their own external crystal, they will communicate just fine without "synching" them to each other.
The two crystals must be the same frequency.
The two micros must have their "fuses" set to run them on the external crystals.
Technically, one could have uC #2 measure the frequency of uC #! and and adjust its clock to match, but that isn't trivial.
Using two crystals, one per uC, is both trivial, and inexpensive.
JC
Why? Well I'm working on 8bit logic analyzer, and by using two MCUs so I can control data faster. One does the dirty job with addressing ram while other takes responsibility for retrieving and sending data. All together makes an logic analyzer with both compression and normal memory, with 8Mps and 16M memory. And if you still asking why, well I do it because I can. Because this is still the easiest way to learn about all problems associated with it (addressing memory, retrieving data, latching on certain byte of data, etc.) BTW both mcus are attiny2313 and the record circuit works with its own 40mhz circuit
I had thought about making a LA a while back and the problems wasn't so much capturing data but how to display it. It turned out better in the long run, for me at least to buy the Saleae LA then to spend
the time and energy to create one. BTW I've been a programmer for many years.