Electronic systems - OCRProgramming microcontrollers

The systems approach to designing with programmable electronic devices is vital in understanding how today’s electronic devices are programmed together with how they operate in the real world.

Part ofDesign and TechnologyCore technical principles

Programming microcontrollers

In order for to work correctly they must be . This can be achieved using a wide range of , and different .

Programming methods

Microcontrollers can be programmed using a range of different methods. These include:

  • , such as BASIC, C++ and Python
  • software

Each have their own advantages and disadvantages.

Using block-based editing to code a simple timer - when button A is pressed the counter adds one.
Image caption,
Example of block-based editing

Example of a flowchart program

The program below acts as a simple timer. When an input detects a high (on) signal, it turns an output on for twenty seconds. Software such as PICAXE Editor, GENIE and Yenka can be used for writing flowchart programs.

An example flowchart program of a simple timer. When an input pin detects a high signal, it turns an output on for twenty seconds.
Figure caption,
Flowchart programme of a simple timer

Downloading a program

Once written and tested, the program must be downloaded onto the microcontroller. Many systems support . This means the microcontroller does not have to be removed from the circuit to be programmed. For some systems, the chip may have to be taken from the circuit and placed in a special . A or USB cable is commonly used to download the program.

Question

Describe what is meant by ‘in-circuit’ programming.