What is a microcontroller? Monolithic way of working! Monolithic integrated circuit study for knowledge

I. the concept of SCM

In one IC chip integrated microprocessor、Memory、I/O interface circuits,So as to constitute a single chip micro-computer,Single-chip microcomputer。

Two. SCM uses

Industrial Automation:Data acquisition,Measurement and control technology;

Intelligent instrument:Digital oscilloscope、Digital signal generator、Digital multimeter、Induction ammeter;

Consumer electronic products:Washing machine、Refrigerator、Air conditioning machines、Mobile phones;

Any control or simple calculations related to the electronic device can be used to achieve single-chip,Select different properties depending on the actual situation of the microcontroller,Such as:atmel,stc,pic,apr,Sunplus,80C51,arm, etc.。

III. How to learn microcontroller

The first practice;Add the necessary theoretical knowledge,That is what make up what is missing;Do projects to gain experience。(These topics can be searched on the Web,Also you have any idea of ​​daring to experiment。)。

IV. Why 51 MCU MCU as the entry-learning:

Low cost microcontroller Science 51,And 51 single most mature technology、The most abundant data、The learning curve is relatively low。

IV. Level characteristic

Digital circuits only two levels:High and low(This course)SCM is defined as the TTL level:+ 5V High、Low 0V。RS232 level:Computer's serial port,High -12V、Low + 12V。

It is necessary to increase the level switch chip max232 when communicating between the microcontroller and the computer。

V. and、or、And the non-basic operation XOR:

Logic "and":

0*0=0 1*0=0

0*1=0 1*1=1

"Must have,Otherwise there is no "

Logical "or":

0+0=0 1+0=1

0+1=1 1+1=1

"As long as there is one,There "

Logical "not" :

Non Non 0 = 1 1 = 0

"Negate"

Logical "exclusive or":

0⊕0=0 1⊕0=1

0⊕1=1 1⊕1=0

"Must be different,Otherwise there is no "

VI. Binary、Decimal、Hexadecimal representation and conversion

Twelve Shiliu twelve Shiliu twelve Shiliu twelve Shiliu

0 0000 0 4 0100 4 8 1000 8 12 1100 C

1 0001 1 5 0101 5 9 1001 9 13 1101 D

2 0010 2 6 0110 6 10 1010 A 14 1110 E

3 0011 3 7 0111 7 11 1011 B 15 1111 F

About seven .80c51 SCM

Inter has introduced MCS-51 series microcontrollers:Integrated 8-bit CPU、4K bytes of ROM、128Bytes of RAM、4Octets parallel port、A full-duplex serial port、216-bit timer / counter。64K addressing range,And have a strong control function Boolean processor。SBC - SCM。

80C51 is a typical species MCS-51 series;Other companies with 80C51-based core developed CMOS(FET)80C51 microcontroller technology products collectively known as Series。

51SCM is a generic term for all current Intel 8031-compatible instruction set of the microcontroller。The MCU is the ancestor of Intel's 8031,Later, with the development of Flash rom technology,8031SCM has made considerable progress,It became one of the most widely used 8-bit microcontrollers,Which represents the company's model is ATMEL AT89 series,It is widely used in industrial measurement and control system。At present, many companies have launched 51 series of compatible models,In the present and future for a long period of time will occupy a lot of market。51SCM is a single-chip base entry,Still the most widely used one。Note that the 52 series of microcontrollers generally do not have self-programming capability。

The current popular 51 series main products:

*Intel's:80C31、80C51、87C51,80C32、80C52、87C52, etc.;

*ATMEL's:89C51、89C52、89C2051, etc.;

*Philips、Winbond、Dallas、Siemens(Infineon)The company's many products such as

[warning]
Currently,Domestic macro crystal STC microcontroller with its low power consumption、cheap、Stable performance,51 single domestic occupy a larger market。
[/warning]

VIII. SCM works

Our general understanding of the structure of SCM、Feature,Here we work mainly on the microcontroller,There are those who work。

There microcontroller reset、Program execution、Low power consumption and programming and encryption four operating modes,The following were to be introduced。

1.Reset

(1)Why should reset

Everybody knows,Single-chip implementation of the program always begins at address 0000H,Therefore, the CPU must be reset when entering the system,Also called initialization;Further since the run errors or improper operation of the system in a deadlock,To get out of this state,Also need to be reset,Like a computer crash to restart the same。

(2)Reset principle

