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