Source Code - Fujitsu MB2147-01 Application Note

Emulator system
Table of Contents

Advertisement

2.2.1

Source Code

MAIN.C
- description
- See README.TXT for project description and disclaimer.
----------------------------------------------------------------------*/
#include
unsigned int
void wait(unsigned int
{
for
}
void
main(void)
{
PDR1=0x00;
DDR1=0xFF;
while
{
}
}
This sample code program is only an example with no "great assignment". It contains a simple wait-function
(void wait), which needs an integer value for the wait time. The resulting delay time depends on the value itself
and the clock speed of the emulation system. This function uses the global variables i for counting.
The main program (void main) set the LED port of the Starterkit MB91230 to output and low level. After this and
endless loop ist startet.
In this loop a call to the wait function is performed and the LED port register is increased.
By executing this small program the LEDs of the board are flashing. The left ones faster, the right ones in a lower
fequency.
FR Family MB2198-01 Emulating and Debugging Installation Guide, Doc. No. 002-05223 Rev. *A
"mb91230.h"
i;
a)
(i=0; i<a; i++);
(1)
wait(20000);
PDR1++;
Sample Program
7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb2198-01

Table of Contents