Control of ALE pin of 51 MCU

Publisher:SerendipityLoveLatest update time:2016-01-14 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
ALE/PROG: Address Latch Enable output level used to latch the status byte of the address when accessing external memory.

During FLASH programming, this pin is used to input programming pulses.

Normally, the ALE terminal outputs a positive pulse signal with a constant frequency period, which is 1/6 of the oscillator frequency. Therefore, it can be used as a pulse for external output or for timing purposes. However, it should be noted that whenever it is used as an external data storage, an ALE pulse will be skipped. If you want to disable the output of ALE, you can set it to 0 at the SFR8EH address. At this time, ALE will only work when executing MOVX, MOVC instructions. In addition, the pin is slightly pulled high. If the microprocessor is in the external execution state ALE is disabled, the setting is invalid.

When accessing external memory, ALE is used as the control signal to latch the lower 8-bit byte of the extended address. When accessing external data memory, ALE outputs a positive pulse at one-twelfth of the oscillation frequency. At the same time, this pin is also the programming pulse input terminal when programming EPROM.

But this pin has another very useful function that is often overlooked by many people, that is, when not accessing external data memory, ALE outputs a fixed positive pulse at one-sixth of the oscillation frequency. One machine cycle of 8051 = 6 state cycles = 12 oscillation cycles. If a 6MHz crystal oscillator is used, ALE will send a fixed positive pulse of 1MHz. Therefore, it can be used as an external clock or timing. If we apply this function to practice, it may simplify our design and reduce production costs.

The ALE pin becomes valid only when using the MOVX and MOVC instructions (these instructions use the address of external RAM or ROM. These instructions have a characteristic: the address and data appear at port P0 in a time-sharing manner). When using C to write a program, to make it valid, you can use the method of accessing the internal RAM address. For example: uVariable = * ((char *) 0x12C), give the content of the 0x12C address to the uVariable variable. The valid pins in this process are ALE and RD.

The signal generation of this signal line is realized by the MCU hardware circuit and cannot be controlled manually.
In some MCUs with built-in TOM, the ALE signal output can be turned off to reduce EMI.
Reference address:Control of ALE pin of 51 MCU

Previous article:51 MCU assembly interrupt program
Next article:51 MCU and 74HC164 static display interface

Recommended ReadingLatest update time:2024-11-16 16:00

ADS7843/XPT2046 touch screen chip 8051 MCU driver
The size of my color screen is 240*320~ Following is the code //common.h #ifndef __COMMON_H__ #define __COMMON_H__ #include reg52.h #include intrins.h typedef unsigned int uint; typedef unsigned char uchar; #endif // !__COMMON_H__ //TouchPad.c #define __TOUCHPAD_C__ #include "TouchPad.h" //My screen interfa
[Microcontroller]
Simulating PLC Control Using Atmel89S51 Single Chip Microcomputer
This paper introduces a method of simulating PLC control with Atmel89S51 single-chip microcomputer, designs a controller suitable for rigid clutch punch press, introduces the basic structure and working principle of input and output circuits with photoelectric isolation, focuses on the design idea of ​​the internal
[Microcontroller]
INT1 interrupt five-bit counter PROTEUS and 51 microcontroller tutorial
The program source code is as follows: /* INT1 interrupt 5-bit count */ #include reg51.h typedef unsigned char uint8; typedef unsigned int uint16; sbit K2 = P3^4; void delay(uint16 x) { uint16 i,j; for(i = x; i 0; i --) for(j = 114; j 0; j --); } code uint8 LED_CODE = {0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0
[Microcontroller]
INT1 interrupt five-bit counter PROTEUS and 51 microcontroller tutorial
How does the C51 microcontroller store programs and data?
When you are new to C51, you will always have such questions: where does the program go after you download it from the computer to the development board? Where are the user or application programs, system programs and data stored in C51? From the physical structure, the 51 single-chip microcomputer can be divided into
[Microcontroller]
Design and simulation of LED Chinese character display screen based on AT89C51 single chip microcomputer
O Introduction LED display is a flat display screen composed of light-emitting diode dot matrix modules or pixel units. It has the advantages of high luminous efficiency, long service life, flexible configuration, rich colors and strong adaptability to indoor and outdoor environments. It is widely used for infor
[Microcontroller]
Design and simulation of LED Chinese character display screen based on AT89C51 single chip microcomputer
Connection between MAX7219 and 51 MCU
MAX7219 is a highly integrated serial input/output common cathode LED display driver. Each chip can drive an 8-bit 7-segment common cathode digital tube with a decimal point. Several chips can be cascaded, and only three wires are needed to connect to the microprocessor. MAX7219 has an internal scanning circuit. Exc
[Microcontroller]
Connection between MAX7219 and 51 MCU
51 MCU Common Registers Quick Lookup Table
1: Timer/Counter Mode Selection: TMOD address (89H) is not bit addressable   D7   D6 D5 D4 D3 D2 D1 D0   GATE C/T M1 M0 GATE C/T M1 M0   GATE: Gate control bit GATE="0" has nothing to do with
[Microcontroller]
Design of an intelligent robot maze car based on MCS-51 single chip microcomputer
Robots should have several features: mobile function, execution function, feeling and intelligence. At present, there are more than 20 types of robot competitions involving hardware and software simulation held in countries around the world. Various robot competitions have a common purpose: to cultivate scientific and
[Microcontroller]
Design of an intelligent robot maze car based on MCS-51 single chip microcomputer
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号