CN116414356A - Program design method of children offline programmer - Google Patents

Program design method of children offline programmer Download PDF

Info

Publication number
CN116414356A
CN116414356A CN202111644810.7A CN202111644810A CN116414356A CN 116414356 A CN116414356 A CN 116414356A CN 202111644810 A CN202111644810 A CN 202111644810A CN 116414356 A CN116414356 A CN 116414356A
Authority
CN
China
Prior art keywords
instruction data
programming
judgment
type
program
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.)
Pending
Application number
CN202111644810.7A
Other languages
Chinese (zh)
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.)
Nanjing Chuangyi Intelligent Technology Co ltd
Original Assignee
Nanjing Chuangyi Intelligent Technology Co ltd
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 Nanjing Chuangyi Intelligent Technology Co ltd filed Critical Nanjing Chuangyi Intelligent Technology Co ltd
Priority to CN202111644810.7A priority Critical patent/CN116414356A/en
Publication of CN116414356A publication Critical patent/CN116414356A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B19/00Teaching not covered by other main groups of this subclass
    • G09B19/0053Computers, e.g. programming
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • Programmable Controllers (AREA)

Abstract

A programming method of a child offline programmer meets the following logic: firstly, different functional codes are modularized in the program design of the singlechip and correspond to defined instruction data one by one; when the off-line programmer is used for programming, the singlechip converts the received instruction information into corresponding instruction data and sequentially stores the corresponding instruction data in the designated area address of the program memory according to the sequence, so that the programming process is simplified, the difficulty and the learning cost of learning programming are reduced, the interest of students in scientific and technological manufacturing is improved, and meanwhile, the traditional programming structural form is followed.

Description

