Côté bricolage :

Une interface
24 Inputs/Outputs
pour votre ZX81.



TIREZ PLUS DE VOTRE SINCLAIR

Mis à Jour : Juin 2007.





Kit by Xavier Martin.

( XavSnap ).

Diffusion sur internet sous réserve de non utilisation mercantile, à titre pédagogique et pour la contribution de l'auteur à l'histoire du ZX81.

-

Electronic Kit n°1 :
A Centronics card for your Zx81/Ts1000

(Kit not experimented yet)
V1.2




Centronics Sub D 25 pins card.
Can be used with an ASM driver or a Basic program.
(Single side copper/époxy board)
For printers or datas transfers.


Waring :
This project isn't finalized yet and could be update !



Implantation :
(XavSnap)

(Components side using straps wiring)

Zoomer...

Components side:

Zoomer...

PCB:

(époxy single side)

(Copper side)


Zoomer...

( rear view of ZX – extension port at the left side)


PBC file : (XavSnap) – v1.2 updated.(Ci file)

http://zx81.ordi5.free.fr/brico/centronic/images/centro.ci














Wiring diagram :

Zoomer...
The card selection (EXT) is set by using the proper YE memory offset.
3800H=able to force B7 and active the 8255a(/GE) port.

If you had to initialize a new port, active if EXT1 is on, you had to poke at 0000h to active the Y0 on 74LS154 ship set.( list of offset addresses on the wiring diagram)

It able to trig and initialize 15 extra ports devices.

This bits could be used on other projects to ... active or valid a new device (active an IDE disk ... Disk C... Disk D...)




Ce montage est composé de :

References

components

Q

P.U.

Price.(€)

IC1

P.P.I – 8255A intel or compatible.

1

-

4,27

IC2a

74LS245 : Latch IO Buffer

1

-


IC2b

74LS245 : Latch IO Buffer

1

-


IC3

74LS154 : 4 to 16bits Multiplexer.

1

-







P1

Centronics SubD 25 pins socket for PCB.

1

-


ZX

2x23 pins DF connector.

1

-


To E/S daughter cards.

25x1 connector.





Boîtier PCV (noir)

1

-




















Utilisation:


8255A contrôl register : Address 14339 / 3803h


D7

D6

D5

D4

D3

D2

D1

D0

Flag

Mode 1

Mode 2

Canal A

Canal C

Mode

Canal B

Canal C


D7:

0 = Mode Bit / Reset.
1 = Mode Setup

D6 et D5:

00 = Mode 0
01 = Mode 1
1x = Mode 2

D4: Canal A

0 = Output
1 = Input

D3: Canal C (PC4 à PC7)

0 = Output
1 = Input

D2: Sélection du Mode.

0 = Mode 0
1 = Mode 1

D1: Canal B

0 = Output
1 = Input

D0: Canal C

0 = Output
1 = Input

8255A setup :

PA : Address 14336 / 3800h
« Poke 14336,1 » Set PA0 (bit 1 to On).
« Print Peek (14336) » Read D0 to D7 on PA port.

PB : Adresse 14337 / 3801h
« Poke 14337,1 » Set PB0 (bit 1 to On).
« Print Peek (14337) » Read D0 To D7 on PB port.

PC : Adresse 14338 / 3802h
« Poke 14338,1 » Set PC0 (bit 1 to On).
« Print Peek (14338) » Read D0 to D7 on PC port.


Data Register: ( PA D0-7 bidirectional read and write)


Control Register: ( PB D0-3 ouput mode)
PB0= STROBE.
PB1= AUTOFEED.
PB2= INIT.
PB3= SELECT INPUT.
PB4-7=
NC.


Stat Register
: ( PC D3-7 read only/ input mode)
PC0-2=
NC.
PC3= ERROR.
PC4= SELECT.
PC5= PAPER OUT / Paper Empty.
PC6= ACKNOWLEDGE.
PC7= BUSY.



Basic programs:


PA port test (output):
(D0-D7 on the Centronics socket)

