Design and Implementation of a Programming Language for the Study of Microcomputer Control

Bibliographic Information

Other Title
  • マイコン制御学習用プログラミング言語の設計と実装

Search this article

Description

今年度より中学校の技術・家庭科ではこれまで選択であった「D情報に関する技術(3)プログラムによる計測・制御」が必修となる.しかしながら,人的,予算的,時間的,および動作環境的といった様々な制約の中で行わなければならないという現実がある.これらを克服するために開発された教材に三田市立長坂中学校教諭浅田寿展氏の考案によるヒダピオシステムがある.このシステムでは,マイコン制御を行う際にBASICの文法で書かれたプログラムを機械語に翻訳する必要があり,これまでは市販のBASICコンパイラを使用していた.しかし,市販のコンパイラには,(1)インストールする必要がある,(2)中学生にとって煩雑なコンパイル作業が必要である,(3)購入する予算が必要である等の問題点がある.そこで,中学生がマイコンを使って制御を学習するためのプログラミング言語を設計し処理系をスクリプティング言語AWKで実装した.コンパイラはヒダピオシステムの簡易プログラミングでの文法を受理し,Atmel社のAVRマイコンのアセンブリ言語を出力する.また,市販のBASICコンパイラの文法のサブセットにも対応した.開発したコンパイラは実際に中学校の授業で利用されるほか,小中学生を対象にしたものづくり教室での電子オルゴール作成に使用されており,その有効性,実用性について実証されている.

In junior high school, “Measurement and Control by Program” becomes compulsory from the current year. However, there is a reality that must be made of various constraints in human resources, budget, time, and an operating environment. There is a teaching material has been developed to overcome these called “Hidapio”. In this system, need to be translated into machine language program when performing a microcomputer control, until now, was using the BASIC compiler on the market. However, there is a problem such as the following: (1) There is a need to install the compiler on the market. (2) It is necessary for middle school students do cumbersome compile task. (3) There is a budget that is required to purchase. Therefore, we design a programming language for middle school students to learn microcomputer control, and implemented it in scripting language AWK. The compiler accepts the grammar in simplified programming, and to output the assembly language of AVR microcomputer. In addition, we also support a subset of the syntax of the BASIC compiler on the market. In addition to that is used actually in junior high school class has been used to create electronic music box in the classroom making things that target the elementary and junior high school students, their effectiveness has been demonstrated.

Journal

Keywords

Details 詳細情報について

Report a problem

Back to top