ppi280 ppi
The 8255 IC is a Programmable Peripheral Interface which is used to interface the microprocessor with other computer devices (Input-output devices). The mode in which the 8255 works defines the functioning of it in that mode. There are 2 modes in which the 8255 works:
8255 IC是一个可编程外围接口,用于将微处理器与其他计算机设备(输入输出设备)接口。 8255的工作模式定义了它在该模式下的功能。 8255在两种模式下工作:
8255模式 (8255 Modes)
BSR Mode (Bit Set Reset Mode)
BSR模式(位设置重置模式)
IO Mode (Input-Output Mode)
IO模式(输入输出模式)
As we know that the control word is responsible for the working of the 8255 IC as it instructs the IC what function is to be performed. The control word pins are formed 27 to 34 (named D7- D0).
众所周知,控制字负责8255 IC的工作,因为它指示IC要执行什么功能。 控制字引脚形成为27至34(命名为D7-D0)。
The MSB (Most Significant Bit) of the Control word, i.e. D7 (pin 34) decides the mode. If it is reset (i.e. 0), then our 8255 IC is in the BSR mode. Else, if the MSB is set, (i.e. 1) then our IC is in the IO mode.
控制字的MSB(最高有效位),即D7(引脚34)决定模式。 如果将其重置(即0),则我们的8255 IC处于BSR模式。 否则,如果设置了MSB(即1),则我们的IC处于IO模式。
1)BSR模式 (1) BSR mode)
For the BSR mode, the MSB of the control word must be 0. The BSR mode handles only the bit set and resets operations for port C: PC0 to PC7 (both upper and lower). In this mode, the IC functions in such a way that it can assign any binary value to any bit of the Port C.
对于BSR模式,控制字的MSB必须为0。BSR模式仅处理位设置,并将端口C的操作复位:PC0至PC7(上下)。 在这种模式下,IC的功能是可以将任何二进制值分配给端口C的任何位。
2)IO模式 (2) IO Mode)
The Input-Output mode, unlike the BSR mode, handles different other ports as well. There is further categorization for the IO mode:
与BSR模式不同,输入输出模式也可以处理其他端口。 IO模式还有进一步的分类:
Mode 0: Simple Input- Output Mode or IO without Handshake
模式0:简单输入输出模式或无握手的IO
In this mode, all the ports, i.e. port A, port B, and port C are used for transferring the data. No port, in this case, performs the handshaking function and all of them act as an Input-Output port.
在此模式下,所有端口(即端口A,端口B和端口C)均用于传输数据。 在这种情况下,没有端口执行握手功能,并且所有端口都充当输入-输出端口。
Mode 1: I/O with Handshake or Strobed I/O
模式1:具有握手或交错式I / O的I / O
In this mode, the port A and port C act as the Input-Output ports but the port C is used for handshaking. Hence, the data in this mode can flow only through port A and port B.
在此模式下,端口A和端口C充当输入-输出端口,但端口C用于握手。 因此,此模式下的数据只能流经端口A和端口B。
Mode 2: Bidirectional I/O
模式2:双向I / O
In this mode, the data transfer is bidirectional but only for port A. Simultaneously, the port B can either be in mode 1 or mode 0 and the port C performs its function of handshaking.
在这种模式下,数据传输是双向的,但仅用于端口A。同时,端口B可以处于模式1或模式0,并且端口C执行其握手功能。
ppi280 ppi