SlideShare una empresa de Scribd logo
1 de 12
A Pin of Port 1

 Read latch                       Vcc
                          TB2
                                        Load(L1)


Internal CPU        D     Q                         P1.X
     bus             P1.X                            pin

Write to latch      Clk   Q             M1




                            TB1
  Read pin                                         P0.x
                                  8051 IC
Writing “1” to Output Pin P1.X

       Read latch                             Vcc
                                  TB2
                                                    Load(L1) 2. output pin is
1. write a 1 to the pin                                            Vcc
                          D     Q       1                          P1.X
     Internal CPU
          bus              P1.X                                     pin
                                          0                     output 1
     Write to latch       Clk   Q                   M1




                                    TB1
       Read pin


                                              8051 IC
Writing “0” to Output Pin P1.X

       Read latch                             Vcc
                                  TB2
                                                    Load(L1) 2. output pin is
1. write a 0 to the pin                                           ground
                          D     Q       0                          P1.X
     Internal CPU
          bus              P1.X                                     pin
                                          1                     output 0
     Write to latch       Clk   Q                   M1




                                    TB1
       Read pin


                                              8051 IC
Reading “High” at Input Pin

        Read latch                                       Vcc                2. MOV A,P1
                                           TB2                             external pin=High
1.   write a 1 to the pin MOV                                   Load(L1)
             P1,#0FFH

                                                     1                1        P1.X pin
     Internal CPU bus           D      Q
                                    P1.X
                                                     0         M1
       Write to latch           Clk        Q




                                               TB1
          Read pin
3. Read pin=1 Read latch=0
      Write to latch=1
                                                           8051 IC
Reading “Low” at Input Pin

           Read latch                                 Vcc                2. MOV A,P1
                                            TB2
   1.     write a 1 to the pin                               Load(L1)   external pin=Low
         MOV P1,#0FFH
                                                  1                0        P1.X pin
        Internal CPU bus         D      Q
                                     P1.X
                                                  0         M1
         Write to latch          Clk        Q




                                            TB1
          Read pin
3. Read pin=1 Read latch=0
      Write to latch=1
                                                        8051 IC
A Pin of Port 0

 Read latch
                          TB2



Internal CPU        D     Q                  P0.X
     bus             P1.X                     pin

Write to latch      Clk   Q          M1




                            TB1
  Read pin                                  P1.x

                                  8051 IC
Port 0 with Pull-Up Resistors

      Vcc
                            10 K

       P0.0
DS5000 P0.1




                            Port 0
       P0.2
 8751  P0.3
 8951  P0.4
       P0.5
       P0.6
       P0.7
Port 3 Alternate Functions
 P3 Bit   Function   Pin

 P3.0     RxD        10
 P3.1     TxD        11
 P3.2     INT0       12
 P3.3     INT1       13
 P3.4     T0         14
 P3.5     T1         15
 P3.6     WR         16
 P3.7     RD         17      

Más contenido relacionado

La actualidad más candente (20)

Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontroller
 
EMBEDDED SYSTEMS 2&3
EMBEDDED SYSTEMS 2&3EMBEDDED SYSTEMS 2&3
EMBEDDED SYSTEMS 2&3
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Microcontroller 8051 By Mitesh kumar
Microcontroller 8051 By Mitesh kumarMicrocontroller 8051 By Mitesh kumar
Microcontroller 8051 By Mitesh kumar
 
Microcontroller 8051 third
Microcontroller 8051  thirdMicrocontroller 8051  third
Microcontroller 8051 third
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
8051 book
8051 book8051 book
8051 book
 
Microcontroller ppt
Microcontroller pptMicrocontroller ppt
Microcontroller ppt
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
AT89C52 Data sheet
AT89C52 Data sheetAT89C52 Data sheet
AT89C52 Data sheet
 
At89 s8252
At89 s8252At89 s8252
At89 s8252
 