Program design method of children offline programmer
Technical Field
The invention relates to the field of computers, in particular to a programming method of an offline programmer for children.
Background
Programming is a logic setting process for solving specific requirements, and programming a device such as a robot is more so that the device automatically performs a certain task according to the intention of a writer. With the development of science and technology, many students in middle and primary schools come into contact with related courses of artificial intelligence, and programming education is gradually promoted among the students in middle and primary schools. However, the conventional programming not only needs to use a tool such as a computer, but also has a relatively complex programming language, and for programming hardware such as a singlechip, the conventional programming method also needs multiple steps such as installation, debugging, compiling, downloading, and the like, so that the use process is relatively complicated.
As is well known, general program structural forms are classified into sequential structures, branch structures, loop structures, and the like. The sequence structure is the most basic and simplest program, namely, each instruction is executed in sequence according to the programming sequence; when solving the actual problem, it is generally required that the processor can make some decisions, and according to whether the conditions of the decisions are satisfied, one or more program branches are produced to implement different program flow directions, which is a branch structure; in addition, in some applications, a situation may be encountered in which a particular piece of code is executed multiple times, where a loop structure may be employed to shorten the code length. In the related education of artificial intelligence of middle and primary schools, the programming mainly designs logic programs for hardware such as a singlechip and the like. It is necessary to design an off-line programmer which can follow the program structure form and can be programmed without a computer so as to reduce the learning cost and simplify the programming process.
Disclosure of Invention
In order to simplify the programming process, reduce the difficulty of learning programming and the learning cost, improve the interest of students in science and technology manufacturing, and simultaneously follow the traditional programming structure form, the invention discloses a programming method of the children offline programmer.
The invention is realized by the following technical scheme: a programming method of a child offline programmer meets the following logic: firstly, different functional codes are modularized in the program design of the singlechip and correspond to defined instruction data one by one; when the off-line programmer is used for programming, the singlechip converts the received instruction information into corresponding instruction data and sequentially stores the corresponding instruction data in the designated area address of the program memory according to the sequence; when the off-line programmer executes the instruction data, the singlechip firstly reads the instruction data in sequence in the designated area address of the program memory, finds the position of the judging instruction data, and takes all the instruction data between the two judging instruction data (or between the judging instruction data and the ending instruction data) as a branch program of the front judging instruction data; then sequentially executing corresponding modularized function codes according to the instruction data until judging type instruction data are encountered and corresponding judgment is carried out, if the condition is met, sequentially executing modularized function codes corresponding to branch programs under the judging type instruction data, if the condition is not met, directly jumping to next judging type instruction data and carrying out corresponding judgment until ending instruction data are encountered, and ending an execution period; finally, considering that the program of the hardware generally needs to be repeatedly executed, the program needs to be executed again according to the logic loop after the execution is completed.
Preferably, the instruction data is divided into three types of flag type, execution type and judgment type, wherein the flag type instruction data comprises but is not limited to start instruction data and end instruction data; the execution type instruction data includes, but is not limited to, waiting instruction data, interface output high level instruction data, interface output low level instruction data, interface output data instruction data, etc.; the judging instruction data comprises, but is not limited to, judging the level of the input of the interface, judging the size of the input data of the interface, judging whether the interface is input or not, judging the condition that the condition is not met and the like;
preferably, the address where the instruction data is stored is generally selected in a later region to prevent the main program memory space from overlapping the address where the instruction data is stored, resulting in erasure of the main program portion code during programming and incorrect execution. Starting from the receipt of start instruction data by the singlechip, storing the instruction data in a two-dimensional array, sequentially storing other received instruction data until receiving end instruction data, and sequentially storing all received data in addresses of selected areas.
Preferably, when executing the instruction data, if the instruction data is not judged, sequentially executing modularized function codes corresponding to the instruction data after starting the instruction data until ending the instruction data; if judging type instruction data exist, the modularized function codes corresponding to the instruction data are sequentially executed from the beginning of the instruction data until the judging type instruction data are encountered and corresponding judgment is carried out, if the condition is met, the modularized function codes corresponding to the branch program under the judging type instruction data are sequentially executed, if the condition is not met, the next judging type instruction data are directly jumped to and corresponding judgment is carried out, and the period is ended until the ending instruction data are encountered; the loop execution is then restarted as per the logic above.
Preferably, the judgment-type instruction data for the case where the defined judgment condition is not satisfied is, in principle, only the opposite of the judgment-type instruction data for which the preceding judgment condition is satisfied.
Drawings
FIG. 1 is a flow chart of a programming method according to an embodiment.
FIG. 2 is a schematic diagram of a child off-line programmer provided in accordance with an embodiment.
FIG. 3 is a case diagram of a set of instruction data provided in accordance with one embodiment.
Detailed Description
In order to make the application objects, features, and advantages of the present application more comprehensible, various illustrative embodiments of the technical solution will now be described in detail with reference to the accompanying drawings. It will be apparent that the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise. Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate. In all examples shown and discussed herein, any specific values should be construed as merely illustrative, and not a limitation. Thus, other examples of exemplary embodiments may have different values.
The invention is further elucidated below in connection with the drawings and the specific embodiments.
A programming method of an off-line programmer for children, as shown in fig. 1, comprising the following steps:
step 101: setting instruction data, wherein the instruction data comprises data types, data functions and function code modules corresponding to the data;
step 102: when the start instruction data is read, the instruction data is stored in a two-dimensional array, and then the received other instruction data are sequentially stored in sequence until the end instruction data are received, and all the received data are sequentially stored in the addresses of the selected areas in sequence.
Step 103: and when the non-programming mode of inputting the instruction data is not started or all instruction data are stored, the execution mode is adopted, the instruction data are sequentially read from the designated address, whether the judgment type instruction data exist in the instruction data is checked, and the sequence structure is sorted.
Step 104: after finishing the arrangement of the program structure, executing the corresponding functional code module by combining the triggering condition of the singlechip interface. And resumes the loop execution after one cycle of execution.
In some embodiments, as shown in fig. 2, the hardware parts are assembled by an instruction input unit, a single chip microcomputer, an interface 1, an interface 2, an interface 3, an interface 4 and a power management 7, if the interface 1 is triggered, the interface 3 is required to output a high level, if the interface 1 is not triggered, the interface 3 is required to output a low level, the programming logic diagram is shown in fig. 3, only the user needs to sequentially output instruction data according to the sequence of fig. 3, and the target function can be realized after programming is completed.
The foregoing description is only illustrative of the preferred embodiments of the present application and the technical principles employed, and it will be understood by those skilled in the art that the scope of the invention in question is not limited to the specific combination of features described above but encompasses other technical solutions which may be formed by any combination of features described above or their equivalents without departing from the inventive concept.

Claims (5)

