Fujitsu F2MC-8FX Series Application Note - Page 12

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
//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