Maker Pro
Maker Pro

Clocking an 8049 Microcontroller with Ceramic Resonator

mooginnyc

Feb 3, 2010
40
Joined
Feb 3, 2010
Messages
40
Hello,
I'm working with a circuit that uses an old NEC D80C49C 028 microcontroller, and nothing connected to it seems to function. It appears that I'm not seeing any clock signal on either of the XTAL pins, which is why I think it doesn't work. I'm only seeing DC on those pins at about half the supply voltage (5v supply).

On the circuit, pins 2 and 3 (XTAL 1 and 2) tie to each other through a 6MHz ceramic resonator, with two 30pF capacitors in parallel going to ground. I tried replacing the resonator, but I'm still not seeing the clock signal on the scope. Just the ~2VDC on both pins.

My questions.. Does the Microcontroller provide an oscillator that feeds through the resonator/capacitor network and back in? Or does it provide DC that causes the network to oscillate at 6MHz? I haven't yet tried replacing the capacitors.

Would I be able to troubleshoot by sending a clock from a function generator directly to the XTAL pins on the microcontroller? If so, would I send the same square wave to both pins, or a square wave and an inverted?

Thanks!
mooginnyc
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
You can clock it directly through Xtal1 i.e. pin 2.

Is your 'scope set up correctly to view the signal?

Try a different resonator or genuine crystal (any frequency but with due regard to the capacitance required). The 2V 'DC' signal seems to indicate resonance is happening.....
 

mooginnyc

Feb 3, 2010
40
Joined
Feb 3, 2010
Messages
40
Thanks for the reply!
My scope isn't fast enough to see much info, but I can usually see a "green hazy bar" on other clock points. Another controller on the same board runs at 4MHz, and I can see that haze. Basically, I'm trying to see if this MCU is dead, or just the clock source.
So I should be able to remove the resonator, and just inject a clock signal from my function generator to Pin 2 XTAL 1?
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Yes. Common ground of course.

If your scope only shows a 4Mhz signal as a fuzz you have no chance of seeing the signal at 6Mhz.. you could make a simple diode probe and measure the DC to prove an alternating signal. Two fast diodes and a capacitor is all that's needed.
 

mooginnyc

Feb 3, 2010
40
Joined
Feb 3, 2010
Messages
40
An update: I see the same 2VDC on the XTAL pins with the resonator removed from pins 1 & 2. I then installed the working 4MHz resonator in its place, and saw no difference. To check the 6MHz resonator, I moved it over to the working cpu, and I saw the green haze on the scope, so I think the resonator is fine. I even replaced the 30p caps, but never saw oscillation.

I'm curious what makes the resonator/cap network oscillate? Does the microcontroller just send DC out to power it? Or does the chip produce the frequency that gets "resonated" and fed back in?

I'm starting to think the microprocessor is bad... I wish I could further troubleshoot since it's kind of a hard to find 35 year old chip!

I really appreciate the help!

-M

PS- I also tried sending a 2MHz signal from my function generator to Pin 2, and it didn't work. Interestingly, I then measured +5VDC on pin 3 when the wave was going to Pin 2.
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Look at the data sheet for the CPU - it shows the xtal pins as being driven by an inverter (crystal connected from input to output).
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
Have you checked the datasheet for the resonator to control the selection of the load capacitor values?
A resonator takes longer time to start oscillating.
I would think that your scope probes will load the XTAL1 & 2 too much to see a valid signal. You need at least to use 10X on the probe to have any hope of seeing a signal.
 

mooginnyc

Feb 3, 2010
40
Joined
Feb 3, 2010
Messages
40
I didn't think about the x10, thanks for the suggestion. I just tried that, and I still don't see anything but DC. There is a bit of noise on the DC, but it's also on the other rails. I think it's negligible though, and just showing up with the high impedance setting on the scope probe.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
I don't know about that microcontroller, but for PICs, for example, you must set configuration bits correctly to choose the clock source. Have you programmed the micro with the correct configuration bits?

Bob
 

mooginnyc

Feb 3, 2010
40
Joined
Feb 3, 2010
Messages
40
I haven't done any reprogramming. Probably nothing has been configured on it since 1982! It's for an old synthesizer, and apparently "something shorted" which caused all these problems.

I went ahead and ordered a new chip that's configured for this synthesizer specifically as a replacement.

Thanks everyone for the helpful replies!

-mooginnyc
 

mooginnyc

Feb 3, 2010
40
Joined
Feb 3, 2010
Messages
40
Look at the data sheet for the CPU - it shows the xtal pins as being driven by an inverter (crystal connected from input to output).

Do you have a link for the CPU data sheet? I couldn't find that much when I searched, other than an alternative that matched pin for pin. I'd be curious to see what you found!
 
Top