1. A programming method of an off-line programmer for children, which is characterized by comprising the following steps: the logic satisfied is: firstly, different functional codes are modularized in the program design of the singlechip and correspond to defined instruction data one by one; when the off-line programmer is used for programming, the singlechip converts the received instruction information into corresponding instruction data and sequentially stores the corresponding instruction data in the designated area address of the program memory according to the sequence; when the off-line programmer executes the instruction data, the singlechip firstly reads the instruction data in sequence in the designated area address of the program memory, finds the position of the judgment type instruction data, and takes all instruction data between two judgment type instruction data or between the judgment type instruction data and the ending instruction data as a branch program of the front judgment type instruction data; then sequentially executing corresponding modularized function codes according to the instruction data until judging type instruction data are encountered and corresponding judgment is carried out, if the condition is met, sequentially executing modularized function codes corresponding to branch programs under the judging type instruction data, if the condition is not met, directly jumping to next judging type instruction data and carrying out corresponding judgment until ending instruction data are encountered, and ending an execution period; finally, considering that the program of the hardware generally needs to be repeatedly executed, the program needs to be executed again according to the logic loop after the execution is completed.
2. The method for programming a child off-line programmer of claim 1, wherein: the instruction data is divided into three types of mark type, execution type and judgment type, wherein the mark type instruction data comprises but is not limited to start instruction data and end instruction data.
3. The method for programming a child off-line programmer of claim 1, wherein: the address of the stored instruction data is generally selected from a later area, so as to prevent the situation that the code of the main program part is erased and can not be executed correctly in the programming process due to the superposition of the main program storage space and the address of the instruction data storage, the instruction data is stored in a two-dimensional array after being received by the singlechip, the received other instruction data are sequentially stored in sequence until the end instruction data are received, and all the received data are sequentially stored in the address of the selected area.
4. The method for programming a child off-line programmer of claim 1, wherein: when executing the instruction data, if the instruction data is not judged, sequentially executing modularized function codes corresponding to the instruction data after starting the instruction data until ending the instruction data; if judging type instruction data exist, the modularized function codes corresponding to the instruction data are sequentially executed from the beginning of the instruction data until the judging type instruction data are encountered and corresponding judgment is carried out, if the condition is met, the modularized function codes corresponding to the branch program under the judging type instruction data are sequentially executed, if the condition is not met, the next judging type instruction data are directly jumped to and corresponding judgment is carried out, and the period is ended until the ending instruction data are encountered; the loop execution is then restarted as per the logic above.
5. The method for programming a child off-line programmer of claim 1, wherein: the judgment type instruction data for the case where the defined judgment condition is not satisfied is basically only the opposite face of the judgment type instruction data for which the preceding judgment condition is satisfied.
CN202111644810.7A 2021-12-30 2021-12-30 Program design method of children offline programmer Pending CN116414356A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111644810.7A CN116414356A (en) 2021-12-30 2021-12-30 Program design method of children offline programmer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111644810.7A CN116414356A (en) 2021-12-30 2021-12-30 Program design method of children offline programmer

Publications (1)

Publication Number Publication Date
CN116414356A true CN116414356A (en) 2023-07-11

Family

ID=87049766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111644810.7A Pending CN116414356A (en) 2021-12-30 2021-12-30 Program design method of children offline programmer

Country Status (1)

Country Link
CN (1) CN116414356A (en)

Similar Documents

Publication Publication Date Title
US5303170A (en) System and method for process modelling and project planning
US7930589B2 (en) Interrupt-responsive non-volatile memory system and method
CN109522033B (en) ECU program and data upgrading method based on device operation self-programming and double-interrupt vector table
Liang et al. The study of soft PLC running system
CN115390809A (en) Simulation scheduling method and system
US20020007434A1 (en) Non-volatile memory capable of autonomously executing a program
CN111767589A (en) Batch processing method, system, terminal and storage medium based on static rigidity of automobile mounting point
CN109471636B (en) Operator mapping method and system of coarse-grained reconfigurable architecture
CN116414356A (en) Program design method of children offline programmer
CN109542494B (en) Extension control method and terminal for VR software peripheral
EP1530130A2 (en) Simulator and simulation method
Schulz-Rosengarten et al. Polyglot modal models through Lingua Franca
CN112487092A (en) Intelligent contract calling method and device based on block chain
CN116541268A (en) Method and system for context-aware dependency-guided kernel fuzzy test case variation
CN113946481B (en) RISC-V kernel MCU debugging downloading program method and debugger
CN112764379B (en) IAP control method based on DSP system
CN111966602A (en) Fixed point code debugging method, system, terminal and storage medium
CN112241268A (en) Keil engineering compiling method, system and equipment
Gilles et al. Applying WCET analysis at architectural level
CN112802527B (en) Method for realizing high-speed programming of embedded flash memory and programming system of embedded flash memory
CN111596923A (en) Haxe static link library construction method and device and electronic equipment
US8265789B2 (en) Network-based robot system and method for action execution of robot
Verhoef On the use of VDM++ for specifying real-time systems
CN102203728A (en) System and method of dynamically building a behavior model on a hardware system
CN116090406B (en) Random verification method and device for ping-pong configuration circuit, upper computer and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication