testing MC146818 - Page 1
Forum section: electronics / general

author: Wawavoun
author_rank: Regular Contributor
timestamp: December 03, 2021, 08:45:53 pm
content: Hello there,I have a MC146818 RTC which did not work !With a HC49-S 32.768 KHz crystal I have no oscillations on pin 3 and on pin 21 (should be 31.768/4 if pin 22 FS is grounded).My purpose is to find if the problem come from the chip or from the quartzI have other and different crystals (cylindrical 3x8) and want to test everything on a breadboard to be more sure from where the problem come...What is the minimal connections to do to get the MC146818 alive with clock output to pin 21 ? VSS, VCC, FS, CE, crystal circuit to pin 2-3 are sufficient ?Regards.Philippe

author: srb1954
author_rank: Super Contributor
timestamp: December 04, 2021, 07:15:51 am
content: Quote from: Wawavoun on December 03, 2021, 08:45:53 pmChecking the operation in a breadboard may not be all that successful as the the stray capacitances inherent in breadboards may upset the sensitive oscillator circuitry. Generally is is advisable that all other tracks be kept well away from the crystal and its associated components. In any case strictly follow the recommended circuit configuration in the data sheet and ensure that the crystal load capacitances are as specified by the crystal manufacturer.The CE, CKFS and RESET pins should be tied high and other input pins AS, DS, R/W, PS and AD0-7 should be tied low for basic oscillator operation producing a 32768Hz signal on CKOUT. The SQW output will not be activated until the chip registers have been suitably programmed.

author: Benta
author_rank: Super Contributor
timestamp: December 04, 2021, 04:57:01 pm
content: First time I've heard about a 32.768 kHz crystal in HC49.Are you sure it's not 32.768MHz?

author: Wawavoun
author_rank: Regular Contributor
timestamp: December 04, 2021, 05:39:49 pm
content: Hi,I have also think to that... I will test the quartz with a simple double 74ls04 gate and see...

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 04, 2021, 05:41:48 pm
content: Quote from: Benta on December 04, 2021, 04:57:01 pmI second that. I find this fishy. And if it's indeed a 32.768 MHz crystal, that would explain why the MC146818 doesn't oscillate at all.

author: Benta
author_rank: Super Contributor
timestamp: December 04, 2021, 06:45:04 pm
content: To add to the above:I've worked several times with the 146818 using the small tubular 32.768 kHz crystals, and it always worked reliably.What you need to watch is load capacitance (some crystals need 7.5 pF, others 12 pF), but that's only an issue concerning accuracy, not about oscillator operation.

author: Wawavoun
author_rank: Regular Contributor
timestamp: December 04, 2021, 08:22:52 pm
content: I made a test (function generator - quartz - oscilloscope connected in serial).The small tubular quartz show a strong resonance at 32,768 KHz. The HC49-S marked 32.768 show... nothing at this frequency.So I change the quartz for this one on my assembly but again no clock signal to pin 21 (CKOUT) and the 146818 seems not store correct value in his ram...Looking at the block diagram CKOUT is only subjected to CKFS state (gnd in my case) pin so whatever is on the bus etc... this clock should be there.I think now I have to buy and test another 146818.Regards.Philippe

author: Benta
author_rank: Super Contributor
timestamp: December 04, 2021, 08:43:13 pm
content: Erm... I hope you realise that the oscillator needs external feedback and power limiting resistors?Like shown on p.9:https://www.nxp.com/docs/en/data-sheet/MC146818.pdfDrive power for tubular 32 kHz crystals must be <1 uW (yes, that's microwatt).

author: Wawavoun
author_rank: Regular Contributor
timestamp: December 04, 2021, 09:09:58 pm
content: This is the oscillator assembly :

author: Benta
author_rank: Super Contributor
timestamp: December 04, 2021, 09:24:30 pm
content: Why don't you just use the values from the data sheet? I do not see your circuit as "better" in any way. And your resistor values are too low. And the feedback resistor is in the wrong place.What's so difficult about reading a data sheet?

author: floobydust
author_rank: Super Contributor
timestamp: December 04, 2021, 09:56:14 pm
content: That circuit and values are from the Hitachi HD146818 datasheet, and the circuit looks strange. Output OSC2 with a capacitor CL to GND is for another pole or somethingThere is also a MC146818Abut I don't know the difference. This RTC chip never performed well in IBM PC-AT, poor accuracy as I recall.

author: Benta
author_rank: Super Contributor
timestamp: December 04, 2021, 10:10:09 pm
content: What Hitachi did there is a mystery to me.I only ever worked with the original Motorola parts.But it sure looks strange...

author: Wawavoun
author_rank: Regular Contributor
timestamp: December 12, 2021, 07:31:53 pm
content: Hi there !Finally I got a new HD146618 and a new MC146818.Both works well directly at the same place so the crystal circuit etc... is good.Read and write in memory is also okay.I just receive a bad rtc chip the first time.I use the small cylindrical crystal.Regards and thanks for the help.Philippe