Home > Control Circuits >Microcontroller > stc89c52 pin diagram and stc89c52 microcontroller pin function description

stc89c52 pin diagram and stc89c52 microcontroller pin function description

Source: InternetPublisher:通通 Updated: 2021/03/31

stc89c52rc is a low-power, high-performance CMOS 8-bit microcontroller produced by STC Company. It has an 8K-byte system programmable and erasable read-only memory. Let's take a look at the stc89c52 pin diagram and the pin functions of the stc89c52 microcontroller .


stc89c52 pin diagram

stc89c52 pin diagram


stc89c52 pin function description


1. Main power supply pins VCC and VSS 


The power supply VCC is connected to +5V, and VSS is connected to the ground terminal, which is the common reference ground.


2. Clock circuit pins XTAL1 and XTAL2


There is an inverting amplifier inside the STC89C52 chip. XTAL1 is the input terminal of the amplifier; XTAL2 is the output terminal of the amplifier and the input terminal of the internal clock generator.


When using the self-oscillation mode, XTAL1 and XTAL2 are externally connected to a quartz crystal oscillator , and the internal oscillator oscillates according to the crystal oscillator frequency to generate a clock signal.


3.Control signal pin


(1)RST——Reset input. When the oscillator is working, a high level on the RST pin for more than two machine cycles will reset the microcontroller.


(2) ALE/PROG - When accessing external program memory or data memory, the ALE (address latch enable) output pulse is used to latch the lower 8-bit byte of the address. Under normal circumstances, ALE still outputs a fixed pulse signal at 1/6 of the clock oscillation frequency, so it can output a clock externally or be used for timing purposes. Note: An ALE pulse will be skipped whenever external data memory is accessed. (generally not used)


(3) PSEN - Program storage enable (PSEN) output is the read strobe signal of the external program memory. When the STC89C52 fetches instructions (or data) from the external program memory, PSEN is valid twice per machine cycle, that is, two outputs are pulse, during which the PSEN signal will be skipped twice when accessing external data memory.


(4) EA/VPP - External access is allowed. To enable the CPU to only access the external program memory (address 0000H-FFFFH), the EA terminal must remain low (grounded). It should be noted that if the encryption bit LB1 is programmed, the EA terminal status will be latched internally during reset. If the EA terminal is high level (connected to the Vcc terminal), the CPU executes the instructions in the internal program memory. When programming FLASH memory, add +12V programming permission power Vpp to this pin. Of course, this must be that the device uses 12V programming voltage Vpp.


(5) Parallel I/O port P0~P3 pins


①P0 port (P0.0~P0.7) 8-bit drain switching bidirectional I/O port. It can be used as a general-purpose I/O port, but a pull-up resistor must be added.

②P1 port (P1.0~P1.7) is an 8-bit quasi-bidirectional I/O port with internal pull-up resistor.

③P2 port (P2.0~P2.7) is an 8-bit quasi-bidirectional I/O port with internal pull-up resistor.

④P3 port (P3.0~P3.7) is an 8-bit multi-functional bidirectional I/O port with internal pull-up resistor.


The above is the stc89c52 pin diagram and stc89c52 pin function description. I hope it will be helpful to everyone.

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号