Proteus and Keil Cx51 microcontroller simulation (measure pulse width)

Publisher:SerendipityGlowLatest update time:2015-12-25 Source: eefocusKeywords:proteus  keil  Cx51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The width of the pulse appearing on the INT0 pin is tested using the gate bit and displayed by the light-emitting diode in the form of a number of machine cycles.

Circuit Diagram:

[Repost] Proteus and Keil Cx51 MCU simulation (measure pulse width)

U1 source program:

#include
sbit P1_1=P1^1;
void main(void)
{
TMOD=0x02;
EA=1;
ET0=1;
TH0=256-250;
TL0=256-250;
TR0=1;
while( 1);
}
void Time0(void)interrupt 1 using 0
{P1_1=~P1_1;}

 

U2 source program:

#include
#include
void main(void)
{
TMOD=0x0a;
EA=1;
ET0=0;
TR0=1;
TH0=0;
TL0=0;
while(1)
{
while (INT0==0);
TL0=0;
while(INT0==1);
P1=TL0;
}
}


Keywords:proteus  keil  Cx51 Reference address:Proteus and Keil Cx51 microcontroller simulation (measure pulse width)

Previous article:Proteus and Keil Cx51 microcontroller simulation (timer mode 2 application)
Next article:Proteus and Keil Cx51 microcontroller simulation (timer application 1)

Recommended ReadingLatest update time:2024-11-16 14:41

Simulation settings using SST89E516RD in KEIL environment
 【1】Hardware connection         Use MAX232 to form a serial port level conversion circuit to connect the SST89E516RD microcontroller system to the computer's serial port 【2】Software settings        (1) Open the settings menu         Directly click the Options for Target icon or right-click the mouse to open the
[Microcontroller]
Simulation settings using SST89E516RD in KEIL environment
51 MCU simultaneous external expansion of RAM, ROM specific implementation and Keil specific settings
51MCU has RAM and ROM inside, which is different from 8031. Although the internal RAM and ROM of the enhanced 51MCU may have a lot of space nowadays. But in terms of technology, you still need to learn to expand RAM and ROM.         For different design requirements, the expansion may be based on any of the following
[Microcontroller]
MCU delay method (Keil software delay)
There are four commonly used delay methods in C language, as shown in Figure 4-2. Figure 2-4 C language delay method Figure 2-4 shows four common delay methods used in C language programming, two of which are inaccurate delays and two more accurate delays. Both the for statement and the while statement can change th
[Microcontroller]
MCU delay method (Keil software delay)
Keil's method of generating lib from source code,
The program files we generally come into contact with the most are files with .c and .h suffixes. I don’t know if you have ever seen files with the .lib suffix, which are encrypted source code files. We can use the keil development tool to encrypt our .c file into this kind of .lib file. This can achieve the following
[Microcontroller]
Design of teaching demonstration board based on 80C51 single chip microcomputer
With the development of computer technology and microelectronic computing, single-chip microcomputers have been widely used in industrial control, household appliances, intelligent instruments and other fields. Therefore, as a professional course, single-chip microcomputers have the characteristics of practicality and
[Microcontroller]
Design of teaching demonstration board based on 80C51 single chip microcomputer
Keil v4.73 debug mode cannot view the value of variables
I have encountered the problem that Keil v4.73 cannot view the value of local variables in debug mode before, so I found a computer and installed an old version of Keil v4.54 (http://blog.csdn.net/ropai/article/details/16880079) so that I can use it when breakpoint debugging is needed. I finally found the reason rec
[Microcontroller]
Keil v4.73 debug mode cannot view the value of variables
Two-way communication between 51 microcontrollers (Proteus simulation)
Specific function implementation: Microcontroller A can control the LED lights of microcontroller B through buttons, and microcontroller B can increase the number of the digital tube connected to microcontroller A by one through buttons. Devices used: AT89C51, buttons, resistors, 4 LED lights, 2 MAX232 chips, COM po
[Microcontroller]
Keil software error summary
KEIL compilation error information table   Error code and error message Error explanation  error 1: Out of memory  error 2: Identifier expected  error 3: Unknown identifier error  4: Duplicate identifier  error 5: Syntax error  error 6: Error in real constant error  7: Error in integer constant error  8: String consta
[Microcontroller]
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号