4235H–8051–10/06
9 3 29 20 8 I/O P1.7: Input/Output:
I/O CEX4: Capture/Compare External I/O for PCA module 4
I/O MOSI: SPI Master Output Slave Input line
When SPI is in master mode, MOSI outputs data t o the slave peripheral.
When SPI is in slave mo de, MOSI receives data from the mast er cont rol-
ler.
XTALA1 21 15 49 38 19 I XTALA 1: Input to the inverting oscillato r amplifier and input to the inter-
nal clock generator circuits.
XTALA2 20 14 48 37 18 O XTALA 2: Output from the inverting oscillator amplifier
P2.0 - P2.7 24 - 31 18 - 25
54, 55,
56, 58,
59, 61,
64, 65
43, 44 ,
45, 47 ,
48, 50 ,
53, 54
I/O
Po rt 2 : P ort 2 i s an 8 - bi t bid ir ect i ona l I/O po r t wit h int er nal pu ll -up s . P or t 2
pins that have 1s written to the m are pulled high by the int ernal pull-ups
and can be used as inputs . As inputs, Port 2 pins that are externally
pulled low w ill source current because of the int ernal pull-ups. Port 2
emits the high-order address byte during fet ches fr om external program
memory and during acce sses to external data memory that use 16-bit
addresses (MOVX @DP TR ).In this application, it uses strong internal
pull-ups emitting 1s. During accesses to external data memory that use
8-bit addresses (MOVX @Ri), port 2 emits the contents of the P2 SF R.
21-28
P3.0 - P3.7 11,
13 - 19 5,
7 - 13
34, 39,
40, 41,
42, 43,
45, 47
25, 28 ,
29, 30 ,
31, 32 ,
34, 36
10-17 I/O Po rt 3 : Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. Port 3
pins that have 1s written to the m are pulled high by the int ernal pull-ups
and can be used as inputs . As inputs, Port 3 pins that are externall y
pulled low will source current because of the internal pull-ups. Port 3 also
serves the special features of the 80C51 family, as listed below .
115342510IRXD (P3.0): Serial input port
137392811OTXD (P3.1): Serial ou tp ut po r t
148402912IINT0 (P3.2): External interrupt 0
159413013IINT1 (P3.3): External interrupt 1
16 10 42 31 14 I T0 (P3.4): Timer 0 exter nal input
17 11 43 32 15 I T1 (P3.5): Timer 1 external input
18 12 45 34 16 O WR (P3.6): Extern al data memory write strobe
19 13 47 36 17 O RD (P3. 7) : External data memory read strobe
P4.0 - P4.7 --
20, 24,
26, 44,
46, 50,
53, 57
11, 15,
17,33,
35,39,
42, 46
-I/O
Po rt 4 : Port 4 is an 8-bit bidirectional I/O port with internal pull-ups. Port 3
pins that have 1s written to the m are pulled high by the int ernal pull-ups
and can be used as inputs . As inputs, Port 3 pins that are externall y
pulled low w ill source current because of the int ernal pull-ups.
P5.0 - P5.7 --
60, 62,
63, 7, 8,
10, 13,
16
49, 51 ,
52, 62 ,
63, 1, 4,
7
-I/O
Po rt 5 : Port 5 is an 8-bit bidirectional I/O port with internal pull-ups. Port 3
pins that have 1s written to the m are pulled high by the int ernal pull-ups
and can be used as inputs . As inputs, Port 3 pins that are externall y
pulled low w ill source current because of the int ernal pull-ups.
RST 10 4 30 21 9 I
Reset: A high on this pin for two machine cycles while the oscillator is
running, resets the device. An internal diffused resistor to VSS permi ts a
power-on reset using only an ext ernal capacito r to VCC. This pin is an out-
put w hen the hardware watchdog force s a system r eset.
Tab le 13. Pin Description (Continued)
Mnemonic
Pin Number Type Name and FunctionPLCC44 VQFP44 PLCC68 VQFP64 PDIL40