Entering The Code; Main.c - Fujitsu F2MC-16FX MB2198 Getting Started

Emulator system
Table of Contents

Advertisement

The code only contains the chip specific header inclusion and in the main routine a frame for
the interrupt initialisation.

2.2 Entering the code

Assume that we want to have a "scrolling LED" on Port00 with a speed of 50 ms per LED.
Furthermore, we want to use an MCU Timer and an interrupt routine for the timing.
To do this, the files Main.c and vectors.c have to be edited.

2.2.1 Main.c

The following program example shows how to edit the main program source code for the
proposed purpose:
/* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */
/* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */
/* ELIGIBILITY FOR ANY PURPOSES.
/*
(C) Fujitsu Microelectronics Europe GmbH
/*------------------------------------------------------------------------
MAIN.C
- description
- See README.TXT for project description and disclaimer.
/*---------------------------------------------------------------------------*/
#include "mb96300.h"
unsigned char LED;
/*-------------- Sub Routines -----------------------------------------------*/
void init_timer(void)
© Fujitsu Microelectronics Europe GmbH
MB2198 – Getting Started
Chapter 2 Creating the Project
/* Global byte for LED state */
/* initialisation function for 16-bit timer */
- 11 -
*/
*/
MCU-AN-300217-E-V10

Advertisement

Table of Contents
loading

Table of Contents