Definition of MCU output pins

Publisher:VelvetWhisperLatest update time:2016-09-28 Source: eefocusKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
After the microcontroller is reset, do some undefined (unused floating pins) pins have any level output? Are they all high level or low level, or high impedance, or no signal?

I have another question. I want to change the compiler of KEIL 51 programming software. How should I change it?

 

1. For the traditional 51 MCU, after reset, all ports output 1, that is, high level. For AVR MCU, PORTx=0x00, DDRx=0x00 is in high impedance state, and the same is true for PIC MCU.

2. If you want to control the LED, you should connect it in reverse, that is, the LED will be lit when the port outputs 0. In addition, for the commonly used 51 MCU, the current output of high level is small, while the current absorbed by low level is large. This is what you need to know. Of course, STC's MCU uses a push-pull port, which can withstand a large current when outputting 1 or 0.

3. Of course, after the MCU is reset, the port state is a certain high level (such as 51 MCU) or high impedance (AVR, etc.). It is not wrong to initialize it in the program! Some compilers can automatically generate code (such as the CVAVR compiler of AVR MCU), and they all initialize the port to high impedance at the beginning of the program. If you want to save code space, you can remove these codes.

4. In addition to Keil UV2, IAR for 8051 compiler is also good, but I think IAR's compiler is mainly aimed at enhanced microcontrollers such as C8051F series and CC2430. For ordinary microcontrollers... it seems to be a waste of talent!
Keywords:MCU Reference address:Definition of MCU output pins

Previous article:Introduction to the Principle of MCU Simulator
Next article:MCU digital filter program

Latest Microcontroller Articles
Change More Related Popular Components

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号