Commonly used header files in C51 microcontrollers

Publisher:zhihuaLatest update time:2016-09-07 Source: eefocusKeywords:C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
通常有reg51.h,reg52.h,math.h, ctype.h, stdio.h, stdlib.h, absacc.h, intrins.h 。
But the commonly used ones are only reg51.h or reg52.h, math.h.
reg51.h and reg52.h define the special function registers and bit registers of 51 microcontroller or 52 microcontroller. Most of the contents in these two header files are the same. The 52 microcontroller has one more timer T2 than the 51 microcontroller. Therefore, reg52.h has a few more lines than reg51.h to define the contents of the T2 register.
math.h defines commonly used mathematical operations, such as absolute value, square root, sine and cosine, etc. This header file contains various mathematical operation functions, and we can directly call its internal functions when we need to use them.
 
The main contents that should be mastered when learning microcontrollers:
(1) Necessary conditions for the operation of the minimum microcontroller system: 1. Power supply; 2. Crystal oscillator; 3. Reset circuit.
(2) Master the operation of any I/O port of the microcontroller: 1. Output control level; 2. Input detection level.
(3) Timer: Focus on the most commonly used method 2.
(4) Interrupts: Master external interrupts, timer interrupts, and serial port interrupts.
(5) Serial port communication: Master the communication between MCUs and between MCUs and computers.
After mastering the above knowledge, it can be said that everyone has basically mastered the microcontroller. Other knowledge is expanded on the basis of these knowledge points. As long as everyone is willing to actively try and is good at drawing inferences from one example, they can quickly master the knowledge related to the microcontroller.
Keywords:C51 Reference address:Commonly used header files in C51 microcontrollers

Previous article:Using 51 single chip microcomputer to make 4-way buzzer
Next article:MCU realizes 7-segment digital tube display

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号