Page 1 of 1

W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Fri Dec 30, 2022 6:45 pm
by jockm
Forgive me if I am being obtuse but can one use an oscillator with the W65C134S/W65C265S instead of the specified crystal resonator circuit?

Most datasheets I have read call out if that is a possibility, sometimes requiring different configuration if one is being used. The WDC datasheet is silent on the matter. I don't have the parts on hand or I would just try it,

I have two reasons for wanting to do this:
  1. I am building a very small board and would like to minimize surface area if i can
  2. I would like to use a more precise timing source
Any insight on this would be greatly appreciated

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Fri Dec 30, 2022 7:48 pm
by GARTHWILSON
Bare crystals, with crystal accuracy, are available much smaller than complete crystal oscillators are, like a chip capacitor, just a little longer; so I think you can go with what's called out and still meet your goals better than a complete oscillator will.  The resonators that are not as accurate are ceramic resonators, not crystal resonators.  If you still want to use a complete oscillator though, I don't have any doubt that you can feed its output into the microcontroller's crystal input.

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Fri Dec 30, 2022 7:55 pm
by jockm
GARTHWILSON wrote:
Bare crystals, with crystal accuracy, are available much smaller than complete crystal oscillators are, like a chip capacitor, just a little longer; so I think you can go with what's called out and still meet your goals better than a complete oscillator will.  The resonators that are not as accurate are ceramic resonators, not crystal resonators.  If you still want to use a complete oscillator though, I don't have any doubt that you can feed its output into the microcontroller's crystal input.
I appreciate what you are saying, but WDC's involves two caps, two resistors, and in the case of the 32.768K's a variable cap (though they don't use one on their own board). I can and do hand solder 0402's, but am standardizing on 0604's on this project. So a single 3.2mmx2.5mm (Or smaller) oscillators reduces layout complexity in tight spaces, and very often saves space in my experience

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Fri Dec 30, 2022 10:39 pm
by Dr Jefyll
jockm wrote:
So a single 3.2mmx2.5mm (Or smaller) oscillators reduces layout complexity in tight spaces, and very often saves space in my experience
It's amazing how small oscillators have gotten! :shock: Although I haven't made an actual comparison, I'm ready to believe an oscillator can be as small or smaller than a crystal plus the caps and resistor(s).

As Garth says, it should be entirely possible to feed an oscillator's output into the microcontroller's crystal input. But admittedly WDC's doc may fail to make it clear which of the two crystal pins is the input.

jockm wrote:
and in the case of the 32.768K's a variable cap (though they don't use one on their own board)
The variable cap is unneeded unless one is concerned about trimming to obtain exactly the right frequency. That (trimming) is one advantage, I suppose, of using a crystal resonator instead of a complete oscillator. And since the 32.768 kHz is typically what runs the time-of-day function, some people will want to be able to trim the value so the TOD clock is as accurate as possible.

-- Jeff

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Fri Dec 30, 2022 11:36 pm
by jockm
A 3.2mm x 2.5mm oscillator has a surface area of 8 sq mm. A 2.5mm x 2mm oscillator has a surface area of 5 sq mm.

Four 0604 passives and a 1.2mm x 1 mm crystal (assuming I wanted to use one that small and it met my specs) are 6.22 sq mm before you get to inter component spacing. So using an oscillator is either smaller than or about the same size as the partial Pierce Oscillator that WDC specifies (they provide the NOT gate ;) )

But let’s ignore my reasons for wanting to us a single output oscillator because I have a huge supply of them handy. I would just like to know if anyone actually knows the answer

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Sat Dec 31, 2022 12:24 am
by Dr Jefyll
For the '134, at least, the datasheet does contain the answer, although it's not as blatantly overt as one might wish.
'134 oscillator pins.png
Table 1-6 suggests that the CLK and FCLK functions aren't subject to any control bits.

And Section 2.4 clearly says that CLK and FCLK are inputs, whereas CLKOB and FCLKOB are outputs. Obviously we won't be trying to drive a signal into these latter two! :wink: And...
  • "CLKOB, FCLKOB outputs are the inverted CLK and FCLK inputs that are used for oscillator circuits that employ crystals or a resistor-capacitor time base."
I feel safe in appending, "CLKOB, FCLKOB outputs will be left unconnected when external sources (eg: oscillators) provide the input to CLK and FCLK (ie, instead of crystals or a resistor-capacitor time bases).

As for the '265, I haven't the courage to dive into that datasheet now :roll: , but I expect some sleuthing will reveal similar results. And if you're really stuck you can contact WDC and ask.

-- Jeff

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Sat Dec 31, 2022 12:49 am
by jockm
Dr Jefyll wrote:
For the '134, at least, the datasheet does contain the answer, although it's not as blatantly overt as one might wish.
'134 oscillator pins.png
Table 1-6 suggests that the CLK and FCLK functions aren't subject to any control bits.

And Section 2.4 clearly says that CLK and FCLK are inputs, whereas CLKOB and FCLKOB are outputs. Obviously we won't be trying to drive a signal into these latter two! :wink: And...
  • "CLKOB, FCLKOB outputs are the inverted CLK and FCLK inputs that are used for oscillator circuits that employ crystals or a resistor-capacitor time base."
I feel safe in appending, "CLKOB, FCLKOB outputs will be left unconnected when external sources (eg: oscillators) provide the input to CLK and FCLK (ie, instead of crystals or a resistor-capacitor time bases).

As for the '265, I haven't the courage to dive into that datasheet now :roll: , but I expect some sleuthing will reveal similar results. And if you're really stuck you can contact WDC and ask.

