Project Name: Hwwdt - Fujitsu F2MC-8FX MB95200H/210H Series Application Note

8-bit microcontroller watchdog timer
Hide thumbs Also See for F2MC-8FX MB95200H/210H Series:
Table of Contents

Advertisement

7.3.2 Project Name: HWWDT

Hardware watchdog
main.c
#include "mb95200.h"
/* Hardware watchdog timer starts automatically after a reset and cannot be stopped */
/* The internal time is fixed to 2
/*---------------------------------------------------------------------------
name: Delay();
function: delay function
-----------------------------------------------------------------------------*/
void Delay (unsigned int i)
{
while(i--)
{
asm("\tNOP");
}
}
/*---------------------------------------------------------------------------
name: main();
function: main loop
-----------------------------------------------------------------------------*/
void main(void)
{
PDR0_P05 = 0;
DDR0_P05 = 1;
while(1)
{
PDR0_P05 = ~PDR0_P05;
Delay (500);
WDTC |= 0x05;
}
}
WATCHDOG TIMER V1.1
Chapter 7 Appendix
16
/F
CRL
// initial value
// set P05 as output
// show program is normal run
// clear WDT timer within a certain amount of time
MCU-AN-500013-E-11 – Page 18
*/

Advertisement

Table of Contents
loading

Table of Contents