Download - 8051 ports
![Page 1: 8051 ports](https://reader033.vdocuments.site/reader033/viewer/2022061603/55522fa2b4c9054c668b51a0/html5/thumbnails/1.jpg)
![Page 2: 8051 ports](https://reader033.vdocuments.site/reader033/viewer/2022061603/55522fa2b4c9054c668b51a0/html5/thumbnails/2.jpg)
![Page 3: 8051 ports](https://reader033.vdocuments.site/reader033/viewer/2022061603/55522fa2b4c9054c668b51a0/html5/thumbnails/3.jpg)
A Pin of Port 1A Pin of Port 1
8051 IC
D Q
Clk Q
Vcc
Load(L1)
Read latch
Read pin
Write to latch
Internal CPU bus
M1
P1.X pinP1.X
TB1
TB2
P0.x
![Page 4: 8051 ports](https://reader033.vdocuments.site/reader033/viewer/2022061603/55522fa2b4c9054c668b51a0/html5/thumbnails/4.jpg)
Writing “1” to Output Pin P1.XWriting “1” to Output Pin P1.X
D Q
Clk Q
Vcc
Load(L1)
Read latch
Read pin
Write to latch
Internal CPU bus
M1
P1.X pinP1.X
8051 IC
2. output pin is Vcc1. write a 1 to the pin
1
0 output 1
TB1
TB2
![Page 5: 8051 ports](https://reader033.vdocuments.site/reader033/viewer/2022061603/55522fa2b4c9054c668b51a0/html5/thumbnails/5.jpg)
Writing “0” to Output Pin P1.XWriting “0” to Output Pin P1.X
D Q
Clk Q
Vcc
Load(L1)
Read latch
Read pin
Write to latch
Internal CPU bus
M1
P1.X pinP1.X
8051 IC
2. output pin is ground1. write a 0 to the pin
0
1 output 0
TB1
TB2
![Page 6: 8051 ports](https://reader033.vdocuments.site/reader033/viewer/2022061603/55522fa2b4c9054c668b51a0/html5/thumbnails/6.jpg)
Reading “High” at Input PinReading “High” at Input Pin
D Q
Clk Q
Vcc
Load(L1)
Read latch
Read pin
Write to latch
Internal CPU bus
M1
P1.X pin
P1.X
8051 IC
2. MOV A,P1
external pin=High1. write a 1 to the pin MOV
P1,#0FFH
1
0
3. Read pin=1 Read latch=0 Write to latch=1
1
TB1
TB2
![Page 7: 8051 ports](https://reader033.vdocuments.site/reader033/viewer/2022061603/55522fa2b4c9054c668b51a0/html5/thumbnails/7.jpg)
Reading “Low” at Input PinReading “Low” at Input Pin
D Q
Clk Q
Vcc
Load(L1)
Read latch
Read pin
Write to latch
Internal CPU bus
M1
P1.X pin
P1.X
8051 IC
2. MOV A,P1
external pin=Low1. write a 1 to the pin
MOV P1,#0FFH
1
0
3. Read pin=1 Read latch=0 Write to latch=1
0
TB1
TB2
![Page 8: 8051 ports](https://reader033.vdocuments.site/reader033/viewer/2022061603/55522fa2b4c9054c668b51a0/html5/thumbnails/8.jpg)
A Pin of Port 0A Pin of Port 0
8051 IC
D Q
Clk Q
Read latch
Read pin
Write to latch
Internal CPU bus
M1
P0.X pinP1.X
TB1
TB2
P1.x
![Page 9: 8051 ports](https://reader033.vdocuments.site/reader033/viewer/2022061603/55522fa2b4c9054c668b51a0/html5/thumbnails/9.jpg)
Port 0 with Pull-Up ResistorsPort 0 with Pull-Up Resistors
P0.0P0.1P0.2P0.3P0.4P0.5P0.6P0.7
DS5000
8751
8951
Vcc10 K
Port 0
![Page 10: 8051 ports](https://reader033.vdocuments.site/reader033/viewer/2022061603/55522fa2b4c9054c668b51a0/html5/thumbnails/10.jpg)
![Page 11: 8051 ports](https://reader033.vdocuments.site/reader033/viewer/2022061603/55522fa2b4c9054c668b51a0/html5/thumbnails/11.jpg)
![Page 12: 8051 ports](https://reader033.vdocuments.site/reader033/viewer/2022061603/55522fa2b4c9054c668b51a0/html5/thumbnails/12.jpg)
Port 3 Alternate FunctionsPort 3 Alternate Functions
1717RDRDP3.7P3.7
1616WRWRP3.6P3.6
1515T1T1P3.5P3.5
1414T0T0P3.4P3.4
1313INT1INT1P3.3P3.3
1212INT0INT0P3.2P3.2
1111TxDTxDP3.1P3.1
1010RxDRxDP3.0P3.0
PinPinFunctionFunctionP3 BitP3 Bit