Fujitsu F2MC-8FX Series Note d'application - Page 11

Parcourez en ligne ou téléchargez le pdf Note d'application pour {nom_de_la_catégorie} Fujitsu F2MC-8FX Series. Fujitsu F2MC-8FX Series 12 pages. 8-bit microcontroller
Également pour Fujitsu F2MC-8FX Series : Manuel d'utilisation (20 pages), Note d'application (23 pages), Manuel de configuration (18 pages), Manuel de configuration (19 pages), Manuel de configuration (30 pages), Note d'application (20 pages), Note d'application (21 pages), Manuel d'utilisation (21 pages), Manuel de configuration (23 pages), Manuel de l'utilisateur (24 pages), Manuel de configuration (17 pages)

Fujitsu F2MC-8FX Series Note d'application
//===================================================================
//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