The method is very simple microcontroller reset,As long as the RST pin(9 foot)Plus a duration of 24 oscillator periods(That is two machine cycles)The high on it。If the crystal is 12M,Calculate how long it takes the pulse duration?

(3)How to reset

Power-on reset operation has automatic reset、External reset pulse and the reset button three methods,Automatic power on reset by an external reset capacitor charging circuit to achieve,When power is first turned on to charge the capacitor C starts the pull-down resistor,Since both sides of the capacitor voltage can not change suddenly,RTS terminal maintains a high level so,As long as the charging time of less than 1ms,You can achieve automatic power-on reset of the microcontroller,I.e. power system initialization is complete,In practical engineering applications,If there are no special requirements,In this manner generally reset;Reset button circuit 2 shown in FIG.,It is in fact based on the power-on reset plus the R2 and SA,Such circuits are generally used in a frequent need to reset the system;External reset pulse circuit shown in Figure 3,External reset generally require a relatively high system used,For example the desired system can automatically reset the deadlock。External reset is implemented in a dedicated integrated circuit,It is what we usually called "watchdog" circuit,This circuit has a lot of,They are not only able to complete the automatic reset of the microcontroller,But also manage power、Functions as an external memory,For example X25045, MAX813L and so is more commonly used such chips。

2.Program implementation

Program execution is the basic workings of the microcontroller,Since the reset PC = 0000 ,So the program starts executing from the address 0000H,At this time, the microcontroller controls a series of operations is completed in accordance with the request command,For example, let's say in front of flashing LED lights up,However, in actual use,And the implementation of the program does not start from 0000H,And always arrange a jump instruction,For example LJMP START ,Why should such an arrangement,Let us explain spoke of the interruption。

3. Low-power operation

In battery-powered systems,Sometimes in order to reduce power consumption of the battery,The program will not run low-power mode,Low power consumption in two ways - standby mode and power-down mode。

Low power consumption mode is controlled by a power source register PCON (We mentioned in the previous lesson)Controlled。A power control register is defined by 8-bit register bit,The format is as follows,

among them:SMOD baud rate multiplier bits,When using serial communication;GF1 is a common flag 1;GF0 for the purpose flag 0;PD is a power-down mode bit,PD=1,Into power-down mode;IDL standby mode bit,IDL=1 ,Enter standby mode。That is as long to execute an instruction to let IDL or PD bit is 1 bit on it。So how is the microcontroller to enter or exit power-down mode and standby mode of operation。

1 .Standby mode

2 .Enter standby mode

When instructions cause the register PCON IDL = 1 ,Then enter a standby mode of operation。CPU stop,But still provides a clock signal to the RAM,Timer,Serial port and interrupt system;Meanwhile SP,,The program counter PC,Program status word (PSW),Accumulator ACC and all general-purpose registers are frozen up;Reduced current consumption from the microcontroller 24mA 3.7mA,This saves power consumption。

② out of standby mode

Exit standby mode interrupt method can be used to introduce,Arrange a RETI instruction of the interrupt routine on it,What is interrupted,We do not know,Of course, this does not matter。In fact, we standby mode and sleep mode when using a computer with the same purpose。

(2)Power-down mode

① into standby mode

When instructions cause the register PD = 1 PCON ,Then enter the power-down mode,At this time, all work stopped microcontroller,Only the data of the internal RAM is preserved;Power Power-down mode can be reduced to 2V,Consumes only 50uA 。At this time, it is equivalent to the display and hard drive has been closed。

② out of standby mode

The only way to exit the power-down mode of operation is reset,However, should the supply voltage returns to normal after reset,Reset time is greater than 10mS ,Before entering power-down mode,Supply voltage can not drop down,Thus microcontroller circuit is preferably to have a reliable power detection circuit。Obviously power-down mode and standby mode are two different low-power operating mode,The former can reduce the power consumption in the absence of an external event trigger,While the latter is used when the program stops running。On low-power MCU way to simply say these,Further details are also left to the next volume and then explain,Because that is the prawn works。

4. Programming and encryption

MCU programming is encrypted and specialized equipment to complete,This device is called programmer or burner,There are many similar products,Functions are not the same。

Original article written by Gerber drop-off:R0uter's Blog » What is a microcontroller? Monolithic way of working! Monolithic integrated circuit study for knowledge

Reproduced Please keep the source and description link:https://www.logcg.com/archives/462.html

About the Author

Leave a Reply

Your email address will not be published. Required fields are marked *