Embedded systems io programming
Embedded systems   io programmingEmbedded systems   io programming
Embedded systems io programming
 
8051 interrupts
8051 interrupts8051 interrupts
8051 interrupts
 
8051
80518051
8051
 
Class8
Class8Class8
Class8
 
Atmel
AtmelAtmel
Atmel
 
Programming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontrollerProgramming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontroller
 
Class9
Class9Class9
Class9
 
Unit iv introduction to 8051 microcontroller ppts
Unit iv introduction to 8051 microcontroller pptsUnit iv introduction to 8051 microcontroller ppts
Unit iv introduction to 8051 microcontroller ppts
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 

Similar a 8051 ports

Similar a 8051 ports (8)

8051 full ppt
8051 full ppt8051 full ppt
8051 full ppt
 
Alive human detector
Alive human detectorAlive human detector
Alive human detector
 
Logic families
Logic familiesLogic families
Logic families
 
SPICE MODEL of NJM2374A in SPICE PARK
SPICE MODEL of NJM2374A in SPICE PARKSPICE MODEL of NJM2374A in SPICE PARK
SPICE MODEL of NJM2374A in SPICE PARK
 
Ee2 chapter17 monstable_operation
Ee2 chapter17 monstable_operationEe2 chapter17 monstable_operation
Ee2 chapter17 monstable_operation
 
Hardware combinational
Hardware combinationalHardware combinational
Hardware combinational
 
Class7
Class7Class7
Class7
 
Logic families ppt eceb srp
Logic families ppt eceb srpLogic families ppt eceb srp
Logic families ppt eceb srp
 

8051 ports

  • 1.
  • 2.
  • 3. A Pin of Port 1 Read latch Vcc TB2 Load(L1) Internal CPU D Q P1.X bus P1.X pin Write to latch Clk Q M1 TB1 Read pin P0.x 8051 IC
  • 4. Writing “1” to Output Pin P1.X Read latch Vcc TB2 Load(L1) 2. output pin is 1. write a 1 to the pin Vcc D Q 1 P1.X Internal CPU bus P1.X pin 0 output 1 Write to latch Clk Q M1 TB1 Read pin 8051 IC
  • 5. Writing “0” to Output Pin P1.X Read latch Vcc TB2 Load(L1) 2. output pin is 1. write a 0 to the pin ground D Q 0 P1.X Internal CPU bus P1.X pin 1 output 0 Write to latch Clk Q M1 TB1 Read pin 8051 IC
  • 6. Reading “High” at Input Pin Read latch Vcc 2. MOV A,P1 TB2 external pin=High 1. write a 1 to the pin MOV Load(L1) P1,#0FFH 1 1 P1.X pin Internal CPU bus D Q P1.X 0 M1 Write to latch Clk Q TB1 Read pin 3. Read pin=1 Read latch=0 Write to latch=1 8051 IC
  • 7. Reading “Low” at Input Pin Read latch Vcc 2. MOV A,P1 TB2 1. write a 1 to the pin Load(L1) external pin=Low MOV P1,#0FFH 1 0 P1.X pin Internal CPU bus D Q P1.X 0 M1 Write to latch Clk Q TB1 Read pin 3. Read pin=1 Read latch=0 Write to latch=1 8051 IC
  • 8. A Pin of Port 0 Read latch TB2 Internal CPU D Q P0.X bus P1.X pin Write to latch Clk Q M1 TB1 Read pin P1.x 8051 IC
  • 9. Port 0 with Pull-Up Resistors Vcc 10 K P0.0 DS5000 P0.1 Port 0 P0.2 8751 P0.3 8951 P0.4 P0.5 P0.6 P0.7
  • 10.
  • 11.
  • 12. Port 3 Alternate Functions P3 Bit Function Pin P3.0 RxD 10 P3.1 TxD 11 P3.2 INT0 12 P3.3 INT1 13 P3.4 T0 14 P3.5 T1 15 P3.6 WR 16 P3.7 RD 17 