-- Jeff
I missed that! Thank you so very much, and I don't blame you lol

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Sat Dec 31, 2022 3:12 am
by GARTHWILSON
Kudos to you if you're hand-soldering such small stuff!  And if you're trying to get things that dense, I hope you're putting parts on both sides. :lol:  (BTW, the next standard size up from 0402 chip capacitors and resistors is 0603, not 0604.)  I have something I need to assemble now with SOT-23-5 and SOT-23-6 packages, the biggest the 74LVC1G__ gates are available in.  I keep putting it off because I know it won't be any walk in the park, especially with very little room between parts.  I did design something with your size of oscillators for a customer several years ago, and in fact had a 5-ball BGA balun that was about the size of an 0402 resistor or capacitor; but it was definitely not for hand-soldering.

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Sat Dec 31, 2022 5:50 am
by Dr Jefyll
GARTHWILSON wrote:
SOT-23-6 packages, the biggest the 74LVC1G__ gates are available in.
I've found those SOT-23-6 packages pretty manageable for hand soldering, despite their small size. It helps a lot that 4 of the 6 pins are on a corner, where the iron can approach on a diagonal.

-- Jeff
ps for anyone who hasn't seen this post already: Tiny, superfast gates rival programmable logic

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Sat Dec 31, 2022 3:43 pm
by jockm
GARTHWILSON wrote:
(BTW, the next standard size up from 0402 chip capacitors and resistors is 0603, not 0604.)
Welcome to the dumb mistake I make nearly ever week lol.

It is a dual sided load, but I have to be careful where I place components as the battery will be on the back. I am making a project that is about the size of a pocket watch. I am using a 128Kx8 F-RAM to take the place of both RAM and ROM. This is why I am using the 134s, since it will boot up into the monitor, I can download a program into lower memory that then downloads the latest firmware into upper and then reboot into its normal mode of operation.

I have wanted to make a very small 6502 based system for some time, and decided 2023 is (probably) the year it will happen.

With the small SOT and other packages, I find the trick is to put a blob of solder on one pad, keep the heat on that pad, then slide the component into place. Then it should be fairly easy to solder the other pins then reflow the first pin. A nice pair of angled tweezers and good microscope don't hurt either. When I work with 0402's I take beta blockers (with my doctors consent) which help control tremors and heart rate.

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Sat Dec 31, 2022 6:23 pm
by GARTHWILSON
Something they used to do for automatic assembly of boards with parts on both sides is to put a tiny spot of epoxy under each part that goes on the bottom, so it wouldn't fall off in the soldering process.  If you've tried that for hand-soldering, I'd be interested in how it went.  An assembly house we use for prototypes at work told me that what they do now is do one side first with a higher-temperature solder, then turn the board over and stuff the other side with a lower-temperature solder so when the board goes back for soldering again, the first side, which will now be on the bottom, doesn't quite melt, so parts stay on.

Fortunately my close-up vision is excellent; but it wouldn't hurt to avoid the caffeine when I'm about to solder these things.

In any case, it'll be fun to see your result.

Happy New Year!

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Sat Dec 31, 2022 10:50 pm
by jockm
GARTHWILSON wrote:
Something they used to do for automatic assembly of boards with parts on both sides is to put a tiny spot of epoxy under each part that goes on the bottom, so it wouldn't fall off in the soldering process.  If you've tried that for hand-soldering, I'd be interested in how it went.  An assembly house we use for prototypes at work told me that what they do now is do one side first with a higher-temperature solder, then turn the board over and stuff the other side with a lower-temperature solder so when the board goes back for soldering again, the first side, which will now be on the bottom, doesn't quite melt, so parts stay on.

Fortunately my close-up vision is excellent; but it wouldn't hurt to avoid the caffeine when I'm about to solder these things.

In any case, it'll be fun to see your result.

Happy New Year!
That's a very good idea, I will have to give it a try.

Now if only the QFP 134s weren't virtual unobtanium. I would prefer not to buy W65C134SXB's and salvage the chips... or settle and use the PLCC I suppose ;)

Happy New Year!

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Tue Jan 03, 2023 8:21 pm
by Alarm Siren
GARTHWILSON wrote:
Something they used to do for automatic assembly of boards with parts on both sides is to put a tiny spot of epoxy under each part that goes on the bottom, so it wouldn't fall off in the soldering process.  If you've tried that for hand-soldering, I'd be interested in how it went.  An assembly house we use for prototypes at work told me that what they do now is do one side first with a higher-temperature solder, then turn the board over and stuff the other side with a lower-temperature solder so when the board goes back for soldering again, the first side, which will now be on the bottom, doesn't quite melt, so parts stay on.

Fortunately my close-up vision is excellent; but it wouldn't hurt to avoid the caffeine when I'm about to solder these things.

In any case, it'll be fun to see your result.

Happy New Year!
Interesting... I might quote this at our manufacturing people when they moan about "not being able to do [something]"...
Our in-house manufacturing for circuit boards, as far as I can tell they do one side and then the other, rely entirely on surface tension of the solder from the 1st side to hold the parts on whilst doing the 2nd. This means we're only allowed heavy parts on one side. Its always seemed like madness to me, other companies manage to put "heavy" parts on both sides and it really does hamstring the design process not being able to do both sides for us given how tight most of our designs are for space. Personally I think they're just being a bit lazy. :roll:

Re: W65C134S/W65C265S using an Oscillator and not a Crystal

Posted: Sat Jan 28, 2023 4:10 pm
by jockm
As an addendum I had a lovely conversation with WDC while trying to debug my board, and they confirmed that yes you can use oscillators for CLK and FCLK. They also mentioned that you won't get any output on FCLKO until after the chip been reset. It's a nice indicator if the CPU is actually working.

In my case it appears that the CPU is working, there is activity on the bus, there is FCLKO, etc but nothing is happening on any of the UART lines. It looks like I have a bad chip, so have some replacements coming in