Keep on Ticking - MTX RTC

Use this forum to describe how you are using, or planning to use, the parts kits generously donated to a number of members by Lez Anderson
Martin A
Posts: 303
Joined: 09 Nov 2013, 21:03

Keep on Ticking - MTX RTC

Postby Martin A » 07 Jun 2014, 09:40

After the slow clock, I've been looking at the DS12887 that Lez supplied in "the kit"

Dave sent me this link http://home.comcast.net/~kr.baker/rtc.txt on connectiog the smaller DS1287 to a ZX81.

Obviously for the MTX full decoding is needed, so I modified the circuit to us an ATF16V8 instead of the 74 series parts.

For some "strange" reason, I chose to use ports 070h and 071h for the clock, OUT to 070h sets up the register address, then IN or OUT 071h to access the location. it works from both basic and assembler.

The WINCUPL code for the PLD is:

Code: Select all

Name     RTC ;
PartNo   00 ;
Date     30/05/2014 ;
Revision 01 ;
Designer Engineer ;
Company  none ;
Assembly None ;
Location  ;
Device   G16v8 ;

/* *************** INPUT PINS *********************/
PIN    1  =  A0                       ; /*                                 */
PIN    2  =  A1                       ; /*                                 */
PIN    3  =  A2                       ; /*                                 */
PIN    4  =  A3                       ; /*                                 */
PIN    5  =  A4                       ; /*                                 */
PIN    6  =  A5                       ; /*                                 */
PIN    7  =  A6                       ; /*                                 */
PIN    8  =  A7                       ; /*                                 */
PIN    9  =  M1                       ; /*                                 */
PIN    11 =  IORQL                    ; /*                                 */
PIN    12 =  RD                       ; /*                                 */

/* *************** OUTPUT PINS *********************/
PIN    16 = DS                        ; /*    Active high data strobe      */
PIN    17 = RW                        ; /*    inverted read signal         */
PIN    18 = AS                        ; /*    Active high address strobe   */
PIN    19 = CS                        ; /*    Active low data strobe       */

/* Address port &70. Data port &71 */

DS =
!IORQL & M1 & !A7 & A6 & A5 & A4 & !A3 & !A2 & !A1 &  A0 ;

!RW =
RD;

AS =
!IORQL & M1 & !A7 & A6 & A5 & A4 & !A3 & !A2 & !A1 & !A0 ;

!CS =
!IORQL & M1 & !A7 & A6 & A5 & A4 & !A3 & !A2 & !A1 &  A0 ;




ASCII "schematic" of the 2 chip's connections, I have them mounted in opposite directions to make the hook up neater

Code: Select all

                    +-------+
                 5v |      o| 5v
   +-----+       NC |       | NC
0v |     |iorq   NC |       |NC
M1 |     |RD     NC |       |D0
A7 |     |NC     NC |       |D1
A6 |     |NC     NC |       |D2
A5 |     |NC     NC |       |D3
A4 |     |ds     DS |       |D4
A3 |     |rw     NC |       |D5
A2 |     |as    R/W |       |D6
A1 |     |cs     AS |       |D7
A0 |o    |5v    *CS |       |0v
   +-----+          +-------+
     16V8            DS12887



The 4 signals ds->DS, rw->R/W, as->AS and cs->CS connect between the 2 chips, the remainder connect to the MTX expansion port. Easy!

User avatar
Dave
Posts: 607
Joined: 11 Aug 2012, 18:16
Contact:

Re: Keep on Ticking - MTX RTC

Postby Dave » 07 Jun 2014, 10:54

Martin,

that's great - well done

regards
Dave


Return to “What you are doing with Lez's "Free Stuff"?”

Who is online

Users browsing this forum: No registered users and 1 guest