Rtx51 tiny system: (about time slice)

Source: Internet
Author: User

Default Configuration File Conf_tny.a51 Definition Int_clock = 10000, That is, the timed hardware overflow is 10000 Machine cycle, Timesharing = 5, That is, the cycle switching time is 5 Overflow.

If you use 12 m Crystal Oscillator , 10000 Machine cycle = 10000us = 10 ms, 5 Overflow = 50 ms, That is to say, each task occupies 50 ms Time slice , Configuration changes are required for tasks that require a short time.

MyProgramTo specify a pulse width30 msLeft and right Pulse Count,The result is always incorrect.,Then I found the problem.

How to change the configuration file:

1. open D:" Keil "C51" rtx_tiny directory conf_tny.a51 file , modify two parameters

2. RUN genrtx in the same directory. bat file , after successful execution, rtx51tny is generated. lib file

3. D:" Keil "C51" lib rtx51tny. lib make a backup , change 2 rtx51tny. lib copy to D: "Keil" C51 "lib overwrite the original file in the directory

4.Recompile your project

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.