Difference between revisions of "8255"

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search
Line 1: Line 1:
 +
== The 8255 in the CPC ==
 +
 
The 8255 is a general purpose input/output IC. This document will describe it's role in the Amstrad CPC,CPC+ and KC compact systems. To understand it's full functions please read the datasheet.
 
The 8255 is a general purpose input/output IC. This document will describe it's role in the Amstrad CPC,CPC+ and KC compact systems. To understand it's full functions please read the datasheet.
  
Line 42: Line 44:
  
 
* If you are using the firmware, always return the operating modes and I/O state of the ports used to their settings below. The firmware expects the settings to be the same as given below and may operate incorrectly if they are not.  
 
* If you are using the firmware, always return the operating modes and I/O state of the ports used to their settings below. The firmware expects the settings to be the same as given below and may operate incorrectly if they are not.  
 
  
 
=== PPI Port A ===
 
=== PPI Port A ===
Line 56: Line 57:
 
* for reading data from PSG all bits must be set to input.  
 
* for reading data from PSG all bits must be set to input.  
  
 +
=== PPI Port B ===
 +
 +
Operating system settings:
 +
 +
* I/O Mode 0,
 +
* Input
 +
 +
 +
Note:
 +
 +
1. On CPC464,CPC664,CPC6128 and GX4000 this is LK3 on the PCB. On the CPC464+ and CPC6128+ this is LK103 on the PCB. On the KC compact this is "1".
 +
 +
2. On CPC464,CPC664,CPC6128 and GX4000 this is LK2 on the PCB. On the CPC464+ and CPC6128+ this is LK102 on the PCB. On the KC compact this is "0".
 +
 +
3. On CPC464,CPC664,CPC6128 and GX4000 this is LK1 on the PCB. On the CPC464+ and CPC6128+ this is LK101 on the PCB. On the KC compact this is /TEST signal from the expansion port.
 +
 +
4. On the CPC464,CPC664,CPC6128,CPC464+,CPC6128+ and GX4000 bits 3,2 and 1 define the manufacturer name. See below to see the options available. The manufacturer name is defined on the PCB and cannot be changed through software.
 +
 +
5. On the CPC464,CPC664,CPC6128,CPC464+,CPC6128+ and GX4000 bit 4 defines the Screen refresh frequency. "1" = 50Hz, "0" = 60Hz. This is defined on the PCB and cannot be changed with software. On the KC compact bit 4 is "1"
 +
 +
6. This bit is connected to /EXP signal on the expansion port.
 +
* On the KC Compact this bit is used to define bit 7 of the printer data.
 +
* On the CPC, it is possible to use this bit to define bit 7 of the printer data, so a 8-bit printer port is made, with a hardware modification,
 +
* On the CPC this can be used by a expansion device to report it's presence. "1" = device connected, "0" = device not connected. This is not always used by all expansion devices.
 +
 +
Table showing manufacturer name on power-up (CPC and CPC+ only):
  
 
[Image:8255 ppi 1.jpg]]
 
[Image:8255 ppi 1.jpg]]
= Resources ==  
+
 
 +
= Resources =
  
 
[[Media: |Datasheet of the 8255]]
 
[[Media: |Datasheet of the 8255]]

Revision as of 04:11, 30 March 2008

The 8255 in the CPC

The 8255 is a general purpose input/output IC. This document will describe it's role in the Amstrad CPC,CPC+ and KC compact systems. To understand it's full functions please read the datasheet.

In these systems it is connected to the AY-3-8912 Programmable Sound Generator (PSG), keyboard, cassette recorder, the VSYNC of the 6845 CRTC and the "busy" signal from the parallel port.

The PPI is selected when bit 11 of the I/O port address is set to "0", bits 9 and 8 then define the PPI function access as shown below:

Bit 9 Bit 8 Description Read/Write status
0 0 Port A Data Read/Write
0 1 Port B Data Read/Write
1 0 Port C Data Read/Write
1 1 Control Write Only

It is advised that the remaining bits of the I/O address are set to "1" to avoid conflict with other devices. The recommended I/O addressess are:

I/O address PPI Function
&F4xx Port A data
&F5xx Port B data
&F6xx Port C data
&F7xx Control

In the CPC+, the 8255 is integrated into the ASIC. The "emulation" is not complete and some functionality is not available. Please see the "Extra CPC+ documentation" for more information.

  • Mode 1 (Strobed Input/Output) and Mode 2 (Bi-Directional Bus), as far as I know, are not used by any program, Mode 0 (Basic Input/Output) is always used.

Port Usage

NOTE

  • If you are using the firmware, always return the operating modes and I/O state of the ports used to their settings below. The firmware expects the settings to be the same as given below and may operate incorrectly if they are not.

PPI Port A

Operating system settings:

  • I/O Mode 0,
  • Output

NOTE:

  • For writing data to PSG all bits must be set to output,
  • for reading data from PSG all bits must be set to input.

PPI Port B

Operating system settings:

  • I/O Mode 0,
  • Input


Note:

1. On CPC464,CPC664,CPC6128 and GX4000 this is LK3 on the PCB. On the CPC464+ and CPC6128+ this is LK103 on the PCB. On the KC compact this is "1".

2. On CPC464,CPC664,CPC6128 and GX4000 this is LK2 on the PCB. On the CPC464+ and CPC6128+ this is LK102 on the PCB. On the KC compact this is "0".

3. On CPC464,CPC664,CPC6128 and GX4000 this is LK1 on the PCB. On the CPC464+ and CPC6128+ this is LK101 on the PCB. On the KC compact this is /TEST signal from the expansion port.

4. On the CPC464,CPC664,CPC6128,CPC464+,CPC6128+ and GX4000 bits 3,2 and 1 define the manufacturer name. See below to see the options available. The manufacturer name is defined on the PCB and cannot be changed through software.

5. On the CPC464,CPC664,CPC6128,CPC464+,CPC6128+ and GX4000 bit 4 defines the Screen refresh frequency. "1" = 50Hz, "0" = 60Hz. This is defined on the PCB and cannot be changed with software. On the KC compact bit 4 is "1"

6. This bit is connected to /EXP signal on the expansion port.

  • On the KC Compact this bit is used to define bit 7 of the printer data.
  • On the CPC, it is possible to use this bit to define bit 7 of the printer data, so a 8-bit printer port is made, with a hardware modification,
  • On the CPC this can be used by a expansion device to report it's presence. "1" = device connected, "0" = device not connected. This is not always used by all expansion devices.

Table showing manufacturer name on power-up (CPC and CPC+ only):

[Image:8255 ppi 1.jpg]]

Resources

[[Media: |Datasheet of the 8255]]

Links

about the 8255ppi