Enterprise Forever

:UK => Hardware => Interface => Topic started by: gflorez on 2016.December.29. 22:43:41

Title: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2016.December.29. 22:43:41
In the past, with the aid of Zozo, I build a RTC (https://enterpriseforever.com/hardware/real-time-clock-with-a-msm6242b/) that took advantage of an unused header of the Microteam Exdos clone card. He has modified his Zozotools to work with it, but is an approach that only serves to that Exdos clone card.

Now I will try an internal RTC with the aid of Zozo and Pear. I think it will work exactly like the Meszaros' Clock card, because it will use the same Z80 ports. It would be adapted to all Enterprise computers, because I will take the signals from the internal memory expansion headers, that the 64 also have.

Only three signals must be taken from other points at the EP main-board, /IORQ, /M1 and /RESET, the last not used on Meszaros' project. This is because I am following the schematics provided by Pear, that substitutes some logic gates by a GAL and includes that /RESET signal.

The RTC chip is the same that I used with the Microteam, the Dallas DS12C887, totally compatible with the original chip mounted on the Clock card, the Motorola MC146818, but with the added bonus of  being CMos, to have static Ram, crystal and  a battery included on the same package. This saves a lot of circuitry, compared with the original chip.

My card, made of strip-board, will measure about 60x50 mm, little enough to fit inside of all EPs. I will put here the details.
Title: Re: Internal Real Time Clock
Post by: gflorez on 2017.January.01. 13:08:41
Some advances, all the leads and jump wires soldered.
Title: Re: Internal Real Time Clock
Post by: gflorez on 2017.January.02. 13:46:25
Stripes cut.
Title: Re: Internal Real Time Clock
Post by: gflorez on 2017.January.22. 21:33:52
I am still waiting for a cheap Chinese chip programmer able to burn the ATF20V10...

-----------------

In the meantime....

If I get the RTC working on my Ep, it will need Zozotools to show the clock on the screen. The ZT19UK.ROM weights 32KB, and I have no spare space on the internal ROM nor in the SD-reader cartridge. The easy way would be to put it on the EXDOS Rom socket, but actually I don't have my Microteam card with me.

I have thought on adding a 512KB  Flash-ROM to the installed 1MB Saint's memory expansion. The second 512KB SRAM chip is mounted piggyback on the first, so I think that there isn't enough space on the upper side of the little card, but plenty on the underside above the Nick chip. The Flash-ROM chip has almost the same pin-out than the used SRAM chips, then I can solder the chip to the underside contacts. There are only 4 contacts out of the 32 that must be moved.

For the address decoding I will use the same GAL16V8 used for the SRAM, on one of its unused pins.  The Flash-ROM will go on the same memory address area than the 512KB DRAM of the Microteam, because it will be disabled due to compatibility problems with the 10MHz mode.

But again I need the chip programmer to change the content of the GAL chip.
Title: Re: Internal Real Time Clock
Post by: gflorez on 2017.January.25. 23:15:09
There are three signals not present on the internal expansion headers but needed by the Real Time Clock: /M1, /IORQ and /RESET.

I have found spots to solder them on the zone near the external expansion connector:




Edit: I have corrected an error on the drawing. /IORQ is B3 on the external connector, not B2.
Title: Re: Internal Real Time Clock
Post by: gflorez on 2017.February.03. 10:33:39
The 512KB Flash-ROM arrived. Still waiting for the chip programmer.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.09. 12:20:19
The programmer arrived, and some newbie problems solved.

This is for pear:

The eight of the clock chip, DS12C887+, is exactly 8mm, the same as the two memory chips soldered piggyback.

Once connected on its header, Saint's card+chips raise upto 20mm.

Sorry for the dirt in my fingers... my job is car repairing....
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.09. 14:23:10
The two memory expansions compared.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.09. 17:13:42
Now I have programmed the 512 Flash with all sort of Roms, in boundaries of 64KB, for easy upgrade.

This is the look of the chip soldered under Saints's board.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.09. 17:29:00
The board in its place. The pins of the chip are three or four mm away of the nearest object.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: geco on 2017.February.09. 18:30:02
Looks good :)
Are you still able to put the top of EP into it's place? :)
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: Zozosoft on 2017.February.09. 18:31:58
This is the look of the chip soldered under Saints's board.
All pins connected? If I remember right, some pins ar different at the SRAM and Flash ROM!
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.09. 19:37:19
Looks good :)
Are you still able to put the top of EP into it's place? :)

The piggyback soldered chips where originally put by Saint. They fit...

All pins connected? If I remember right, some pins are different at the SRAM and Flash ROM!

Thanks Zozo, I remember well your tutorial about ROMS and SRAM.

Only two pins soldered to see all in place. Now I will proceed to solder the rest rotating the needed pins.

Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.10. 10:52:12
Pear is making some measurements with the internal expansion headers.

