On 10/06/2018 02:36, Pete Rittwage wrote: > What if you write to it without bit7 set? Then it doesn't change the direction. PPI Control This register has two different functions depending on bit7 of the data written to this register. PPI Control with Bit7=1 If Bit 7 is "1" then the other bits will initialize Port A-B as Input or Output: Bit 0 IO-Cl Direction for Port C, lower bits (always 0=Output in CPC) Bit 1 IO-B Direction for Port B (always 1=Input in CPC) Bit 2 MS0 Mode for Port B and Port Cl (always zero in CPC) Bit 3 IO-Ch Direction for Port C, upper bits (always 0=Output in CPC) Bit 4 IO-A Direction for Port A (0=Output, 1=Input) Bit 5,6 MS0,MS1 Mode for Port A and Port Ch (always zero in CPC) Bit 7 SF Must be "1" to setup the above bits * CAUTION: Writing to PIO Control Register (with Bit7 set), automatically resets PIO Ports A,B,C to 00h each! * In the CPC only Bit 4 is of interest, all other bits are always having the same value. In order to write to the PSG sound registers, a value of 82h must be written to this register. In order to read from the keyboard (through PSG register 0Eh), a value of 92h must be written to this register. PPI Control with Bit7=0 Otherwise, if Bit 7 is "0" then the register is used to set or clear a single bit in Port C: Bit 0 B New value for the specified bit (0=Clear, 1=Set) Bit 1-3 N0,N1,N2 Specifies the number of a bit (0-7) in Port C Bit 4-6 - Not Used Bit 7 SF Must be "0" in this caseReceived on 2018-06-10 10:00:04
Archive generated by hypermail 2.2.0.