Sign In
Upload
Download
Table of Contents
Contents
Add to my manuals
Delete from my manuals
Share
URL of this page:
HTML Link:
Bookmark this page
Add
Manual will be automatically added to "My Manuals"
Print this page
×
Bookmark added
×
Added to my manuals
Manuals
Brands
Fujitsu Manuals
Computer Hardware
F2MC-16FX MB2198
Getting started
Vectors.c - Fujitsu F2MC-16FX MB2198 Getting Started
Emulator system
Hide thumbs
1
2
3
Table Of Contents
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
page
of
32
Go
/
32
Contents
Table of Contents
Troubleshooting
Bookmarks
Table of Contents
Advertisement
{
TMRLR0 = 0x61A7;
TMCSR0 = 0x181b;
}
void init_ports(void)
{
DDR00 = 0xFF;
PDR00 = 0x00;
}
/*-------------- Main Program -----------------------------------------------*/
void main(void)
{
init_timer();
init_ports();
LED = 0x01;
InitIrqLevels();
__set_il(7);
__EI();
while(1);
}
/*-------------- Interrupt Routine ------------------------------------------*/
__interrupt void Timer_IRQ_Handler(void)
{
TMCSR0_UF = 0;
PDR00 = LED;
LED = LED * 2;
if (LED == 0)
LED = 0x01;
}
The program first initialises the 16-Bit Reload Timer 0, then the LED-Port.
Then the program stops in an endless loop, but every 50 ms the Reload Timer sends an
interrupt request. The MCU then executes the Interrupt Service Routine, which clears the
Interrupt Request and sets a new "position" of the LED.
2.2.2 Vectors.c
Before executing the program, the interrupt definition has to be done. For that, open the file
"vectors.c" and edit the bold and italic entries of the following example:
/* 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
/*------------------------------------------------------------------------
VECTORS.C
- Interrupt level (priority) setting
- Interrupt vector definition
------------------------------------------------------------------------*/
MCU-AN-300217-E-V10
MB2198 – Getting Started
Chapter 2 Creating the Project
/* set reload value 25000 x 2us => 50ms */
/* prescaler 2,0us at 16 MHz */
/* Set Port00 (LEDs) to Output */
/* Turn off all LEDs */
/* Prepare LED byte for 1st LED */
/* allow all levels */
/* globally enable interrupts */
/* Let Interrupt handler do all things ... */
/* reset underflow interrupt request flag */
/* "move" LED */
/* End reached? */
/* Start up again at position 0 */
- 12 -
© Fujitsu Microelectronics Europe GmbH
*/
*/
Table of
Contents
Previous
Page
Next
Page
1
...
9
10
11
12
13
14
15
16
Advertisement
Table of Contents
Related Manuals for Fujitsu F2MC-16FX MB2198
Computer Hardware Fujitsu F2MCTM-16LX Hardware Manual
16-bit microcontroller (682 pages)
Computer Hardware Fujitsu FMC-16LX/FR User Manual
Pc serial programming adapter cable for fujitsu flash microcontroller-f²mc-16lx/fr family (14 pages)
Computer Hardware Fujitsu FPT-20P-M06 Specification Sheet
Mb15f8xul series fractional-n / integer dual pll frequency synthesizers (6 pages)
Computer Hardware Fujitsu F2MC-16 Operation Manual
(12 pages)
Computer Hardware Fujitsu F2MC-8L F202RA Hardware Manual
F2mc-8l 8-bit microcontroller (436 pages)
Computer Hardware Fujitsu F2 MC-8FX Family Operation Manual
Lqfp-52p (0.65 mm pitch) header board for the f2 mc-8fx family (16 pages)
Computer Hardware Fujitsu F2MC-8FX Hardware Manual
F2mc-8fx 8-bit microcontroller (602 pages)
Computer Hardware Fujitsu F2MC-8FX Setup Manual
Starter kit (ver. 5v) (30 pages)
Computer Hardware Fujitsu FM3 family User Manual
32-bit microcontroller fm3 family application note simple av system board (99 pages)
Computer Hardware Fujitsu MB91460 SERIES FR60 User Manual
32-bit microcontroller (1038 pages)
Computer Hardware Fujitsu FR Family FR60 Lite User Manual
32-bit microcontroller bits pot red can motor board (104 pages)
Computer Hardware Fujitsu FibreCAT TXF Operating Manual
Backup subsystem (57 pages)
Computer Hardware Fujitsu F2 MC-16L Operation Manual
(26 pages)
Computer Hardware Fujitsu FMW42CR1 Installation Manual
High-usage cradle (2 pages)
Computer Hardware Fujitsu F2MC-8FX MB2146-222 Operation Manual
Lqfp-64p (0.5 mm pitch) header board (16 pages)
Computer Hardware Fujitsu F2MC-8FX MB2146-213 Operation Manual
Lqfp-48p (0.5 mm pitch) header board (16 pages)
Related Content for Fujitsu F2MC-16FX MB2198
MB91460 SERIES FR60 Fixed Mode And Reset Vectors
Fujitsu MB91460 SERIES FR60
F2MCTM-16LX Appendix D List Of Interrupt Vectors
Fujitsu F2MCTM-16LX
MB91F109 FR30 Table 2.8-2 Assignments Of Interrupt Causes And Interrupt Vectors
Fujitsu MB91F109 FR30
Table of Contents
Print
Rename the bookmark
Delete bookmark?
Delete from my manuals?
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL