A Method for Realizing Single Chip Microcomputer Operating System Based on Message Queue

A message queue and operating system technology, which is applied in the field of single-chip operating system implementation based on message queues, can solve the problems of lack of real-time performance and occupy dozens of KB, and achieve the effect of concise code structure and improved software operation efficiency

Active Publication Date: 2016-01-27
SICHUAN TIANYI COMHEART TELECOM
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

If the existing popular embedded operating system is transplanted into the single-chip microcomputer, it will take up tens of KB of ROM space at every turn, and the advantage of real-time performance is gone.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A Method for Realizing Single Chip Microcomputer Operating System Based on Message Queue
  • A Method for Realizing Single Chip Microcomputer Operating System Based on Message Queue
  • A Method for Realizing Single Chip Microcomputer Operating System Based on Message Queue

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0026] The technical solution of the present invention will be further described in detail below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following description.

[0027] A method for implementing a single-chip operating system based on message queues. It uses C language to write program codes, and uses Keil's compiler to compile and generate binary execution files. Its core program codes include the following content and steps:

[0028] S1: Define the message structure type, including message word, parameter A and parameter B;

[0029] S2: Define the message queue, first define the length of the message queue according to the chip's memory resources and task processing conditions, and then define an array whose data type is a message structure as a message queue for storing messages and parameters;

[0030] S3: Define the access pointer of the message queue. When initializing, the access pointer is s...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a singlechip operating system implementation method based on a message queue. According to the method, program codes are edited by use of C language, and a compiler of Keil company is utilized for compiling to generate a binary execution file. The method comprises the following steps of: firstly, defining message structure types and a message structure type array taken as a message queue; then designing a message access function to realize a first-in first-out function of the message queue; and finally, infinitely and circularly reading messages by virtue of a main function, calling a corresponding task treatment function according to message values, and performing the next circulation after the task treatment function is returned. The method has the beneficial effects that in a singlechip software system, pre-stored messages are executed, so that the function of a preemptive multitasking operating system is realized, the edited codes are concise in structure, distinct in gradation and easy to maintain, and the software operating efficiency is obviously improved.

Description

technical field [0001] The invention relates to a method for realizing an operating system of a single-chip microcomputer based on a message queue. Background technique [0002] As we all know, the program storage space and data storage space of the single-chip microcomputer are relatively scarce. The program addressing space and data addressing space of the standard model 51 series single-chip microcomputer are only 64KB, and the clock frequency is mostly lower than 100MHz. If the existing popular embedded operating system is transplanted into the single-chip microcomputer, it will take up tens of KB of ROM space at every turn, and the advantage of real-time performance is gone. Therefore, it is necessary to design an operating system with a small footprint and high operating efficiency for the software of the single-chip microcomputer. Contents of the invention [0003] The purpose of the present invention is to overcome the deficiencies of the prior art, provide a sing...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/38
Inventor 李俊画马剑朱永莫平勇
Owner SICHUAN TIANYI COMHEART TELECOM
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products