| |
| 1 |
/**************************************************************************************************************** |
| 2 |
; |
| 3 |
; NNNNNN NN EEEEEEEEEEEEEEEEEE CCCCCCCCCCCCCCC |
| 4 |
; NNNNNNNN NN EEEEEE CCCCCC |
| 5 |
; NNNNNNNNNN NN EEEEEE CCCCCC |
| 6 |
; NN NNNNNNNN NN EEEEEEEEEEEEEEEEE CCCCCC |
| 7 |
; NN NNNNNNNN NN EEEEEE CCCCCC |
| 8 |
; NN NNNNNNNNNN EEEEEE CCCCCC |
| 9 |
; NN NNNNNN EEEEEEEEEEEEEEEE CCCCCCCCCCCCCCC |
| 10 |
; |
| 11 |
; NEC Electronics 78K0R/Kx3 Series |
| 12 |
;?@?@ |
| 13 |
;?yLicense Agreement?z |
| 14 |
;. This sample program is subject to change without notice. |
| 15 |
; |
| 16 |
;. NEC Electronics does not assume any liability for infringement of patents, copyrights or other intellectual |
| 17 |
; property rights of third parties by or arising from the use of this sample program. No license, express, |
| 18 |
; implied or otherwise, is granted under any patents, copyrights or other intellectual property rights of |
| 19 |
; NEC Electronics or others. |
| 20 |
; |
| 21 |
;. Descriptions of commands, program, and other related information in this sample program are provided for |
| 22 |
; illustrative purposes in semiconductor product operation and application examples. The incorporation of |
| 23 |
; this sample program in the design of a customer's equipment shall be done under the full responsibility of |
| 24 |
; the customer. NEC Electronics assumes no responsibility for any losses incurred by customers or third parties |
| 25 |
; arising from the use of this sample program. |
| 26 |
; |
| 27 |
;?@Please use this sample program under the agreement listed above. |
| 28 |
; |
| 29 |
;*************************************************************************************************************** |
| 30 |
; 78K0R/Kx3 Series sample program |
| 31 |
;*************************************************************************************************************** |
| 32 |
; Interval timer/Square wave output(TIMER ARRAY UNIT) "Main Program" |
| 33 |
;*************************************************************************************************************** |
| 34 |
; [History] |
| 35 |
; 2007.07 |
| 36 |
; 12 new |
| 37 |
;***************************************************************************************************************/ |
| 38 |
|
| 39 |
/*************************************************************************** |
| 40 |
* Title: main program |
| 41 |
***************************************************************************/ |
| 42 |
#include "K0R_def.h" |
| 43 |
#include "K0R_ext.h" |
| 44 |
|
| 45 |
extern void main(void); |
| 46 |
|
| 47 |
/*************************************************************************** |
| 48 |
* Title: main program |
| 49 |
**************************************************************************** |
| 50 |
* Module: void main(void) |
| 51 |
* Arg: |
| 52 |
* Ret: |
| 53 |
***************************************************************************/ |
| 54 |
void main(void) |
| 55 |
{ |
| 56 |
STM_IINI(); /* Initial Setting */ |
| 57 |
STM_ISTT(); /* Operation Start */ |
| 58 |
|
| 59 |
/* main loop */ |
| 60 |
while(1){ |
| 61 |
WDTE = 0xac; /* watchdog timer counter clears and restarts */ |
| 62 |
NOP(); |
| 63 |
if(TMIF02 == 1){ |
|
TMIF02 = 0; |
| 65 |
NOP(); |
| 66 |
NOP(); |
| 67 |
NOP(); |
| 68 |
} |
| 69 |
} |
| 70 |
|
| 71 |
} |
| |