@johnwasser Would you recommend using an interrupt pin for the clock input?
I'd skip the whole emulation thing and just buy a new one for $1.90.
I found those a few days ago and ordered a few. I have ordered from Futurlec before and it took more than a month to get here before the pandemic. So we will see. I still want to figure this out to at least know it can be done.
Yeah, what fun is just buying something?
Where would we be if that attitude prevailed? Or who? ![]()
a7
Absolutely worth doing. Climb the mountain because it's there. I think this could eventually be made into a library for emulating vintage ICs of different types.
A Mega, as @alto777 wisely suggested, Mega might need to be the target board. @shift838 Do you have a Nano and a Mega on hand so both can be investigated? You do need 23 pins.
i don't have a Mega but I can order one.
I'd go for the one mentioned above or similar.
Yes. I have been using the little mini MEGA and wondering if I will ever come anywhere near running out of anything other than processor cycles.
Time, so sad, the only truly precious resource. ![]()
a7
Look what I found while Mega shopping @alto777. Not needed for this project but great for another I'm working on.
Also I found the embedded Mega 2/$20ish
I got 2 of each, I guess tomorrow Amazon will make a Mega delivery to my place.
@er_name_not_found - nice, price is right esp. consider the included necessary why they gotta be changing things alla time USB C cable…
I like the female headers, I got a big stash of all kindsa Dupont cables and it makes lashing things i
up pretty easy.
Although three mini MEGAs fit in the same size!
So develop on the real keyes mega. Then move to a Nano if your calculations and design pans, otherwise grab one of the mini MEGAs and heat up the soldiering iron.
I got the mini MEGAs for also < $10 per including shipping, USA based fulfilled very rapidly beating the seller’s predictions. I’ll be repeat customer; that slow boat from you know where is such a drag… half the time something comes in the mail and I struggle to even remember why I bought the damn thing(s). ![]()
a7
Yup, I try to only do big orders from there. The savings has to be significant, the order sufficiently large, and no rush. I can usually get good enough deals from Amazon and most stuff gets here next day.
Since I was asked to take a look, here is my $.02.
The original RTC is essentially a state machine that interacts synchronously through registers. For something like this, I would have recommended a CPLD. But if using a microcontroller, assembly language would be much better suited than the C++ of the Arduino. IMO.
Since the modern I2C RTC already has all of the features you need (NVRAM, alarms, etc..) your project is more or less to convert the parallel interface of the original interface to I2C. Your state machine would regularly capture the contents of the registers of the new RTC over I2C and then present them as addressable registers to the original system.
While I am certain that this could be done in C++ on a fast enough processor with enough I/O, I feel that this is one of those cases where the C++ code would actually be more complicated than it would be in assembly. And as mentioned, a CPLD would be even more appropriate since it was designed for things just like this. It is already a programmable state machine with tons of I/O and built in registers.
Thanks for checking it out.
I will look into the Assembly side of things, especially if this becomes a library.
I have a bunch of XC9572XL-10TQG100C CPLDs on the way in the next couple weeks. I'm planning on making them into dev boards with every pin exposed and putting them on ebay. I know they are retired but they are cheap and useful. A more limited version can be purchased from a US shipper for about $15. Is there a cheaper off the shelf board that you'd recommend over this one?
BTW, I've started tinkering on your project in the evenings.
The only thing that sucks about CPLDs is trying to find one that is still 5V IO tolerant. This application would definitely need level translation to work in the old systems that the original clock was intended for.
An AVR is plenty fast enough to do this, I am sure. Just not sure it is the right tool for the job.
If this were my project, I would start out by going through the datasheet (I have looked at the various RTC datasheets many times before) and start drawing out how to do it with discrete components. For me, being a hardware guy, this helps me structure out the programming better. And with a CPLD, you can actually just use schematic capture to write the code so you are already there.
I have never used schematic capture. Do you have a good link I could use as a starting point?
The logic level converter will have to be hand made for this, I think, for either the Mega or the CPLD. I read the logic levels of the MM58167AN as taking a min of 2.0V for input and providing 2.4V for output, unless I'm mistaken which happens a lot more than I'd like. I wonder if 2.4V would work both ways? If so it sure would simplify a 2-way logic converter design.
I'm more about gate logic, bit banging, and software design. I could design it out of 4000 series chips but it would take me a while. I envy your discrete component experience.
I'm pretty sure this project is going to happen both as an AVR and a CPLD, but that @shift838 absolutely wants to make one from an AVR.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