10 POKE 14339,128
; PA, PB and BC in ouput mode.
20 FOR I=0 TO 8
30 POKE 14336,2**I-1
; PA set to 1
40 PAUSE 40
; waiting 1 second.
50 NEXT I
60 STOP


PB port test (output):
(Control Register on the Centronics socket)

10 POKE 14339,128
; Set PA, PB and BC in outup mode.
20 FOR I=0 TO 8
30 POKE 14337,2**I-1
; PB mis à 1
40 PAUSE 40
; waiting 1 second.
50 NEXT I
60 STOP

N
ota: only D0 à D3 pins are used.


PC port test (output):
(Stat Register on the Centronics socket)

10 POKE 14339,128
; Set PA, PB and BC in output mode.
20 FOR I=0 TO 8
30 POKE 14338,2**I-1
; PC set to 1
40 PAUSE 40
; waiting 1 second.
50 NEXT I
60 STOP

N
ota: Only D3 à D7 pins are used in Read-Only mode.


PA port test (input):
(Datas Register on the Centronics socket)

10 POKE 14339,144
; Set PA to input mode ( «10010000»).
20 LET A=PEEK (14336) ; Read PA Port.
30 PRINT A
; Print PA port content in decimal value.
40 PAUSE 40
; waiting 1 second.
60 STOP

N
ota: Read D0 to D7 datas on the Centronics socket.


Assembler prgram :


PA port in input mode:
(Datas Register on the Centronics socket)

1 REM xxxxxxxxxxxxx (13 charcters)

org +16514
@PAIN = +144
; PA in input mode and 8255 validation.
@INIT = +14339
; Contol Register.
@ADDPA = +14336
; Datas address in PA port
LD HL,INIT
; Load HL with INIT value at 14339 (init. 8255)
LD (HL), PAIN ; Load 144 at 14339 address.
LD BC,(ADDPA) ; Read ADDPA (14336) content and load it to BC Register.
RET ; Return to Basic mode

33,3,56, 54,144 , 33,0,56, 237,75,0,56, 201

Print Rand USR 16514
; Display datas in PA ports (decimal). (= BC register)
Let E=Rand USR 16514
; E value is set with BC register value.




Tips:



Printers and terminals :

Pin 1 : Strobe. (Input)

Strob is usualy set to high level; low level if case of datas transfer.
This signal had to be send during 0,5µs to the connected terminal (Printer or computer).

Pin 2 à 9 : Datas pin D0 to D7. (Input -printer-)

Pin 10 : Acknowledge. (Output)
Set to low level if the printer is ready to receive datas.

Pin 11 : Busy. (Output)
Is set to 1 if your printer can't receive any datas.

Pin 12 : Paper Empty / Paper Out. (Output)
Is set to high level if the printer is out of paper.

Pin 13 : Select. (Output)
Is set to high level if the print is off-line.

Pin 14 : AutoFeed. (Input)
is set to low level if it had to add a blank line after the printed line.

Printers Only :
Pin 16 : Init. (Input)
Is set to high level to send a reinitialization data to clear buffer and reinitialize the printer.

Pin 15 : Error. (Output)
Is set to high level if the printer is off or if there is something wrong.

Pin 17 : Select In. (Input)
If set to high datas can be sent. (low level if the printer is off)


Kit n°2 :
IDE daughter card for your Zx81/TS1000
(using the Centronics card )

(Kit not experimented yet)
V1.0

Implantation : (XavSnap)
(Components side using straps wiring)


Zoomer...

Upper Connector to IDE device
Lower connector to Centronics 24 I/O card


Components side:

Zoomer...

PCB:
(époxy single side)
(Copper side)

Zoomer...
Note:
The 74hc139 connection « /reset » had to be specified.

PBC File: (XavSnap)

http://zx81.ordi5.free.fr/brico/centronic/images/IDE.ci




Driver and card emulation available on Vb81 XuR htt://zx81.vb81.free.fr


index #1:



Datasheet regard 8255 -

http://www.datasheetcatalog.com pour le 8255A de Intel.


index #2:




Index #3: