Switching between crystal oscillators? - Page 1
Forum section: electronics / beginners

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: December 23, 2013, 09:05:11 pm
content: I'm wanting to switch between an 8, and 10mhz crystal oscillator.Ya know, those 4 pinned metal cans that run off 5volts, with the frequency out on one of the pins...Can I simply leave the "out" pins in parallel, and switch the +5volt between the two devices.Or, should I tie the +5volt to ground on the oscillator that isn't being used?Or will the "out" pins being in parallel cause issues? I don't really want to simply switch the 8/10mhz signal, as it means longish wires.Thanks! I've googled, I can't find much information on this

author: c4757p
author_rank: Super Contributor
timestamp: December 23, 2013, 09:17:55 pm
content: Switch the signals. Don't do it directly, with your clocks running up the wires, but use the signal coming back from the switch to select. Something like this (you could accomplish with (probably) two transistors, but IMO the 7400-based solution is quite clean)Note that the clocks will be mixed while the switch is in transit if it's a break-before-make. You could use a SPST to return just one binary value, then use the fourth unit in the 7400 to invert it, and send one to each of the select inputs, rather than the SPDT, if that is a problem. A make-before-break will silence the clocks while in transit.

author: tszaboo
author_rank: Super Contributor
timestamp: December 26, 2013, 05:16:08 pm
content: Quote from: AmmoJammo on December 23, 2013, 09:05:11 pmOscillators are so damn expensive, you are probably better if you use one crystal, and a microcontroller with PLL and clock out pin...But seriously, I've just checked Farnell, and an LPC1111 and a 8 mhz crystal is cheaper like 40% than the two oscillator...

author: Zero999
author_rank: Super Contributor
timestamp: December 26, 2013, 06:49:10 pm
content: You're right, those oscillator modules are expensive.If you go for the logic gate option, you might as well buy two crystals and make your own oscillators which you can switch between.

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: December 27, 2013, 09:58:09 pm
content: I was wanting to switch crystals in a Sega Mega Drive, to switch between an 8Mhz oscillator, and 10Mhz.The original clock speed is 7.61 MHz in PAL consoles, 7.67 MHz in NTSC (apparently)The idea was to have 8mhz for "stock" speed, and 10mhz for overclocked.I have however simply soldered the 10Mhz oscillator in, to see how it goes, if I find any games are unreliable at the higher speed, I'll look into adding a switch

author: Rory
author_rank: Frequent Contributor
timestamp: December 28, 2013, 12:56:32 am
content: Quote from: AmmoJammo on December 27, 2013, 09:58:09 pmWhat kind of monitor are you using? Will it handle the different video clocking rate if you change the clock?

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: December 28, 2013, 01:52:08 am
content: Quote from: Rory on December 28, 2013, 12:56:32 amOnly the CPU clock is being changed.Well, the video clock has already been modified to handle the NTSC/PAL switch (from memory)

author: tszaboo
author_rank: Super Contributor
timestamp: December 29, 2013, 01:03:37 am
content: Quote from: AmmoJammo on December 27, 2013, 09:58:09 pm0So you just want to make insanely hard by changing the speed of every event to ~130%? Or arent the games based on the CPU clock? Am i missing something?

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: December 29, 2013, 11:40:29 pm
content: Quote from: NANDBlog on December 29, 2013, 01:03:37 amIt doesn't speed up the games noticeably, but the stock speed is known to struggle with some games... From what I've read, 10Mhz helps with these games, without causing any issues I do believe...

author: true
author_rank: Frequent Contributor
timestamp: December 31, 2013, 12:59:14 am
content: Quote from: NANDBlog on December 29, 2013, 01:03:37 amIf you overclock CPU in a Genesis, it's just the CPU. Some games are tied to the cycle speed, but many are instead tied to NMI from vblank and having a faster clock can actually reduce lag (slow stuttering).I second the opinion of using an MCU. Maybe an LPC810? (modder friendly DIP8, RC osc is maybe good enough, has osc out. $1.20 in 1qty.)

author: gxti
author_rank: Frequent Contributor
timestamp: December 31, 2013, 03:18:20 am
content: No sense building a multiplexer from logic gates when you could just buy a multiplexer. I have used a 74LVC1G157 in a 3.3v application without issue.Something else to look for, is that many oscillators have an 'enable' input that disconnects the output pin. That would let you connect their outputs together like you originally suggested, but make sure it actually tri-states the output. The functionality varies from part to part.

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: January 07, 2014, 04:57:08 am
content: I've ordered a couple of thesehttp://cds.linear.com/docs/en/datasheet/1799fc.pdfI found someone else who seems to have used one to overclock a Mega Drive/Genesis, although it seems he really had no idea what he was doing, as instead of switching resistors to select the stock 7.6mhz/overclocked 10mhz, he still switched the oscillator frequency, via the switch, using the onboard 7.6mhz clock...

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: January 29, 2014, 04:25:45 am
content: Quote from: AmmoJammo on January 07, 2014, 04:57:08 amAlrighty, so these parts arrived yesterday.I set about wiring one up on the bench to make sure I was doing it rightMy multimeter doesn't read the frequency correctly when its in the higher range, so, 10mhz showed up as 9mhz, however, when I set the divider to 1/10, it showed up as 0.98mhz or something...Anyway!I installed it, keeping wires as short as possible, (the output pin is soldered directly to the CPU)And it works, however, one games refuses to work at the "stock" 7.6mhz, and the 10mhz.I used a 13.2k resistor (22k and 33k in parallel) with I believe works out to be a tad under 7.6Mhz. The 10Mhz resistor is a 10k.Now, its possible its still being slightly overclocked... or, is it possible the game doesn't like being underclocked?It should be noted, that its a non genuine version of the game, and the error it comes up with appears to be memory related... at 10Mhz it instantly comes up with an error.Sorry, this is the best pic I could get of the 1799 frequency generator... (before I connected the switch wires)How the wiring runs across the board, with the male header so the switches can be unplugged.And the switches mounted in the side of the case.

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: January 29, 2014, 11:10:59 am
content: Alright, I've found a few games now that don't work with the LTC1799...So, I think I'm going to have to go back to the original plan.... probably a 10Mhz oscillator, and something to switch between that, and the original onboard clock frequency...So, what's the deal with the 74LVC1G157?

author: brabus
author_rank: Frequent Contributor
timestamp: January 29, 2014, 12:18:17 pm
content: Congratulations for the very neat wiring! At the beginning, I was unsure if it was original from the factory, or if it was your mod.I hope you manage to successfully finish your mod.

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: January 29, 2014, 12:29:28 pm
content: Quote from: brabus on January 29, 2014, 12:18:17 pmThanks, I assume you realised it wasn't factory when you traced it back to the cpuThe three wires running to the front of the board in the second pic, are for the power led, so it changed from the standard red, to blue, when the console is set to 10Mhz.

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: February 01, 2014, 05:01:16 am
content: Quote from: c4757p on December 23, 2013, 09:17:55 pmThanks! that's exactly what I ended up doing.In fact, I used a 25+ year old 7400 :p Because it was there!I built it on the bench first, and tried switching between a 16Mhz, and 10Mhz crystal oscillators, just to make sure it had the bandwidth needed.seems to switch between the on board 7.6mhz, and the 10mhz oscillator... maybe I should test that it actually works to play games