An external microcontroller clock without IC's

Thread Starter

mike_canada

Joined Feb 21, 2020
239
I'm trying to come up with a simple circuit from parts I have on hand to make a medium speed oscillator that I can feed into an XTAL pin of a microcontroller (part AT89S8253 to be exact).

Circuit A works as a basic oscillator but I'm not sure if I can get the speed high enough or if I could get the waveform valid enough for the microcontroller to be happy.

I'm not sure how to make Circuit B or C work but when I normally connect a crystal to the micro I have each end of the crystal grounded using 33pF caps then each end of the crystal connects to XTAL1 and XTAL2 but because I played with the fuse settings of AT89S8253 and contacted support, they told me I need an external clock to drive the micro to fix it.

So would circuit B or C work better? and which values are recommended for the resistors and is there a way to make the output more square? I need to avoid IC's as I have limited board space. But I can add diodes if necessary.

ci.png
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
I only use Picmicro, and the Xtal input is simple, don't these have a similar method of just the Xtal and a couple of 15pf caps?
 

Thread Starter

mike_canada

Joined Feb 21, 2020
239
I'm going to try dl324's circuit. It's that I'm not opposed to IC's. It's just I only have a limited set of parts on hand and I want to avoid waiting for parts in the mail if I can come up with something today.
 

Thread Starter

mike_canada

Joined Feb 21, 2020
239
also, would that circuit dl324 mentioned be compatible with micros? because I think a micro will expect a square-ish wave and if the wave is too sine then the micro might act funny
 

MrSalts

Joined Apr 2, 2020
2,767
also, would that circuit dl324 mentioned be compatible with micros? because I think a micro will expect a square-ish wave and if the wave is too sine then the micro might act funny
Yes, collpits oscillators can output higher than input voltages in perfect resonances.
If you have a crystal on hand, read the datasheet. Note one schematic for high frequency and one for low (page 33 of your device's datasheet).

9D4F5773-E09E-4FFC-8ED9-B71791C6AC19.jpeg
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
I'm curious, I checked the sheet and all it requires is the same as I mentioned, one XTAL and two caps?
Am I missing something?
 

Ya’akov

Joined Jan 27, 2019
9,165
I'm curious, I checked the sheet and all it requires is the same as I mentioned, one XTAL and two caps?
Am I missing something?
He messed around with the fuses and set it to external clock so in order to get back to using the xtal with the internal clock he has to clock it externally using only the XTAL pin, and leaving XTAL1 NC. Then he can fix the fuses and use the internal clock with a xtal across XTAL and XTAL1, as usual.
 

DickCappels

Joined Aug 21, 2008
10,180
(Some text removed for clarity.)

I'm not sure how to make Circuit B or C work but when I normally connect a crystal to the micro I have each end of the crystal grounded using 33pF caps then each end of the crystal connects to XTAL1 and XTAL2 but because I played with the fuse settings of AT89S8253 and contacted support, they told me I need an external clock to drive the micro to fix it.
It sounds like you need a "rescue clock" so you can reprogram the fuses. The best of your three circuits for this purpose is circuit "A". Your clock needs to have close to a 50% duty cycle and be able to swing from ground to the positive power supply, and circuit "A" can do that.
 

MrChips

Joined Oct 2, 2009
30,810
For whatever reason the TS has banned ICs from the solution space so it's transistor's, diodes, resistors, and capacitors—and a crystal if you'd like.
I think TS is attempting to reset the fuses on their MCU.
A cmos 555-timer IC such as LMC555 or TLC555 should be mandatory stock in every electronics hobbyist's toolbox,
 

Ya’akov

Joined Jan 27, 2019
9,165
I think TS is attempting to reset the fuses on their MCU.
A cmos 555-timer IC such as LMC555 or TLC555 should be mandatory stock in every electronics hobbyist's toolbox,
Yes, that's what he's doing but he also said "no ICs" because he doesn't want to order anything and he does have room on the board. Apparently he doesn't have any 555s, which is a bit surprising but that's how it is.
 

Thread Starter

mike_canada

Joined Feb 21, 2020
239
You know, I ended up trying the IC route with no luck just because I'm lucky to have the part on hand. I used a TLC555 wired in astable mode with 220 ohm resistor between pins 6 and 7 and 470 ohm between pins 7 and 8 then a 220pF cap between pins 1 and 2 as described in the datasheet for maximum frequency of 2.1Mhzwith Q connected to XTAL1 and nothing connected to XTAL2 and still I get no luck.

I'm going to look into other microcontrollers in the meantime unless I get another answer.
 

Ya’akov

Joined Jan 27, 2019
9,165
You know, I ended up trying the IC route with no luck just because I'm lucky to have the part on hand. I used a TLC555 wired in astable mode with 220 ohm resistor between pins 6 and 7 and 470 ohm between pins 7 and 8 then a 220pF cap between pins 1 and 2 as described in the datasheet for maximum frequency of 2.1Mhzwith Q connected to XTAL1 and nothing connected to XTAL2 and still I get no luck.

I'm going to look into other microcontrollers in the meantime unless I get another answer.
Do you have any other MCUs on hand?
 

GetDeviceInfo

Joined Jun 7, 2009
2,196
If you look at the parallel programming connections for fuse setting, you can rewire that 555 for a mono at 1 us, make the connections and pulse the data.
 

k1ng 1337

Joined Sep 11, 2020
960
You know, I ended up trying the IC route with no luck just because I'm lucky to have the part on hand. I used a TLC555 wired in astable mode with 220 ohm resistor between pins 6 and 7 and 470 ohm between pins 7 and 8 then a 220pF cap between pins 1 and 2 as described in the datasheet for maximum frequency of 2.1Mhzwith Q connected to XTAL1 and nothing connected to XTAL2 and still I get no luck.

I'm going to look into other microcontrollers in the meantime unless I get another answer.
As a hobbyist I've attempted what you are doing and the rabbit hole is pretty deep when it comes to clock signals. I would recommend a pierce oscillator as the analysis is relatively simple and well documented for beginners. I opted to spend my money on microcontrollers from Arduino and Pi instead of building my own logic circuits because they have already done most the hard stuff and I can focus on building projects that do work in an efficient manner with all the modern logic capabilities at my disposal. I ended up learning many of the lesser details of communications while working with microcontrollers anyway (device to device data transfer etc.). I definitely have plans for more basic logic circuits, but only for when I have a deeper understanding otherwise I feel like I'm reinventing a terribly shaped wheel.
 
Top