【51 MCU】Summary of basic knowledge of the exam (pins)

Publisher:古泉痴迷者Latest update time:2021-06-22 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Examination scope:

  • Optional reading book after-class exercises

  • Main question:

  1. Pure programming: In the first four experiments, multiplication is not tested.

  2. Interrupt, timer T1: square wave book example 5-1, can also be implemented in C language

  3. Display, keyboard: 8-bit/16-bit (independent/matrix keyboard, Scanner)

  4. 0832/0809 Example 10-1 (1) (2) (3) 10-6, 10-6 above program (square wave, rectangular wave)

  5. Chapter 8, Expansion Chart, "Just know how to do the content of Lecture 14"

Serial Port:

  • AFTER:

    • When the external memory is expanded, it is used as the data bus, DB

    • When not expanded, it can be used as a general I/O, but there is no internal pull-up resistor. When used as input or output, an external pull-up resistor should be connected.

  • P1 port:

    • Only used as I/O port: it has a pull-up resistor inside.

  • The P2 port has two functions:

    • When expanding external memory, it is used as an address bus, AB

    • Used as a general I/O port, it has a pull-up resistor inside;

  • The P3 port has two functions:

    • In addition to being used as IO,

    • There are also some special functions, which are set by special registers (RXD, TXD, external interrupt input INT1/0, WR, RD)

  • RST: Reset terminal. (2Ts reset, power-on reset, key pulse reset, key level reset)

  • XTAL1, XTAL2: Clock input, external crystal oscillator circuit or pulse circuit

  • ALE: low 8 bits, data

  • EA:ROM,

    • EA is invalid: first access the chip, then access the chip, then cannot add more than 64KB of external expansion

    • EA effective: direct access to external ROM

    • EA must enable interrupts when it is interrupted

  • PSEN

    • When reading external program memory (EA is valid), _PSEN_ low level is effective to enable the external ROM to run.

  • EX0/EX1: External interrupt enable signal

  • IT0, IT1: Interrupt mode: 1 is falling edge trigger, 0 is low level trigger, the default is low level trigger

Tips:

  1. The serial port can be used as an I/O port: P0 is an external pull-up resistor; P1, 2, and 3 have internal pull-up resistors.

  2. Pins involving external RAM and ROM

  3. Time-division multiplexing:

English explanation:

  1. cy = cycle

  2. osc = oscillating (cycle)

  3. External: The X in XTAL stands for external

  4. sbit is used to store bit-addressable objects

  5. ALE==Address Lock Enable

Crystal Oscillator

  • 51 Minimum system:

    • Power supply, ground, reset circuit, crystal oscillator circuit.

  • Crystal Oscillator:

    • It provides the pulse of the complex timing circuit of 51 single-chip microcomputer, and is the heart of 51 single-chip microcomputer! The two pins XAL1 and XAL2 are the clock access pins, which are the arteries of 51. The oscillation generated by the crystal oscillator is input into the single-chip microcomputer, and there are pulse signals one by one, and the timing circuit inside 51 can work. These pulses are called clock signals, the period of the clock signal is called the clock period, and the frequency is called the clock frequency.


Reference address:【51 MCU】Summary of basic knowledge of the exam (pins)

Previous article:51 single chip microcomputer development of static digital tube
Next article:51 MCU Minimum System Circuit - Design Tutorial

Recommended ReadingLatest update time:2024-11-16 20:37

51 single chip microcomputer C51 accurate delay
The following program can achieve a relatively accurate delay at the ms level: void Delayms(unsigned int n) {     unsigned int i,j;     for(j=n;j 0;j--)     for(i=112;i 0;i--); } Use keil to see the delay time. Let’s delay for 1ms first (Delayms(1)). Before entering Delayms, sec=0.00042209s   After
[Microcontroller]
51 single chip microcomputer C51 accurate delay
MCU driver TEA5767 FM stereo radio C51 general source code
TEA5767 FM stereo radio, source code for C51 MCU. The module is less than 2 yuan on Taobao. It is recommended to use Keil uVision5 to compile. I used this version to compile and pass. The circuit schematic is as follows: The microcontroller source program is as follows: #include REG52.H #include "Radio.H" #include
[Microcontroller]
MCU driver TEA5767 FM stereo radio C51 general source code
How to use 51 MCU to connect 24C02-C language test code
I summarize 3 points that need attention 1. Turn off non-IIC communication devices. For example, my development board's SDA and SCL are also connected to DS1302, which will cause interference and no results. 2. In response to IIC communication, the transmitter sets SDA to 1 when SCL is 0, and waits for the receiver
[Microcontroller]
How to use 51 MCU to connect 24C02-C language test code
51 MCU Basics DS1302
Code: main.c file   /* DS1302 Clock */ #include "smg.h" #include "ds1302.h"   void main() { u8 time_buf ; //This array is used to store the content that needs to be displayed ds1302_init(); // Initialize DS1302   while(1) { ds1302_read_time(); //Although I don't know what this is for, I know how to
[Microcontroller]
51 MCU-temperature controller design detailed explanation + circuit + code
This 51 single chip microcomputer circuit needs to use:   AT89C51 x1 Main control microcontroller   AT24C02 x1 EEPROM-2K memory   DS180B2 x1 temperature sensor   10uF x1, 47uF x1 polarized capacitors   104 x3, 30pF x2 non-polar capacitors   12MHz x1 Quartz Crystal Oscillator   1K x2 resistor
[Microcontroller]
51 MCU-temperature controller design detailed explanation + circuit + code
Proteus and Keil Cx51 microcontroller simulation (serial port simplex communication)
The serial ports of the microcontrollers U1 and U2 both work in mode 1, with U1 acting as a receiver and U2 as a transmitter. The baud rate is 9600. After U1 receives the data sent by U2, it sends it to ports P1, P0, and P2 in sequence for running light display. Try to write a program and simulate it through Proteus.
[Microcontroller]
The composition and function of the arithmetic unit of the mcs51 single chip microcomputer
1. Arithmetic logic unit (ALU)  2. Accumulator A, B registers, temporary registers  3. Program status word (PSW): C AC FO RS1 RS0 OV - P  4. Decimal adjustment circuit, Boolean processor  Their functions include:                            addition, subtraction, multiplication, division Arithmetic operations    
[Microcontroller]
Interface Design between 51 Single Chip Microcomputer and A/D Converter MAX195
MAX195 is a 16-bit successive approximation ADC. It combines high accuracy, high speed, low power consumption (current consumption is only 10μA) and shutdown mode. The internal calibration circuit corrects linearity and offset errors, so all rated performance indicators can be achieved without external adjustment. T
[Microcontroller]
Interface Design between 51 Single Chip Microcomputer and A/D Converter MAX195
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号