CN110069323B - High-speed reaction game device and task allocation method thereof - Google Patents

High-speed reaction game device and task allocation method thereof Download PDF

Info

Publication number
CN110069323B
CN110069323B CN201810069625.1A CN201810069625A CN110069323B CN 110069323 B CN110069323 B CN 110069323B CN 201810069625 A CN201810069625 A CN 201810069625A CN 110069323 B CN110069323 B CN 110069323B
Authority
CN
China
Prior art keywords
task
microcontroller
work
instruction
basic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810069625.1A
Other languages
Chinese (zh)
Other versions
CN110069323A (en
Inventor
阿德里安·范德·沃斯特
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Corsair Memory Inc
Original Assignee
Corsair Memory Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Corsair Memory Inc filed Critical Corsair Memory Inc
Priority to CN201810069625.1A priority Critical patent/CN110069323B/en
Publication of CN110069323A publication Critical patent/CN110069323A/en
Application granted granted Critical
Publication of CN110069323B publication Critical patent/CN110069323B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/10Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a high-speed reaction game device and a task allocation method thereof, wherein the task allocation method comprises an initial step, an instruction triggering step, a task adding step, a task scheduling step and a task executing step; firstly, executing an initial step, wherein a microcontroller executes a plurality of basic tasks; then executing the step of triggering the instruction, wherein a detector detects the triggering microcontroller to generate a detection instruction, and a main input module triggers the microcontroller to generate an input instruction; then executing a task adding step, and adding a work task by the microcontroller; executing task scheduling step, a task scheduling module schedules the work task into a plurality of basic tasks; finally executing task execution step, when the work task is not completed in the limited time, suspending executing the work task; the task allocation method can confirm whether the user gives the instruction at any time and respond in real time, and avoid the situation that the instruction given by the user cannot be obtained or delayed due to overlong time for executing the work task.

Description

High-speed reaction game device and task allocation method thereof
Technical Field
The present invention relates to a game device, and more particularly, to a high-speed response game device and a task allocation method thereof.
Background
The common information input equipment of a general computer is a keyboard and a mouse, and the general keyboard and the mouse only need to send simple instructions to the computer, so that the early-stage keyboard and the early-stage mouse can stably work in a general circulation mode, downtime can be hardly generated, and delay is not felt.
Referring to fig. 1, a typical mouse includes a micro-control circuit 111, a coordinate motion sensor 112, a key sensor 113 and a roller sensor 114. The micro-control circuit 111 is connected to a computer device 116 by a transmission interface 115 to provide user control of the computer device 116.
Referring to FIG. 2, a typical keyboard comprises a micro-control circuit 121 and a keyboard sensor 122. The micro-control circuit 121 is connected to a computer device 124 by a transmission interface 123 to provide user control of the computer device 124.
Referring to fig. 3, a cycle control flow of a micro control circuit of a general mouse or keyboard is shown, and after the micro control circuit is initially set 130, a first operation 131, a second operation 132 and a third operation 133 are executed in a cycle to confirm detection information of a plurality of sensing elements, so that the general mouse or keyboard operates the computer device.
Along with the development of games, the electronic competition industry is gradually vigorous, a plurality of electronic competition products are developed, and a mouse, a keyboard and a game lever of an information input device are one of the products for electronic competition development. The response speed on the electronic contest is required to be faster and faster, the accuracy and the resolution are higher and higher, and under the condition that the operation information is more and more complex and huge, the specification of components of the information input equipment is higher and higher, so that the condition that the instruction is delayed to be transmitted is avoided.
On the electronic competition field, each action executed by the game player must achieve the real-time goal, the technical means of the information input device of the current mouse, keyboard or game lever is to utilize high-specification hardware components to achieve the rapid execution speed, so as to send a large number of control instructions to the computer in unit time to achieve the near real-time instruction transmission, and when the instruction of the user is more near real-time, the control of the user in the electronic competition is reflected on the game in real time.
Referring to fig. 4, when the micro control circuit adds an interrupt service routine 134 (ISR, interrupt Service Routine), the micro control circuit adds a service routine start command 135, the interrupt service routine 134 and a service routine end command 136 between the first, second and third tasks 131, 132 and 133 to enable the information input device to execute a new task.
Referring to fig. 5, the horizontal axis represents time for the micro control circuit to execute the operation, and the vertical axis represents the operation executed by the micro control circuit. Although the interrupt service routine 134 interrupts the operation of the operation one 131, the operation one 131 can be executed again after the interrupt service routine 134 ends.
When the interrupt service routine 134 is huge in information and complex in calculation, a lot of time must be waited for to execute the task one 131 again. The new function of the current information input device cannot achieve the real-time (real-time) goal.
In addition, in the technology that the interrupt service routine must be completely finished to execute other work, delay occurs in the interrupt service routine or unexpected infinite loop is generated, so that the micro control circuit cannot execute other work and is in downtime.
Therefore, how to improve the program structure of the information input device, so as to achieve the purpose of real-time response to the actions of the user, and avoid influencing the actions of the user when unexpected errors occur in tasks, so that the computer device receives the action instructions of the user in real time is a goal of the related technicians.
Disclosure of Invention
Accordingly, an object of the present invention is to provide a task allocation method, which includes an initial step, a command triggering step, a task adding step, a task scheduling step and a task executing step.
Firstly, executing the initial step, a task scheduling module controls a microcontroller to execute a plurality of basic tasks in a super-loop.
Then executing the instruction triggering step, a detector detects an environmental state to trigger the microcontroller to generate a detection instruction, and a main input module detects an external information to trigger the microcontroller to generate an input instruction.
Then executing the task adding step, and adding a task to the microcontroller by one of the detection instruction and the input instruction.
And then executing the task scheduling step, wherein the task scheduling module sets a working section time for the working task and arranges the working task into a super cycle.
And finally executing the task execution step, wherein the microcontroller executes the plurality of basic tasks and the work task in a super-loop mode, and pauses the execution of the work task when the microcontroller does not complete the work task in the work section time.
In another technical means of the present invention, in the task execution step, the microcontroller stores the work information before the task is suspended, so that the task before the suspension is continued when the super cycle executes the task again.
In another technical means of the present invention, in the task execution step, when the task ends, the microcontroller deletes the task from the super loop.
In another aspect of the present invention, in the initial step, the task scheduling module further sets a basic section time for the plurality of basic tasks, respectively, and in the task executing step, when the microcontroller does not complete the basic task at the basic section time, the task executing module pauses the basic task.
In another technical means of the present invention, in the step of adding the task, the microcontroller sets a limited working time for the task, and in the step of executing the task, the microcontroller counts the working time of the task and generates a total working time.
In another technical means of the present invention, in the task execution step, when the task is suspended in the super cycle, the microcontroller compares the total working time with the limited working time, and when the total working time is greater than the limited working time, the microcontroller generates an error command.
In a further technical means of the present invention, in the step of triggering the instruction, a personal computer sends a response instruction to the microcontroller, and in the step of adding the task, the microcontroller obtains the response instruction to generate the task.
Another object of the present invention is to provide a high-speed game device, which is suitable for the task allocation method and is connected to a personal computer via a USB port, wherein the high-speed game device includes a microcontroller, and transmits information to the personal computer; a detector electrically connected with the microcontroller, wherein the detector detects an environmental state and is used for triggering the microcontroller to generate a detection instruction; the main input module is electrically connected with the microcontroller and is used for detecting external information and triggering the microcontroller to generate an input instruction; and a task scheduling module electrically connected with the microcontroller for controlling task scheduling of the microcontroller.
The other technical means of the invention is that the high-speed reaction game device further comprises an active module electrically connected with the microcontroller, and the microcontroller controls the active module according to the executed task.
The present invention further provides a method for controlling the personal computer to send out a response command to the microcontroller.
The invention has the beneficial effects that the task executed by the microcontroller is designated by the task scheduling module, the task scheduling module designates the execution sequence of the basic tasks and the work tasks, and the basic section time and the work section time, and when the basic tasks or the work tasks are not completed in the basic section time or the work section time, the basic tasks or the work tasks are suspended so as to replace the task executed by the microcontroller, so that the high-speed reaction game equipment can transmit the information to the personal computer in real time.
Drawings
FIG. 1 is a schematic diagram of an apparatus illustrating a conventional general mouse;
FIG. 2 is a schematic diagram of an apparatus illustrating a conventional general keyboard;
FIG. 3 is a flow chart illustrating the cyclic control flow of the micro-control circuit of the conventional general mouse or the general keyboard;
FIG. 4 is a flow chart illustrating a conventional micro-control circuit adding an interrupt service routine in several operations;
FIG. 5 is a timing diagram illustrating the timing of the execution of interrupt service routine and several tasks by a conventional micro-control circuit;
FIG. 6 is a schematic diagram of an apparatus illustrating a preferred embodiment of a high-speed reactive gaming apparatus of the present invention;
FIG. 7 is a schematic diagram of the apparatus illustrating the connection of a detector and a primary input module of the preferred embodiment to a microcontroller;
FIG. 8 is a schematic diagram of the apparatus, illustrating the mouse aspect of the preferred embodiment;
FIG. 9 is a schematic diagram of the apparatus, illustrating aspects of the keyboard of the preferred embodiment;
FIG. 10 is a block diagram illustrating the task allocation method of the preferred embodiment;
FIG. 11 is a flow chart illustrating aspects of task scheduling for a plurality of tasks by a task scheduling module according to the preferred embodiment;
FIG. 12 is a timing diagram illustrating the timing of the task scheduling module of the preferred embodiment for scheduling a number of tasks.
Symbol description in the drawings:
111. a micro control circuit; 112. a coordinate movement sensing member; 113. a key sensing member; 114. a roller sensing member; 115. a transmission interface; 116. a computer device; 121. a micro control circuit; 122. a keyboard sensing member; 123. a transmission interface; 124. a computer device; 130. initial setting; 131. the first work; 132. work II; 133. thirdly, working; 134. interrupting the service program; 135. a service program start instruction; 136. a service program end instruction; 21 A USB port; 22. a personal computer; 221. a reaction instruction; 30. initial setting; 31. a microcontroller; 311. basic tasks; 312. a work task; 313. a flash memory; 32. a detector; 321. an environmental state; 322. detecting an instruction; 323. a touch control area; 324. a touch control component; 325. a touch panel; 326. a three-axis acceleration sensor; 327. a gyroscope; 328. a light change sensor; 329. a proximity sensor; 33. a main input module; 331. external information; 332. inputting an instruction; 333. a surface movement detector; 334. a matrix of buttons; 335. a keyboard matrix; 336. a roller sensor; 34. a task scheduling module; 35. an active module; 351. a vibration motor; 352. a light emitting module; 901 to 905 steps.
Detailed Description
The features and aspects of the present invention will become apparent from the following detailed description of preferred embodiments, which is to be read in connection with the accompanying drawings.
Referring to fig. 6 and 7, a preferred embodiment of a high-speed game device according to the present invention is connected to a personal computer 22 via a USB port 21, and comprises a microcontroller 31, a detector 32, a main input module 33, a task scheduling module 34 and an active module 35. The high-speed game device is an information input device, and is selected from one of a mouse, a keyboard and a joystick, and is used for quickly converting actions of a user into instructions to control the personal computer 22.
The primary input module 33 and the detector 32 are passive components for driving the microcontroller 31 to perform tasks. The active module 35 is an active component whereby the high speed response game device can send out information.
The microcontroller 31 is in communication with the pc 22, and is capable of receiving information from the detector 32 and the primary input module 33 for operation, and the microcontroller 31 is also capable of obtaining a response command 221 from the pc 22 for operation, for example, a computer game in the pc 22 requires a mouse to emit light, or a mouse to vibrate, or a mouse to emit sound, and the pc 22 sends the response command 221 to the microcontroller 31. The microcontroller 31 is electrically connected to a flash memory 313 (Flash Mass Storage) to enable the microcontroller 31 to store digital information and perform digital operations.
The detector 32 is electrically connected to the microcontroller 31, and the detector 32 detects an environmental condition 321 for triggering the microcontroller 31 to generate a detection command 322. The detector 32 is selected from a Touch area 323 (Touch area), a Touch device 324 (Touch key), a Touch pad 325 (Touch pad), a three-axis acceleration Sensor 326 (3 axis Accelerometer), a gyroscope 327 (Gyro Sensor), a light change Sensor 328 (Ambient light Sensor), a Proximity Sensor 329 (Proximity Sensor), and combinations thereof, for enhancing additional functions of the high-speed game device.
The main input module 33 is electrically connected to the microcontroller 31, and the main input module 33 detects an external information 331 for triggering the microcontroller 31 to generate an input command 332. The main input module 33 is selected from a surface movement detector 333 (Surface Motion Sensor), a Button matrix 334 (Button matrix), a keyboard matrix 335 (Key matrix), a scroll sensor 336 (Combined scroll/tilt wire) and a combination thereof, which are the main functions of the high-speed game device.
The active module 35 is electrically connected to the microcontroller 31, and the microcontroller 31 controls the active module 35 according to the task performed. The active module 35 can send information to the outside, so that the user can directly respond to the information fed back by the game program executed by the personal computer 22.
Preferably, the active module 35 is selected from a Vibration motor 351 (Vibration motor), a light emitting module 352 (LED controller/LED Array) and a combination thereof, the Vibration motor 351 can vibrate the high-speed reaction game device, the light emitting module 352 can emit light to the outside, and other active components, such as a sound generating component, can be used in practice, but not limited thereto.
Referring to fig. 8, the task scheduling module 34 is electrically connected to the microcontroller 31 for controlling task scheduling of the microcontroller 31. The high-speed game device is provided with a Micro Controller Unit (MCU) 31, which is electrically connected to a wheel Sensor 336 (combinerd scroll/tilt), a light emitting module 352 (LED controller/LED Array), a Touch area 323 (Touch area), a surface movement detector 333 (Surface Motion Sensor), a flash memory 313 (Flash Mass Storage), a Button matrix 334 (Button matrix), a triaxial acceleration Sensor 326 (3 axis Accelerometer) and a gyroscope 327 (Gyro Sensor), respectively, and the micro controller unit 31 is in information connection with the personal computer 22 through the USB port 21 for controlling the personal computer 22.
Referring to fig. 9, the task scheduling module 34 is electrically connected to the microcontroller 31 for controlling task scheduling of the microcontroller 31. The high-speed game device is provided with a Micro Controller Unit (MCU) 31, which is electrically connected to a Touch panel 325 (Touch pad), a light emitting module 352 (LED controller/LED Array), a Touch module 324 (Touch keys), a flash memory 313 (Flash Mass Storage), a light change Sensor 328 (Ambient light Sensor), a Proximity Sensor 329 (Proximity Sensor) and a keyboard matrix 335 (Key matrix), respectively, and the micro controller unit 31 is in information connection with the personal computer 22 through the USB port 21 for controlling the personal computer 22.
Referring to fig. 10, the task allocation method of the preferred embodiment includes an initial step 901, an instruction triggering step 902, a new task step 903, a task scheduling step 904 and a task executing step 905.
Referring to fig. 11 and 12, the initial step 901 is first performed, and a task scheduling module 34 controls a microcontroller 31 to perform a plurality of basic tasks 311 in a super-loop. The plurality of basic tasks 311 are used to detect whether the state of the detector 32 or the main input module 33 is changed, and whether the personal computer 22 sends out a response command 221.
When the microcontroller 31 starts to operate, the initial setting 30 provides the task scheduling module 34 to order the plurality of basic tasks 311, so that the microcontroller 31 sequentially executes the plurality of basic tasks 311.
With the progress of semiconductor technology, the integrated circuit operates at a fast speed, which makes people feel that the electronic product has the illusion of multitasking, but even if the hardware speed is fast in the current technology, the integrated circuit can only execute one task at one time point, and cannot execute a plurality of tasks at one time point.
Early mice and keyboards used simple commands to detect the user's movements one by simple cycles, i.e. to send commands to the personal computer 22, which are not prone to downtime, thus improving the hardware specifications and achieving real-time (real-time) goals.
However, since the mouse and the keyboard for electronic competition can be added with various detection components, even the user-defined instruction for the key, and the control resolution of the screen pointer can be greatly improved, the mouse and the keyboard for electronic competition must execute a large amount of digital data in a single time, and the information can be quickly transmitted with the personal computer 22. However, simply increasing the hardware specification can only increase the operation speed, and cannot change the defects of the program.
Therefore, the task scheduling module 34 of the preferred embodiment sets a basic section time for the basic tasks 311, and orders the basic tasks 311. So that the microcontroller 31 sequentially performs the plurality of basic tasks 311. When the microcontroller 31 does not complete a basic task 311 at a basic section time, execution of the basic task 311 is suspended, so that the microcontroller 31 executes another basic task 311, and it is detected whether the state of the detector 32 or the main input module 33 is changed, and whether the personal computer 22 issues a response command 221.
Preferably, the microcontroller 31 stores the operating parameters of the basic task 311 while suspending the executed basic task 311, so that the microcontroller 31 can continue the basic task 311 while executing the basic task 311 again.
Since the plurality of basic tasks 311 are used to obtain whether the state of the detector 32 or the main input module 33 is changed, whether the personal computer 22 sends the response command 221, the task is simple and does not need to perform complex operation, and the task running time is short, so that the task scheduling module 34 does not need to set the basic segment time for the plurality of basic tasks 311 in actual implementation, and the end parameter of each basic task 311 is used as the scheduling of the task scheduling module 34, which is not limited.
Then, the instruction triggering step 902 is executed, and the detector 32 detects an environmental state 321 to trigger the microcontroller 31 to generate a detection instruction 322. A primary input module 33 detects an external message 331 to trigger the microcontroller 31 to generate an input command 332.
The plurality of basic tasks 311 are used for judging whether the detector 32 detects the environmental status 321, and when the detector 32 detects the change of the environmental status 321, one of the plurality of basic tasks 311 obtains that the detector 32 detects the change of the environmental status 321, the basic task 311 is triggered to generate the detection command 322.
When the main input module 33 detects the change of the external information 331, and one of the plurality of basic tasks 311 obtains that the main input module 33 detects the change of the external information 331, the basic task 311 is triggered to generate the external information 331.
When one of the basic tasks 311 obtains a response command 221 from the personal computer 22 to the microcontroller 31, the basic task 311 is triggered to download the response command 221.
For example, when the detector 32 is a three-axis acceleration sensor 326 (3 axis Accelerometer), one of the plurality of basic tasks 311 is responsible for determining whether the detector 32 detects the change of the environmental status 321, and when the high-speed game device moves, the detector 32 detects the movement of the high-speed game device, that is, the change of the environmental status 321, and the basic task 311 determines that the detector 32 detects the environmental status 321, the basic task 311 triggers the microcontroller 31 to generate the detection command 322.
When the primary input module 33 is a surface movement detector 333 (Surface Motion Sensor), one of the plurality of basic tasks 311 is responsible for determining whether the primary input module 33 detects the change in the external information 331, and when the basic task 311 determines that the primary input module 33 detects the external information 331, the basic task 311 triggers the microcontroller 31 to generate an input command 332.
One of the plurality of basic tasks 311 is responsible for determining whether the personal computer 22 issues a response command 221, and when the game program of the personal computer 22 triggers an event requiring the high-speed response game device to emit light, the personal computer 22 issues a response command 221 to the microcontroller 31, and the basic task 311 receives the response command 221.
Then, the task adding step 903 is performed, and the microcontroller 31 adds a task 312 via one of the detection command 322, the input command 332, and the response command 221. The microcontroller 31 sets a defined working time for the working task 312.
Typically, the tasks 312 are designed by a programmer, who knows that the tasks 312 will complete within a certain time, and therefore, each task 312 defaults to the defined time.
For example, when the triggered detection command 322, the triggered external information 331 or the received response command 221 controls the active module 35 of the light emitting module 352 to emit light, the microcontroller 31 will add a task 312 to control the active module 35 to emit light, and set a limited working time of the task 312, that is, the task 312 must end within the limited working time, otherwise, it is determined that a problem occurs in the task 312.
Next, the task scheduling step 904 is performed, and the task scheduling module 34 sets a work section time for the work task 312 and places the work task 312 into a super-loop. The work task 312 added by the microcontroller 31 is not limited to one.
When the microcontroller 31 adds a plurality of tasks 312, the task scheduling module 34 sets a task section time for each task 312, and orders the tasks 312 with the basic task 311 to control the microcontroller 31 to execute tasks in super-cycle.
Finally, the task execution step 905 is executed, the microcontroller 31 executes the plurality of basic tasks 311 and the work task 312 in a super-loop, and when the microcontroller 31 does not complete the work task 312 in the work section time, the execution of the work task 312 is suspended, and the microcontroller 31 executes another basic task 311 or the work task 312 according to the schedule of the task schedule module 34.
The microcontroller 31 stores the information of the task before the task 312 is paused, so that the task before the pause is continued when the super loop executes the task 312 again. When the task 312 ends, the microcontroller 31 deletes the task 312 from the super loop.
In addition, when the microcontroller 31 does not complete the basic task 311 at the basic section time, execution of the basic task 311 is suspended, and the microcontroller 31 executes another basic task 311 or a work task 312 according to the schedule of the task scheduling module 34.
The microcontroller 31 counts the working time of the working task 312 and generates a total working time. When the task 312 is suspended in the super-cycle, the microcontroller 31 compares the total working time with the defined working time. When the total operating time is greater than the defined operating time, the microcontroller 31 generates an error command.
For example, when the total working time of the working task 312 is longer than the limited working time, it indicates that a problem occurs in the execution of the working task 312, and a problem of delay or downtime may occur, so that when the working task 312 cannot be completed in the limited working time, the microcontroller 31 must generate an error command to add another working task 312 as a task for solving the problem, such as debugging, alarming, or reporting.
The inventor emphasizes that with the progress of semiconductor technology, the speed of executing the program by hardware is fast, so that the instruction issued by the user can react in real time, but the hardware cannot debug, and the problem that the error occurs in huge and complex operation data and the downtime occurs.
Therefore, the present invention high-speed game device and task allocation method no longer uses the early infinite loop as the basis for detecting each sensor, but uses the task scheduling module 34 to take charge of the sequencing of each basic task 311 and each work task 312, and limits the time for the microcontroller 31 to execute each section, so that the microcontroller 31 mainly executes the basic tasks 311 and the work tasks 312, and forms a super loop controlled by the task scheduling module 34. The user can be confirmed whether to issue the instruction or not and respond in real time at any time, so that the problem that the user cannot acquire or delay the instruction issued by the user due to overlong execution time of the work task 312 is avoided.
From the above description, the high-speed response game device and the task allocation method thereof of the present invention do have the following effects:
1. real-time response:
the task scheduling module 34 sets a working section time for the working task 312, and arranges the working task 312 into a super cycle, and when the microcontroller 31 does not complete the working task 312 in the working section time, it pauses the execution of the working task 312, and executes the plurality of basic tasks 311 to respond to the instruction issued by the user in real time.
2. Avoiding downtime:
when the microcontroller 31 executes the plurality of basic tasks 311 and the plurality of work tasks 312 in a super-loop, a delay condition of the high-speed game device can be avoided, and when the executed work tasks 312 are paused each time, the microcontroller 31 compares the total work time and the limited work time of the work tasks 312 to determine whether the paused work tasks 312 are down.
3. Processing large amounts of data:
by means of the allocation of the task scheduling module 34, the microcontroller 31 can mainly execute the plurality of basic tasks 311, and the mode of executing the plurality of working tasks 312 is auxiliary to avoid downtime, and respond to the instruction of the user in real time, so that the designer can greatly improve the resolution of the high-speed response game device, or the additional functions, and the microcontroller 31 can truly execute a large amount of digital data.
In summary, the task scheduling module 34 is responsible for designating the order of execution of the plurality of basic tasks 311 and the plurality of work tasks 312, and defining the working section time of each work task 312, so that the microcontroller 31 can pause the work task 312 at the working section time when executing each work task 312, so that the microcontroller 31 executes the plurality of basic tasks 311 to confirm whether the user gives an instruction in real time, and further the high-speed game device responds to the instruction of the user in real time, thereby actually achieving the purpose of the invention.
The foregoing description is only illustrative of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, i.e., the invention is not limited to the specific embodiments described herein, but is to be accorded the full scope of the claims.

Claims (9)

1. A method of task allocation, comprising the steps of:
an initial step, a task scheduling module orders a plurality of basic tasks and controls a microcontroller to sequentially execute the basic tasks in a super-cycle mode, wherein the basic tasks are used for obtaining whether the states of a detector and/or a main input module are changed or not;
an instruction triggering step, wherein the detector detects an environmental state, one of the plurality of basic tasks obtains the change of the environmental state detected by the detector to trigger the microcontroller to generate a detection instruction, the main input module detects external information, and one of the plurality of basic tasks obtains the change of the external information detected by the main input module to trigger the microcontroller to generate an input instruction;
a task adding step, wherein the detection instruction and/or the input instruction enable the microcontroller to add a corresponding number of work tasks;
a task scheduling step, wherein the task scheduling module sets a working section time for each work task and arranges the newly added work task into a super cycle; and
And a task execution step, wherein the microcontroller executes the basic tasks and the newly added work task in a super-loop, when the microcontroller does not complete the work task in the work section time, the execution of the work task is suspended, the microcontroller executes another basic task or the work task according to the schedule of the task scheduling module, and when the work task is finished, the microcontroller deletes the work task from the super-loop.
2. The task allocation method according to claim 1, wherein in the task execution step, the microcontroller stores the work information before the suspension of the work task so that the work before the suspension is continued when the super loop executes the work task again.
3. The method according to claim 2, wherein in the initial step, the task scheduling module further sets a basic block time for the plurality of basic tasks, respectively, and in the task executing step, the execution of the basic task is suspended when the microcontroller does not complete the basic task at the basic block time.
4. The task allocation method according to claim 3, wherein in the step of adding the task, the microcontroller sets a defined working time for the task, and in the step of executing the task, the microcontroller counts the working time of the task and generates a total working time.
5. The method of claim 4, wherein in the task execution step, the microcontroller compares the total operating time with the limit operating time when the task is suspended in the super-cycle, and generates an error command when the total operating time is greater than the limit operating time.
6. The method of claim 5, wherein in the step of triggering the instruction, a personal computer sends a response instruction to the microcontroller, and in the step of adding the task, the microcontroller obtains the response instruction to generate the task.
7. A high-speed response game device adapted to the task allocation method according to any one of claims 1 to 6 and connected to a personal computer via a USB port, the high-speed response game device comprising:
a microcontroller for transmitting information with the personal computer;
a detector electrically connected with the microcontroller, wherein the detector detects an environmental state and is used for triggering the microcontroller to generate a detection instruction;
the main input module is electrically connected with the microcontroller and is used for detecting external information and triggering the microcontroller to generate an input instruction; and
And the task scheduling module is electrically connected with the microcontroller and used for controlling task scheduling of the microcontroller.
8. The high-speed reactive gaming apparatus of claim 7, further comprising an active module electrically coupled to said microcontroller, said microcontroller controlling said active module in response to said task being performed.
9. The high-speed game machine according to claim 8, wherein the personal computer issues a response command to the microcontroller to obtain the response command.
CN201810069625.1A 2018-01-24 2018-01-24 High-speed reaction game device and task allocation method thereof Active CN110069323B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810069625.1A CN110069323B (en) 2018-01-24 2018-01-24 High-speed reaction game device and task allocation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810069625.1A CN110069323B (en) 2018-01-24 2018-01-24 High-speed reaction game device and task allocation method thereof

Publications (2)

Publication Number Publication Date
CN110069323A CN110069323A (en) 2019-07-30
CN110069323B true CN110069323B (en) 2024-04-05

Family

ID=67365606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810069625.1A Active CN110069323B (en) 2018-01-24 2018-01-24 High-speed reaction game device and task allocation method thereof

Country Status (1)

Country Link
CN (1) CN110069323B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2239228C2 (en) * 2001-07-05 2004-10-27 Всероссийский научно-исследовательский институт автоматики Method for distributing time of central processor between tasks in automatized system for controlling technological processes
WO2007028942A1 (en) * 2005-09-09 2007-03-15 The University Of Leicester Time-triggered co-operative hardware scheduler
CN101751294A (en) * 2008-10-17 2010-06-23 环旭电子股份有限公司 BIOS instruction control method
CN103842930A (en) * 2011-09-28 2014-06-04 密克罗奇普技术公司 Microcontroller with scheduling unit
CN104202394A (en) * 2014-09-01 2014-12-10 中国东方电气集团有限公司 Implementation method of multitask application program based on GPRS (general packet radio service) monitor terminal
CN104536345A (en) * 2014-12-17 2015-04-22 万向钱潮股份有限公司 Multitask control method based on vehicle electrical control system
CN107239324A (en) * 2017-05-22 2017-10-10 阿里巴巴集团控股有限公司 Work flow processing method, apparatus and system
CN107273232A (en) * 2017-05-22 2017-10-20 国网安徽省电力公司信息通信分公司 A kind of Enterprise Informatization system self-healing dispatching method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9411641B2 (en) * 2012-10-04 2016-08-09 Lawrence J. Dickson Method and apparatus implemented in processors for real-time scheduling and task organization based on response time order of magnitude
US9405582B2 (en) * 2014-06-20 2016-08-02 International Business Machines Corporation Dynamic parallel distributed job configuration in a shared-resource environment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2239228C2 (en) * 2001-07-05 2004-10-27 Всероссийский научно-исследовательский институт автоматики Method for distributing time of central processor between tasks in automatized system for controlling technological processes
WO2007028942A1 (en) * 2005-09-09 2007-03-15 The University Of Leicester Time-triggered co-operative hardware scheduler
CN101751294A (en) * 2008-10-17 2010-06-23 环旭电子股份有限公司 BIOS instruction control method
CN103842930A (en) * 2011-09-28 2014-06-04 密克罗奇普技术公司 Microcontroller with scheduling unit
CN104202394A (en) * 2014-09-01 2014-12-10 中国东方电气集团有限公司 Implementation method of multitask application program based on GPRS (general packet radio service) monitor terminal
CN104536345A (en) * 2014-12-17 2015-04-22 万向钱潮股份有限公司 Multitask control method based on vehicle electrical control system
CN107239324A (en) * 2017-05-22 2017-10-10 阿里巴巴集团控股有限公司 Work flow processing method, apparatus and system
CN107273232A (en) * 2017-05-22 2017-10-20 国网安徽省电力公司信息通信分公司 A kind of Enterprise Informatization system self-healing dispatching method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
An Operation-Time Simulation Framework for UAV Swarm Configuration and Mission Planning;Yi Wei等;《Procedia Computer Science》;20131231;第18卷;1949-1958 *
基于LabVIEW队列状态机的数据采集系统设计;叶枫桦等;《现代电子技术》;20100215;第33卷(第04期);204-207+210 *

Also Published As

Publication number Publication date
CN110069323A (en) 2019-07-30

Similar Documents

Publication Publication Date Title
JP5204224B2 (en) Object detection using video input combined with tilt angle information
CN107297073B (en) Method and device for simulating peripheral input signal and electronic equipment
US20090093307A1 (en) Enhanced game controller
JP5726811B2 (en) Method and apparatus for use in determining lack of user activity, determining user activity level, and / or adding a new player to the system
JP2009205685A (en) Simulation of multi-point gesture by single pointing device
US8797283B2 (en) Method and apparatus for performing user-defined macros
US8847880B2 (en) Method and apparatus for providing motion library
US10163245B2 (en) Multi-mode animation system
TW201324241A (en) System and method for identifying swing features using electronic device
CN105103091A (en) Manually operable input device with code detection
CN110069147B (en) Control device and control method thereof
CN110069323B (en) High-speed reaction game device and task allocation method thereof
WO2016114247A1 (en) Interface program for advancing game by touch input, and terminal
TWI661338B (en) A high-speed reaction game device and its task allocation method
CN113467625A (en) Virtual reality control device, helmet and interaction method
CN105393214B (en) Self-revealing symbolic gestures
JP2017012619A (en) Computer program for advancing game by touch operation
CN107016983A (en) A kind of piano control method, system and a kind of electronic equipment
TWM560055U (en) High-speed reaction game device
KR101064265B1 (en) Information input device and method from three-dimensional space
US10888769B2 (en) Method and apparatus for enhancing accuracy associated with a gaming accessory in accordance with a distance of the gaming accessory relative to a surface
JP7072625B1 (en) Game development system
KR101521889B1 (en) Digital device and providing method thereof
Vuyyuru et al. Performing Basic Tasks on Computer using Hand Gestures & Ultrasonic Sensors
JP5938501B1 (en) Computer program and game program for progressing game by touch operation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant