Hello!
I'm building a Z80 interfacing a PC IBM MS Excel via PIO 8255 through the Standard Parallel Port
Here some details:
(#) Homemade Z80 training board
(#) PIO interface: 82C55 in Mode 0, Control Code: 98H
- Port A : input 4 bit
- Port B : output 4 bit
- Port C (hi): 1 bit input handshaking
- Port C (low): 1 bit output handshaking
(#) PC Interface: printer port SPP (Standard Parallel Port - 25 pin)
(#) IBM PC frontend GUI Interface: MS Excel, VBA programs
(#) IBM PC laguage: Visual Basic 6
(#) Z80 frontend interface: hexadecimal keyboard, 6 digits hex displays, assembly routines
(#) Z80 language: machine code/assembly
(#) DLL needed for Windows XP: INPOUT32.DLL
(#) Electronic HW protection: optoisolator (NEC PS2502) between 82C55 and the IBM PC
(#) Cable interface: 25 pin Parallel Printer Flat Cable.
pin 02 : PC_Out / Z80_In - Data Bit 0 (680 ohm-5ma)
pin 03 : PC_Out / Z80_In - Data Bit 1 (680 ohm-5ma)
pin 04 : PC_Out / Z80_In - Data Bit 2 (680 ohm-5ma)
pin 05 : PC_Out / Z80_In - Data Bit 3 (680 ohm-5ma)
pin 06 : PC_Out / Z80_In - Nibble Mode Handshake Signal (680 ohm-5ma) (Host_busy or Ack_to_host)
pin 07 : PC_Out - 5V Optocoupler # 1 PowerSupply (4700 ohm-5ma)
pin 08 : PC_Out - 5V Optocoupler # 2 PowerSupply (4700 ohm-5ma)
pin 09 : PC_Out - 5V Optocoupler # 3 PowerSupply (4700 ohm-5ma)
pin 16 : PC_Out - 5V Optocoupler # 4 PowerSupply (4700 ohm-5ma)
pin 17 : PC_Out - 5V Optocoupler # 5 PowerSupply (4700 ohm-5ma) (!HW inverted)
pin 15 : PC_In / Z80_Out - Data Bit 0
pin 13 : PC_In / Z80_Out - Data Bit 1
pin 12 : PC_In / Z80_Out - Data Bit 2
pin 10 : PC_In / Z80_Out - Data Bit 3
pin 11 : PC_In / Z80_Out - Nibble Mode Handshake Signal (Ack_to_host or Host_busy ) (!HW inverted)
pin 18 : Return Optocoupler Ground (Common Gnd)
...
pin 25 : Return Optocoupler Ground (Common Gnd)
(#) Communication Protocol: bi-directional one byte (8 bit data tranfer) by sending 2 nibbles (4-bits) of information in two data transfer cycles.
The software must read the Handshake Signal and then manipulate the bits in order to get a correct byte.
The major advantage of this protocol is the ability to operate on all PCs that have a parallel port.
But there is a severe limitation of bytes per second for this type of data transfer. I'm also thinking about a simple error-checking scheme
(#) Error detection and Error correction scheme: I will probably choose the Repetition codes in FEC mode (forward error correction). The 8 bit word is sent three number of times. The receiver choose the value that occurs more frequently. This allows the receiver to detect and correct errors without the need to ask the sender for additional data. Repetition codes generally offer very poor data transfer rate but is very easy to implement.
The HW is done and working 100% , now i'm writing the protocol and the programs/routines for both the PC (in Visual Basic) and Z80 (Assembly).
First project: download into Excel the Z80 ROM data content.
Z80 BOARD INTERFACE
Please let me know any yr comment if you like.
I'm building a Z80 interfacing a PC IBM MS Excel via PIO 8255 through the Standard Parallel Port
Here some details:
(#) Homemade Z80 training board
(#) PIO interface: 82C55 in Mode 0, Control Code: 98H
- Port A : input 4 bit
- Port B : output 4 bit
- Port C (hi): 1 bit input handshaking
- Port C (low): 1 bit output handshaking
(#) PC Interface: printer port SPP (Standard Parallel Port - 25 pin)
(#) IBM PC frontend GUI Interface: MS Excel, VBA programs
(#) IBM PC laguage: Visual Basic 6
(#) Z80 frontend interface: hexadecimal keyboard, 6 digits hex displays, assembly routines
(#) Z80 language: machine code/assembly
(#) DLL needed for Windows XP: INPOUT32.DLL
(#) Electronic HW protection: optoisolator (NEC PS2502) between 82C55 and the IBM PC
(#) Cable interface: 25 pin Parallel Printer Flat Cable.
pin 02 : PC_Out / Z80_In - Data Bit 0 (680 ohm-5ma)
pin 03 : PC_Out / Z80_In - Data Bit 1 (680 ohm-5ma)
pin 04 : PC_Out / Z80_In - Data Bit 2 (680 ohm-5ma)
pin 05 : PC_Out / Z80_In - Data Bit 3 (680 ohm-5ma)
pin 06 : PC_Out / Z80_In - Nibble Mode Handshake Signal (680 ohm-5ma) (Host_busy or Ack_to_host)
pin 07 : PC_Out - 5V Optocoupler # 1 PowerSupply (4700 ohm-5ma)
pin 08 : PC_Out - 5V Optocoupler # 2 PowerSupply (4700 ohm-5ma)
pin 09 : PC_Out - 5V Optocoupler # 3 PowerSupply (4700 ohm-5ma)
pin 16 : PC_Out - 5V Optocoupler # 4 PowerSupply (4700 ohm-5ma)
pin 17 : PC_Out - 5V Optocoupler # 5 PowerSupply (4700 ohm-5ma) (!HW inverted)
pin 15 : PC_In / Z80_Out - Data Bit 0
pin 13 : PC_In / Z80_Out - Data Bit 1
pin 12 : PC_In / Z80_Out - Data Bit 2
pin 10 : PC_In / Z80_Out - Data Bit 3
pin 11 : PC_In / Z80_Out - Nibble Mode Handshake Signal (Ack_to_host or Host_busy ) (!HW inverted)
pin 18 : Return Optocoupler Ground (Common Gnd)
...
pin 25 : Return Optocoupler Ground (Common Gnd)
(#) Communication Protocol: bi-directional one byte (8 bit data tranfer) by sending 2 nibbles (4-bits) of information in two data transfer cycles.
The software must read the Handshake Signal and then manipulate the bits in order to get a correct byte.
The major advantage of this protocol is the ability to operate on all PCs that have a parallel port.
But there is a severe limitation of bytes per second for this type of data transfer. I'm also thinking about a simple error-checking scheme
(#) Error detection and Error correction scheme: I will probably choose the Repetition codes in FEC mode (forward error correction). The 8 bit word is sent three number of times. The receiver choose the value that occurs more frequently. This allows the receiver to detect and correct errors without the need to ask the sender for additional data. Repetition codes generally offer very poor data transfer rate but is very easy to implement.
The HW is done and working 100% , now i'm writing the protocol and the programs/routines for both the PC (in Visual Basic) and Z80 (Assembly).
First project: download into Excel the Z80 ROM data content.
Z80 BOARD INTERFACE
Please let me know any yr comment if you like.