RTC MC146818 / HD146818 problem - Page 1
Forum section: electronics / general

author: Wawavoun
author_rank: Regular Contributor
timestamp: December 15, 2021, 09:33:45 am
content: Hello there !I have rebuild the Microbox II 6809 based computer.This computer has a rtc chip MC146818 keeping date, time and also some parameters. The rtc is backed up by a 3.6 V battery.It seems that SOMETIMES rtc datas are corrupted at power down.The computer wont restart.By clearing the rtc (pin 22 to gnd) default values are restored at next boot and he restart well.I have try two different chips (Motorola and Hitachi) with the same problem.I put the scope on CE pin of the rtc set into one shot mode. At power down the scope trigger and I see several pulses.The monitor has no code for doing something into the rtc at this moment so this is abnormal.This CE signal is made by decoding E, S0, S1 coming from the 74LS783 SAM and A2, A3, A4 coming from the proc (via buffers).This is working well because I can read and write easely into the rtc.I have try 3 different power supplies with the same problem (one is linear serial with cut off button at the output so power down is immediate, nos discharging of capacitors etc...).I will put the logic analyzer and try to understand how these pulses are generated.I need some advices if this is a kown problem and if its the case what are usually the solutions.Regards.Philippe

author: DrG
author_rank: Super Contributor
timestamp: December 15, 2021, 04:41:20 pm
content: I don't necessarily have a solution, but just did a bit of reading and am thinking that the battery backup circuitry deserves a closer look...because...you have not described/discussed that piece of the puzzle.If I am reading correctly, the power backup is shown in the February issue linked herehttp://www.sardis-technologies.com/oth6809/microbox2.htmDiodes and no caps...[edit: correction C5 is part of the backup circuitry] compare that to the 'recommended' scheme. Is it possible that with your battery the diode drop is getting borderline for the MC146818 as suggested by this guy and his tests with an IBM MBhttp://www.minuszerodegrees.net/misc/5170_battery_3.6v.htmAP notehttp://www.bitsavers.org/components/motorola/_appNotes/AN-0856_Low_Power_Considerations_MC146818.pdfDS AP Note on replacement with DS partshttps://www.jameco.com/Jameco/Products/ProdDS/25101.pdfJust thinking out loud and where I would start looking - hope it helps.

author: Benta
author_rank: Super Contributor
timestamp: December 15, 2021, 05:28:54 pm
content: I looked at the Electronics Today issue in question.The problem is the Q2 circuit for pulling /CE high when the supply voltage drops. The cutoff voltage needs to be better defined.I'd suggest modifying that part to use a real voltage supervisor driving the base of Q2, something like an MC34164-5, or whatever you can find on the market.Drive Q2 directly from the MC34164, and redefine R31 as pull-up resistor between the two. It's already connected as such.This would ensure a clean power-up and power-down for the RTC.EDIT: I would also connect R32 to the RTC VCCpin (24) instead of directly to the battery. Otherwise the high level at the /CE pin is marginal.

author: DrG
author_rank: Super Contributor
timestamp: December 15, 2021, 06:17:30 pm
content: I was hoping somebody else would look which is why I posted the link to the schematic. Attached is the circuit from the article and the ap note circuit and description.So, I don't understand why CE is connected to the nicad at all in the article? Note that in the ap note the recommended method does not connect CE to the nicad. In fact, why not duplicate that scheme and just add the inverter and pull down and not use Q2 at all?

author: Benta
author_rank: Super Contributor
timestamp: December 15, 2021, 06:57:59 pm
content: Quote from: DrG on December 15, 2021, 06:17:30 pmI don't understand either and have already commented on this.The Motorola circuit is unnecessarily involved and needs higher voltages than the +5 V in the 6809 SBC.As PCBs probably already exist, my suggestion of adding one TO-92 device and relocating one wire seemed to be the simplest.

author: Wawavoun
author_rank: Regular Contributor
timestamp: December 16, 2021, 02:41:57 pm
content: What do you think about that ?

author: Benta
author_rank: Super Contributor
timestamp: December 16, 2021, 06:48:48 pm
content: I've no idea what it's supposed to do, but it seems upside down.Please read the previous posts.

author: DrG
author_rank: Super Contributor
timestamp: December 16, 2021, 07:16:24 pm
content: Quote from: Benta on December 15, 2021, 06:57:59 pmYeah I kind of agree that the entire Motorola circuit *may* be more than needed. Looking at the thread again, it is not yet known exactly why the glitch is occurring.Assuming that the glitch occurs with some repeatability simply by powering down and up again, I would probably disconnect the CE from the bat first and see if it had any effect.

author: srb1954
author_rank: Super Contributor
timestamp: December 16, 2021, 08:18:21 pm
content: Quote from: Benta on December 15, 2021, 05:28:54 pmAgreed.The transistor controlling /CE won't turn off to protect the RTC contents until the main Vcc drops below 0.6V. This is way below the Vcc where you can reasonably expect the control logic to continue to behave and consequently there could be spurious writes to the RTC registers.A better cut-off threshold than that solely defined by the transistor Vbe is required.