This picture is to show how the second header is placed under the narrowing in the upper housing at the external expansion port. The red line marks the limit of the narrowing, about 7 mm over the main board.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: pear on 2017.February.10. 11:01:57
Thanks :)
Very tight. Badly designed :(
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.10. 13:35:44
Now I am going to solder the pins, but as Zozo has pointed, some pins go on different place on the Flash chip:

This is the SRam:
[attach=1]

And this is the Flash-Rom:
[attach=2]

-Pin 3, on SRAM is A14, on Flash-ROM is A15.
-Pin 29, on SRAM is /WE, on Flash-ROM is A14.
-Pin 31, on SRAM is A15, on Flash-ROM is /WE.

The pins must be rotated with three little leads.

Also /CE on pin 22 should be left free, as it goes to pin 19 of the GAL.

And at last, a cut must be made on Saint's board, at least in my version:

[attach=3]
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.10. 15:47:59
Pins rotated. /CS for the Flash-Rom soldered from GAL, pin 19.

Time to test it.....
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.10. 21:41:10
Tested and working.

The next  task is to solder the RTC.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.11. 00:26:02
RTC soldered, but I think it is still not working.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: Zozosoft on 2017.February.11. 07:43:58
RTC soldered, but I think it is still not working.
What happened?
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.11. 09:53:50
If I reset the Ep, the time starts again  from 00:00:00 and, if I change to 10Mhz, the clock goes faster...

The ports, according to LGB ports listing, are:

0x7E   CMOS RTC/memory register select
0x7F   CMOS RTC/memory register read/write

I will read them to see if there is communication.

Also it can be that the ATF22vV10 is not properly programmed.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: Zozosoft on 2017.February.11. 10:10:51
The new RTC chips shipped in stopped sate (for power save), need to be initialised.
SET 142,8
:DATE
:TIME
:HWRITE
SET 142,0
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.11. 11:49:23
*** No hardware clock board or bad.

I have to re-check the connections and ATF programming.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: pear on 2017.February.11. 13:20:03
Pear is making some measurements with the internal expansion headers.

This picture is to show how the second header is placed under the narrowing in the upper housing at the external expansion port. The red line marks the limit of the narrowing, about 7 mm over the main board.
I think I found the solution :)
The small L-shaped board.
I added signals /M1, /IORQ, /RESET and /INT.

Previously I thought about crimp IDC connector, but they are too high.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: Zozosoft on 2017.February.11. 14:09:07
*** No hardware clock board or bad.

I have to re-check the connections and ATF programming.
Pin1 connected to +5V? (Motorola mode)
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.11. 15:05:09
I think I found the solution :)

A very clever approach. Then you will cut that higher ends of the pins, wouldn't you?

Pin1 connected to +5V? (Motorola mode)

Pin 1 of the Dallas chip not connected.

EXP2 is correctly connected,  I only draw +5 and GND from it.

But I have a doubt on the pin-out of EXP1, it can be I have swapped column A and B on that header.

