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

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
//set DBG pin as EC0 pin
void p12_as_ec0(void)
{
SYSC = 0xE3;
T00CR0 = 0x71;
TMCR0 = 0x43;
T00DR = 0x08;
T00CR1 = 0x81;
}
//change EC0 pin to P04
void p04_as_ec0(void)
{
SYSC = 0xEB;
T00CR0 = 0x71;
TMCR0 = 0x43;
T00DR = 0x08;
T00CR1 = 0x81;
}
//main function
void
main(void)
{
gpio_setting();
...
#ifdef DEBUGMODE
P04_as_ec0();
#else
P12_as_ec0();
#endif
}
DBG pin operation V1.0
Chapter 5 Sample code
// set P12 as EC0 pin, disable HCLK1
// interval timer, external clock source.
// 8bit mode, output timer00.
// set counter.
// enable output, start timer00.
// set P04 as EC0 pin, disable HCLK1
// interval timer, external clock source.
// 8bit mode, output timer00.
// set counter.
// enable output, start timer00.
//pull low P12 pin
//set P04 as EC0 pin in debug mode
//set P12 as EC0 pin in free run mode
MCU-AN-500009-E-10 – Page 12