Fujitsu F2MC-8FX Series Application Note - Page 11

Browse online or download pdf Application Note for Motherboard Fujitsu F2MC-8FX Series. Fujitsu F2MC-8FX Series 12 pages. 8-bit microcontroller
Also for Fujitsu F2MC-8FX Series: Operation Manual (20 pages), Application Note (23 pages), Setup Manual (18 pages), Setup Manual (19 pages), Setup Manual (30 pages), Application Note (20 pages), Application Note (21 pages), Operation Manual (21 pages), Setup Manual (23 pages), User Manual (24 pages), Setup Manual (17 pages)

Fujitsu F2MC-8FX Series Application Note
//===================================================================
//extern unsigned int delay_timer;
__interrupt
void
DefaultIRQHandler (void);
//
Vector definition
// Use following statements to define vectors.
// All resource related vectors are predefined.
//
Remaining software interrupts can be added hereas well.
#pragma intvect DefaultIRQHandler 0
#pragma intvect DefaultIRQHandler 1
#pragma intvect DefaultIRQHandler 2
#pragma intvect DefaultIRQHandler 3
#pragma intvect DefaultIRQHandler 5
#pragma intvect DefaultIRQHandler 6
#pragma intvect DefaultIRQHandler 7
#pragma intvect DefaultIRQHandler 8
#pragma intvect DefaultIRQHandler 14
#pragma intvect DefaultIRQHandler 18
#pragma intvect DefaultIRQHandler 19
#pragma intvect DefaultIRQHandler 20
#pragma intvect DefaultIRQHandler 22
#pragma intvect DefaultIRQHandler 23
__interrupt
void
DefaultIRQHandler (void)
{
__DI();
While(1)
__wait_nop();
}
Main.c
//=====================================================================
//following code created for DBG pin usage test
#define
DEBUGMODE
//set DBG pin as P12 output
void gpio_setting(void)
{
DDR1_P12 = 1;
PDR1_P12 = 0;
AIDRL_P04 = 1;
}
DBG pin operation V1.0
Chapter 5 Sample code
// disable interrupts
// halt system
/* set P12 as output pin */
/* pull P12 to low. */
/* port input enable */
MCU-AN-500009-E-10 – Page 11
//IRQ0:
external interrupt ch4
//IRQ1:
external interrupt ch5
//IRQ2:
external interrupt ch2 | ch6
//IRQ3:
external interrupt ch3 | ch7
//IRQ5:
8/16-bit timer ch0 (lower)
//IRQ6:
8/16-bit timer ch0 (upper)
//IRQ7:
LIN-UART (reception)
//IRQ8:
LIN-UART (transmission)
//IRQ14: 8/16-bit timer ch1 (upper)
//IRQ18: 10-biat A/D-converter
//IRQ19: Timebase timer
//IRQ20: Watch timer / counter
//IRQ22: 8/16-bit timer ch1 (lower) |
// external interrupt ch 12-15
//IRQ23: Flash | Custom ch1