• Please review our updated Terms and Rules here

XT-RTC - Level of interest

sergey

Veteran Member
Joined
Jul 15, 2010
Messages
880
Location
Silicon Forest, Oregon, USA
Hi,

A few people asked recently about an RTC card for PC/XT. I am wondering if it is something worth designing?

Now to the technical aspect:

I looked into several design options. Here are some of them:
1. Use Maxim/Dallas DS1501/DS1511 chip.
Pros:
- Chip is currently in production. The DIP version is not recommended for new designs, but it is possible to design a PCB that will accommodate both DIP and SOIC packages.
- Chip has "century" byte which simplifies the Y2K compatibility.
- Chip has convenient I/O implementation (8-bit data + 5 address lines), and requires minimal number of additional components to interface to the XT/ISA bus. (5-bit address / 32 address locations is a bit overkill for scarce XT address space, although it is possible to ignore NVRAM capability, and reduce number of address locations to 16).
Cons:
- The chip is a bit expensive - about $10 in single quantities. Add $10 or so for PCB and $5 for other components... So $25 per board without labor.
- Will require writing a driver (but it isn't that complicated)

2. Use MM58167 chip.
Pros:
- Chip is used in many older RTC cards. The design might be compatible with one of them.
Cons:
- Chip is out of production (although available through various Chinese IC dealers).
- Chip doesn't support years count. So driver needs to take care of figuring out the year (e.g. storing it in NVRAM), and adjusting for leap year.

3. Use DS12885 (DS1287/DS12887) chip
Pros:
- Used in AT
- Currently in production.
- There is DS12R885 version that support trickle charge, and can be used with supercaps instead of regular batteries. It is also cheaper ($5/chip), but unfortunately only comes in SOIC package.
Cons:
- No century count / two digit year (excluding DS12887C variant). Century will need to be maintained by driver, or alternatively it can be assumed that it will not be used beyond 2080 :)
- A bit more cumbersome interface to ISA (it has a multiplexed address/data, so additional logic is required for interfacing)
- Will require writing a driver

4. Use one of DS1307 compatible I2C chips.
Pros:
- Generally cheaper than chips with parallel interface.
- High precision models are available, e.g DS3231M with built-in MEMS resonator (although at a bit higher price)
Cons:
- Will require something to interface to the parallel ISA bus. Anything from bit banging interface (a latch and a buffer) to a microcontroller with I2C and parallel interfaces (e.g PIC16F877). In the latter case it is possible to have some additional functionality (e.g. an SD-card interface)
- Will require writing a driver

Thanks,
Sergey
 
hello
perhaps of this thread - but would it be possible to glue a CMOS-bios to the ISA bus ?
...some applications ask for CMOS info and it could be one step on the way upgrading the PC-XT to a semi-AT ?
/cimonvg
 
I would love to have a combined card, RTC and XT-IDE/CF on one addon card. This would make slim size XT owners hapyy, like Atari PC-1, Commodore PC-1, Schneider Euro-PC and Olvetti M19/ETV260. (For the Olivettis ISA low profile would be a must!)
 
hello
perhaps of this thread - but would it be possible to glue a CMOS-bios to the ISA bus ?
...some applications ask for CMOS info and it could be one step on the way upgrading the PC-XT to a semi-AT ?
/cimonvg

While I am not completely sure what do you mean by CMOS-BIOS, I suspect two things:
- Connect RTC/NVRAM chip to ISA so that it is connected similarly to AT RTC. I am afraid this is not possible because AT RTC uses 0x70/0x71 addresses, that are below 0x100 used by ISA. An ISA card will get writes, but reads will not work - the data bus transceiver direction would be incorrect... Though it might be possible using J8 slot on the original XT (not clones).
- BIOS update that supports some AT BIOS functions (e.g. RTC). That probably can be done as a BIOS extension, but not sure why it is useful.
 
Note that for some computers, the DS1216E is a ready-to-use RTC solution.
See the earlier thread [here].
Those people that can use it may prefer to head down that route.
 
Note that for some computers, the DS1216E is a ready-to-use RTC solution.

DS1216E is pretty expensive; it has an integrated battery that eventually will discharge, and the entire module will need to be replaced (or hacked).
Another (a bit cheaper) variant is adding DS1315 to one of existing ISA/XT card projects that have BIOS extension ROMs. DS1315 is the "phantom clock" chip used in DS1216E module, so that will be equal to using DS1216E.
 
Hi,

4. Use one of DS1307 compatible I2C chips.
Pros:
- Generally cheaper than chips with parallel interface.
- High precision models are available, e.g DS3231M with built-in MEMS resonator (although at a bit higher price)
Cons:
- Will require something to interface to the parallel ISA bus. Anything from bit banging interface (a latch and a buffer) to a microcontroller with I2C and parallel interfaces (e.g PIC16F877). In the latter case it is possible to have some additional functionality (e.g. an SD-card interface)
- Will require writing a driver

