Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN
HANEL
PROGRAMMING THE 8255Address Aliases(cont’)
Example 15-4For Figure 15-6.(a) Find the I/O port addresses assigned to ports A, B, C, and thecontrol register.(b) Find the control byte for PA = out, PB = out, PC0 – PC3 = in, andPC4 – PC7 =out(c) Write a program to get data from PB and send it to PA. In addition,data from PCL is sent out to PCU.Solution:(a)
The port addresses are as follows:CS A1 A0Address Port0010 00 0 0 20H Port A0010 00 0 1 21H Port B0010 00 1 0 22H Port C0010 00 1 1 23H Control Reg
(a)The control word is 10000011, or 83H.