205/317
7 - Debugger and PROM Programmer Tutorial for ST72251
The 16-bit Timer runs continuously and g enerates an in ter rupt every 10 m s. A software
counter is used to count the half-period time of the blinking.
The parallel input-output ports are used both to input the four voltages to the A DC and to
switch the four LEDs.
7.6.2 The algorithm of each task
Since the functionality for each channel is identical, we shall describe only one of them.
The algorithm is the following:
07-task
Four such algorithms will run simultaneously, each belonging to one task. The initialization
part of the program will thus initialize the core and the peripherals, then start all four tasks.
They will run forever, since they are made of a loop with no exit condition.
Task
Read analog input
Convert it to time
Load counter with time
Counter
= 0 ?
Yield
Toggle output
Little kernel : diagram of a task
Содержание ST7 Series
Страница 1: ...ST7 8 BIT MCU FAMILY USER GUIDE JANUARY 1999 1 ...
Страница 238: ...238 317 8 C Language and the C Compiler 08 Burn bmp Then use the EPROMer programmer software as described in Chapter 7 ...
Страница 289: ...289 317 10 Second Application a Sailing Computer 10 befor Bs Rw Vw VMG AlphaR AlphaV Before the wind ...