In your web page (http://enterprise.iko.hu/pinouts.htm) , column B is near  the external connector or near Dave chip?.

------------------------

Edit: correct, B is at the outside.

Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: Zozosoft on 2017.February.11. 15:48:46
Pin 1 of the Dallas chip not connected.
This is a problem!
"MOT (Mode Select) – The MOT pin offers the flexibility to choose between two bus types. When
connected to VCC, Motorola bus timing is selected. When connected to GND or left disconnected, Intel
bus timing is selected. The pin has an internal pull-down resistance of approximately 20KΩ."

I already discovered at your MICROTEAM RTC Motorola mode needed when working with Z80.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: pear on 2017.February.11. 16:08:46
A very clever approach. Then you will cut that higher ends of the pins, wouldn't you?
It's only a model. The pins will need to trim, because otherwise case will not close.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.11. 17:06:22
 

If I connect /RD of the RTC to B19, the Enterprise starts to do odd things.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.11. 23:44:03
I have discovered an error on the ATF chip program, it needs PwrOn signal to work. Then I have put that signal on pin 11 and soldered that pin to GND.

Quote
  Name     RFC2;
    PartNo   00;
    Date     2015-12-20;
    Revision 01;
    Designer Engineer;
    Company  none;
    Assembly None;
    Location none;
    Device   g22v10;
    
    /* *************** INPUT PINS *********************/
    PIN 1   = !IORQ   ; /* IORQ */
    PIN 2   = !M1     ; /* M1 */
    PIN 3   = A7      ; /* A0 */
    PIN 4   = A6      ; /* A1 */
    PIN 5   = A5      ; /* A2 */
    PIN 6   = A4      ; /* A3 */
    PIN 7   = A3      ; /* A4 */
    PIN 8   = A2      ; /* A5 */
    PIN 9   = A1      ; /* A6 */
    PIN 10  = A0      ; /* A7 */
    PIN 11  = !PwrOn  ; /* power on */ /* put permanently to GND*/
    
    /* *************** OUTPUT PINS *********************/
    PIN 14  = !CS     ; /* enable buffer */
    PIN 23  = !CSRTC  ; /* enable RTC */
    PIN 22  = ASRTC   ; /* enable RTC address */
    PIN 19  = DSRTC   ; /* enable RTC data */
    
    VselRTC = IORQ & !M1 & A1 & A2 & A3 & A4 & A5 & A6 & !A7;
    VcsRTC  = VselRTC & PwrOn;
    
    /* *** CS *** */
    CS      = VcsRTC; /* ok */
    
    /* *** CSRTC *** */
    CSRTC   = PwrOn;
    
    /* *** ASRTC *** */
    ASRTC   = VselRTC & !A0;
    
    /* *** DSRTC *** */
    DSRTC   = VselRTC & A0;
    

But it still doesn't work.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.11. 23:58:51
Please Zozo, can you check if the solder points have been correctly selected?
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: Zozosoft on 2017.February.12. 07:20:22
The /Reset are wrong, it is the /INT.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: Zozosoft on 2017.February.12. 07:22:15
RTC Pin1 corrected?
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.12. 11:59:02
The /Reset are wrong, it is the /INT.

Ok, disconnected. It is not present on the original RTC board.

RTC Pin1 corrected?


The problem is, when I connect /RD, the EP starts to do odd things. It hangs at cold reset on the SD partitions screen, but only in 10Mhz, so I can reach the flashing letters screen on 4Mhz and then switch to Turbo speed. Also, once in Basic, loading SymbOS on 10Mhz also hangs. I have to switch to 4Mhz, and once loaded, again switch to 10Mhz. But then the mouse wouldn't work on Turbo speed.(we have to talk to Prodatron about that issue...)
 
On this situation, when pin 1 of RTC is connected to +5v(Motorola mode), at cold reset, the SD Reader hangs on the two speeds.

Sometimes on 4Mhz, pressing reset, it jumps to the clock, and other reset makes it jump to the SD partitions screen. But only sometimes.

I think I better will wait for Pear to make his own tests.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.16. 13:51:10
Ok, disconnected. It is not present on the original RTC board.

I said it very fast... of course /Reset is used on the original project. A 4,7 nF condenser and a 1KOhm resistance give a short GND impulse at power-on. I will try it while other better way is found...
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2017.February.17. 11:26:04
Even easier, /RESET can go directly to Vcc:

[attachimg=1]
Title: Re: Internal Real Time Clock
Post by: Povi on 2019.March.27. 14:46:12
Stripes cut.
What kint of tool do you use to cut the stripes?
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2019.March.27. 15:04:01
You do mean to cut cooper tracks on a circuit, don't you?

I use a similar machine than this:

(https://images.homedepot-static.com/productImages/da8917e1-79db-4b9c-aa64-bdd42f6cdc38/svn/dremel-rotary-tools-200-1-15-64_1000.jpg)

There are little milling tips that can be used as a pencil, with enough precision.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: jakoa on 2021.April.16. 10:27:07
Even easier, /RESET can go directly to Vcc:

(Attachment Link)
I am nut sure if the problem still exists, but I am also working on an internal board with an RTC.
I use the DS12885 chip because of the size and a possibility for battery replacement.
I was also struggling with the operation and at the end I found an error, maybe it was also in your case.
The input Vbat cannot be left open. Either an external battery should be connected or it has to be connected to GND.
Leaving this pin open, the chip does nothing. (The applied battery case creates this connection if no battery is inserted.
After the connection on the ground it worked fine for me.
The pin1 MOT is connected to Vcc,
The Pin 13 -CS get the RESET signal (inverted -RESET).
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2021.April.16. 11:41:55
Great!

I left my plan to install the internal RTC because I did not found any way to put the clock to work.

Thanks a lot. I will try your fix in due time...
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: jakoa on 2021.April.16. 13:26:20
If you need I can send you the actual timing analysis, but it should also work for you:
RESET is high,
CS is normally continuously low.
Address is written into the rising edge of AS. (R/-W is low),
Data is written (after the address is set) on the rising edge of DS (R/-W is low), or
Data is read (after the address is set) on the rising edge of DS (R/-W is high).
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2021.April.29. 11:16:30
I have just found my old hand made PCB:

[attach=1]

I can't remember now what I did.... so I will read this thread thoroughly.
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: jakoa on 2021.April.30. 14:16:34
I assume the GAL (probably) is responsible for the address (FEh and FFh) decoding and for the control signals (AS, DS, CS, G, DIR).
The empty socket should be waiting for the 74LS245 transceiver. :-)
Title: Re: Internal RTC and 512KB Flash-ROM for Saint's memory expansions
Post by: gflorez on 2021.April.30. 14:36:16
Yes, that is. The Gal and the 245(I have re-used it on another project....)

I will search for the GAL formulas on an old laptop this weekend.