Interface bus test center consolidation

Explanation

以下内容为个人整理,答案也是个人回答,不一定对,所以你对答案有任何问题,都欢迎与我讨论。

Q01: 51 microcontroller P0, P1, P2, P3 port functional role?
answer:

P0可做地址口的低8位也可以做数据口和I/O口
P1可做普通的I/O口
P2除了做I/O口,也是作为地址口的高8位(总共16位)
P3 既可以是普通IO口,也可以是外部中断、定时、外部输入的端口

Q02: When a serial transmission or receive data, which of two bit is set?
answer:

接收数据时,RI 会置位
发送数据时,TI 会置位

Q03: What is the single-chip accumulator 81?
answer:

The ACC
Q04: When the crystal frequency is 12MHz, the frequency of the timer is how much?
answer:

Frequency of 1Mhz
Description:

Machine frequency = crystal frequency / 12 is
Q05: the LED display is divided into several?
answer:

Two types of dynamic scanning and static scan
description:

Dynamic scanning of the LED is on schedule timer
Q06: 51 single-chip memory is divided into
A:

Low 128 bytes

从00H~1FH(32字节):寄存器区,四组寄存器区,一组有8个寄存器
从20H~2FH(16字节 128位):位寻址区
剩下:普通内存

Upper 128 bytes

特殊功能寄存器

Q07: ex0, ex1, meaning et0 of
A:

ex0 = 1; // Enable external interrupt 0
EX1 =. 1; // Enable external interrupt. 1
ET0 =. 1; // Timer 0 Interrupt allow

1
2
3

Description:

Insert pictures described herein
Pictured IE (Interrupt Enable Register)

EA:中断总控制位
    EA=1:CPU开放所有中断
    EA=0:CPU禁止所有中断
ES:串行口中断控制位。
    ES=1:允许串行口中断
    ES=0:屏蔽串行口中断
ET1:定时/计数器TI中断控制位
    ET1=1:允许T1中断
    ET1=0:禁止T1中断
EX1:外部中断1中断控制位
    EX1=1:允许外部中断1中断
    EX1=0:禁止外部中断1中断
ET0:定时/计数器T0中断控制位
    ET0=1:允许T0中断
    ET0=0:禁止T0中断。
EX0:外部中断0中断控制位
    EX0=1:允许外部中断0中断
    EX0=0:禁止外部中断0断。

Q08: the role of program memory?
answer:

Program memory is stored in the program code can also be stored constant data
Q09: The concept of the baud rate?
answer:

When the rate of a microcontroller or computer serial communication. Refers to a change in a unit time after the signal is modulated, the carrier frequency and the parameters of the unit time, i.e., as a data transfer rate of 240b / s, and each character format contains 10 bits (a start bit, a stop bit, 8 data bits), then the baud rate is 240 baud (baud), the bit rate (transfer rate of data bits) of 240 * 10 = 2400 bps (bits per second)
Description:

The baud rate is the number of bytes transmitted per second - (wrong)
Q10: stacks and queues features?
answer:

The stack is advanced out of the
queue is a FIFO
Q11: NATURAL priority and the priority is determined, the following scenario

Scene 1: The priority of the same three students A, B, C also need Dafan Dafan who should?
Scene 2: A student is Da Fan, whether A classmate of the same priority but naturally a higher priority than A students B students can interrupt Dafan students A's?
Scene 3: A student is Dafan higher priority than A students B students can break Dafan students A's?
answer:

Scenario 1: The high priority nature first Dafan (O (∩_∩) O ~ ha, it is not entangled ABC)
Scene 2: not
Scene 3: Oh can
Description:

High priority can interrupt a low priority
natural priority is only meaningful comparison between the same priority
Q12: 51 single-chip registers which can not be directly manipulated, can not be addressed?
answer:

pc (program counter)
Q13: In reading the external level, what to do? *
A:

First thing to do is to write 1 (high level), then read
Q14: What communication?
answer:

Simplex, half-duplex, full-duplex
Q15: What is the purpose compiler?
answer:

Gets binary code files
Q16: To open the global interrupt, which bits need to operate?
answer:

EA
Q17: If you now have a three-byte program program is being executed 0x100, interrupt, the saved address is how much?
answer:

Save the address of the next instruction address 0x101
Q18: 51 microcontroller is a few machines?
answer:

51 is a single-chip 8-bit
instructions:

The arm 32 is
Q19: The maximum timer 51 at regular time mode and the single-chip 8-bit 16-bit mode?
answer:

In the crystal frequency is 12MHz premise:

8位模式下的情况:28 * 1us = 256us
16位模式下的情况:216 * 1us = 65536us

Explanation

Machine frequency = crystal frequency / 12
machine cycle (pulse period) = 1 / Frequency machine
Q20: Status Register
A:

Program status word register PSW (program status word) is part of the computer operator's
PSW is used to store two types of information

一类是体现当前指令执行结果的各种状态信息,如有无进位(CY位),有无溢出(OV位)等
另一类是存放控制信息,如允许中断(IF位),跟踪标志(TF位)等

Q21: 51 device is powered down without losing Which segment?
answer:

@code
Description:

A total of five sections: CODE, BIT, IDATA, the DATA, XDATA
Q22: five Microcontroller 51 interrupt entry address is which?
answer:

0003H:外中断0
000BH:定时器0
0013H:外中断1
001BH:定时器1
0023H:串口中断入口

Description:

The first three bytes are reset
Q23: How to select a group of four register a group?
answer:

RS1 and RS0 rely on two
Q24: When P0 port as IO port mode above the pipe closed, leaving only mode below the pipe, then how output 1 (high level)?
answer:

An external pull-up resistor, otherwise it is impossible to stabilize the output 1
Q25: crystal frequency is 6MHz, how many cycles?
answer:

2us
Description

Machine frequency = crystal frequency / 12
machine cycle = 1 / frequency machine
Q26: What are three kinds of buses are?
answer:

地址总线
数据总线
控制总线

Q27: How to set MCU priority register?
answer:

IP (Interrupt Priority), the corresponding bit
instructions

Here Insert Picture description
is interrupt priority control bits of the IP register

PS:串行口 中断优先级控制位
PT1:定时器/计数器T1 中断优先级控制位
PX1:外部中断1 中断优先级控制位
PT0:定时器/计数器T0 中断优先级控制位
PX0:外部中断0 中断优先级控制位

Q28: What the computer can directly identify the language?
answer:

Binary language (machine language)
Q29: What is the oscillation cycle, machine cycle, instruction cycle?
answer:

Period of oscillation

也称为时钟周期,是指单片机提供时钟信号的振荡源的周期,一般实验板上为11.0592MHZ,12MHZ和24MHZ用的也比较多
是计算机中最基本的、最小的时间单位

Machine cycle

一个机器周期包含6个状态周期S1~S6,也就是12个时钟周期
在一个机器周期内,CPU可以完成一个独立的操作

Instruction cycle

它是指CPU完成一条操作的所需的全部时间
包括取指令、分析指令和执行指令所需的全部时间
每条指令执行时间都是有一个或几个机器周期组成,单片机中有单周期指令、双周期指令和四周期指令

Explanation

The relationship between the three: one instruction cycle consists of a number of machine cycles, a machine cycle also includes a number of clock cycles
Q30: What is an interrupt?
answer:

An interrupt is a central processing unit CPU is executing a program, when dealing with something of an event took place outside, immediately request processing CPU, CPU temporarily interrupt the current work, into an event handler that occurred after processed, and then return to the original place where the interrupted to continue the original work.
Description:

Here Insert Picture Description
Q31: interrupt system concept and role?
answer:

Interrupt function member implemented system called interrupt
action:

完成实时性的要求
实现中断及返回
保护现场和恢复现场

Description:

Here Insert Picture Description
The picture above shows the interrupt structure of the system, we can see from the chart, the interrupt source mining divided into three categories: external interrupts, timers, interrupt and serial port interrupt
Q32: 51 points microcontroller many segments, each segment of meaning?
answer:

CODE段
    用来保存程序中汇编助记符描述的机器指令部件
    STC单片机中的程序Flash存储空间
    可以由MOVE指令,并且通过DPTR寄存器进行访问

BIT段
    用来保存比特位
    可以通过指令系统中的位操作指令来访问(注:可以通过位操作指令访问特殊功能寄存器SFR)

IDATA段
    可以定义少量的变量,这些变量将最终保存在STC单片机的片内RAM的高地址和低地址区域中
    IDATA的低128个字节和DATA段重叠
    可以通过寄存器R0或R1,间接寻址保存在IDATA段中的变量

DATA段
    该段指向STC单片机内部数据RAM的低128个字节
    通过直接和间接寻址方式,程序代码可以访问在DATA段中的变量
    地址空间为00H~7FH

XDATA段
    该段指向扩展RAM区域
    通过寄存器DPTR和MOVX指令,程序代码可以访问XDATA段
    对于一个单页的XDATA存储空间来说,可通过寄存器R0和R1访问

Q33: timer / counter has several operating modes and their meanings?
answer:

Four kinds

M1=0; M0=0
    模式0
    特点:13位定时器
M1=0; M0=1
    模式1
    特点:16位定时器
M1=1; M0=0
    模式2
    特点:8位 可重加载定时器
M1=1; M0=1
    模式3
    特点:两个单独8位定时器

Q34: Use 51 single-chip design (DIY)
Answer:

Microcontroller 51 may be used to design a dormitory gates program, the microcontroller 51 is connected to a controllable stepper motor reversing, connect it to the P0.0 port, and a button connected to the connection port P3.0, then write program, when the button is pressed, an interrupt signal, the stepper motor is in rotation interrupt signal, the delay period of time after the intake, and then reversing back.
Description http://www.daiqiyang.com

You can see the following articles:

用汇编程序控制八盏灯亮灭
温室监控系统仿真设计
数码管显示的GP2D12仿真测距警报器
温度控制直流电机转速
正反转可控的步进电机
1-Wire总线温度传感器DS18B20应用测试
ADC0809模数转换与显示
ADC0832模数转换和LCD显示
1602字符液晶显示

The code Location: https://github.com/duganlx/DSP
----------------
Disclaimer: This article is CSDN blogger "duganlx 'original article, follow the CC 4.0 BY -SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https://blog.csdn.net/qq_40626497/article/details/103714619

Guess you like

Origin blog.51cto.com/6624835/2462932
Recommended