Thanks,
Sergey

Using i2c RTC seems interesting (and low cost in a first approximation). I found a lot of special parallel to i2c converter chips such as PCA9564 and PCF8584 but their cost around $5 in Russia. Don't know what about USA, guess that roughly the same. So, PIC microcontroller with i2c hardware interface and Parallel Slave Port (PSP) support, ex PIC16F877 costs $2 there. Is cheaper to put the microcontroller on board than a special converter. And yes, microcontroller allows additional features, such as SD-card, PS/2 keyboard or mouse, Ethernet...

A year ago, I tried to build SD-card controller based on PIC with PSP. RTC with i2c interface was to become the next mandatory option for my controller. Small difficulty that I have encountered - PSP interrupt flag set immediately when /WR signal obtained. It's ok, when PC send data to controller PSP interrupt flag set and microcontroller firmware goto PSP interrupt handler for read data from PSP port. But when /RD signal obtained PSP interrupt flag set after data transfer, PSP interupt handler called after data transfer.. Thus the data byte should be all the time in PSP port, when it read (PSP interrupt handler called), next byte should be placed in PSP port immediately. Due to lack of time, the project was never finished.
 
Vote for SPI for ISA-8 (insted of I2C). There are alot of cheap SPI RTCs.
SPI RTC and SPI peripherals are rather popular in the Arduino world.
Evaluation boards for Arduino are cheap and easy-to-buy.

A thing we need is a "hardware" SPI controller for ISA-8.
To avoid "bit-banging" there is SPI for 6502 bus project
http://sbc.rictor.org/65spi.html
http://6502.org/users/andre/spi65b/index.html
 
I would vote for 4. But since I have Ethernet in all of my XTs now, I can live without any RTC card. SNTP sets the time. I am very probably not going to build the card.:)
 
You could even do SPI fully discrete with a three shift registers and combinatoral 74xx chips. One address writes to the out shift, one reads from the in shift, and one sets/resets the counter state machine along with providing a few CS output lines. The third shift reg acts as a 1-8 barrel counter w/o having to lay down an adder and comparitor. Use either the bus clock or the local 14.318 to drive the counter/shift regs.

Software would wait for status in the control reg, read the input byte, write an output byte, write the control reg, and wait for status again.

With some careful craftsmanship, a strobe deasserting on the write to the output shift could trigger the state machine and you could assert ready low while it's cycling. That way other then GPIO CS control, the software could continuously write and read result bytes only.
 
Last edited:
DS1216E is pretty expensive; it has an integrated battery that eventually will discharge, and the entire module will need to be replaced (or hacked).
Another (a bit cheaper) variant is adding DS1315 to one of existing ISA/XT card projects that have BIOS extension ROMs. DS1315 is the "phantom clock" chip used in DS1216E module, so that will be equal to using DS1216E.

Another problem with the DS1216E that I found recently is that production was stopped just a few months ago and a lot of suppliers stopped carrying it. I just tried to find one for a Tandy 1000 HX (Smartwatch) and had to take my chances with ebay.
 
If anyone is interested I have reverse engineered the schematic of the CSCA RTC card mentiond here.

This would be option 2, and would consist of 4 basic 74xx chips and the RTC chip.
The nice thing about this option is that the driver software is already done.
 

Attachments

  • RTC.pdf
    41.7 KB · Views: 5
Definitely interested in this Sergey. It would be great if it was something that could include a CR2032 socket.

I like option 1.
 
... and there are also some that set under the BIOS chip as in my 1000SX.

That would be the Smartwatch, AKA the DS1216E mentioned above. I tried to order one from Digikey a few weeks ago for my HX and there was a notice that they were no longer being produced. The last date for accepting orders was September 18. It was the same for other dealers too. I found some on ebay that were not from a local dealer that aren't too old, at a reasonable price. He still has a lot of 2 left.

http://www.ebay.com/itm/250880597958
 
That would be the Smartwatch, AKA the DS1216E mentioned above. I tried to order one from Digikey a few weeks ago for my HX and there was a notice that they were no longer being produced. The last date for accepting orders was September 18. It was the same for other dealers too. I found some on ebay that were not from a local dealer that aren't too old, at a reasonable price. He still has a lot of 2 left.

http://www.ebay.com/itm/250880597958

Found this on a Google: http://www.electronicsurplus.com/dallas-ds1216e-ic-smartwatch-rom-series-e

Price isn't bad and it come with the DIP socket. Just might jump on this one myself and squirrel it away for a while. BTW, I'm not sure where I bought the last one, but it may have been JAMECO.
 
Back
Top