Fujitsu F2MC-8FX Series Catatan Aplikasi - Halaman 12

Jelajahi secara online atau unduh pdf Catatan Aplikasi untuk Motherboard Fujitsu F2MC-8FX Series. Fujitsu F2MC-8FX Series 12 halaman. 8-bit microcontroller
Juga untuk Fujitsu F2MC-8FX Series: Panduan Pengoperasian (20 halaman), Catatan Aplikasi (23 halaman), Setup Manual (18 halaman), Setup Manual (19 halaman), Setup Manual (30 halaman), Catatan Aplikasi (20 halaman), Catatan Aplikasi (21 halaman), Panduan Pengoperasian (21 halaman), Setup Manual (23 halaman), Panduan Pengguna (24 halaman), Setup Manual (17 halaman)

Fujitsu F2MC-8FX Series Catatan Aplikasi
//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