📄 test_time1.c
字号:
/***********************************************************************/
/* */
/* FILE :test_time.c */
/* DATE :Sun, Oct 15, 2006 */
/* DESCRIPTION :main program file. */
/* CPU GROUP :1B */
/* */
/* This file is generated by Renesas Project Generator (Ver.4.5). */
/* */
/***********************************************************************/
#include "sfr_r81b.h"
#include "Iic.h"
#include "serial.h"
#include "global.h"
#include "counter.h"
#include "lpwr_check.h"
#include "timez.h"
void timex_init(void);
void Timez_Init(void);
void main(void)
{
asm("FCLR I");
prc0 = 1 ; //protect off
cm13 = 1 ;
cm15 = 1 ;
cm10 = 0 ;//add
cm05 = 0 ;
cm16 = 0 ;
cm17 = 0 ;
cm06 = 0 ;
asm("nop") ;
asm("nop") ;
asm("nop") ;
asm("nop") ;
ocd2 = 0 ;
prc0 = 0 ;
pd1=0xfb;
asm("FSET I");
init_serial();
timex_init();
iic_data_init();
counter_init();
interrupt_int0_init();
reset_process();
//wdt
wdc = 0x80;
cspr = 0x00;
wdtr = 0x00 ;
wdtr = 0xff ;
// wdts = 0x00 ; //start wdt
// timex_init();
// Timez_Init();
timez_init();
while(1)
{
reset_wdt();
series_process();
reset_wdt();
counter_process();
}
}
/*void timex_init(void)
{
txmr = 0x00 ;
prex = 256-1;
tx = 250-1 ;
tcss = 0x00 ;
ir_txic = 0 ;
txic = 5 ;
txs = 1 ;
}
void Timez_Init(void)
{
tzmr = 0x50 ;
pum=0x00;
prez = 33-1;
tzpr=50 - 1;
tzsc=49 - 1;
ir_tzic = 0 ;
tzic = 5 ;
tzs = 1 ;
}
void interrupt_timez(void)
{
// asm("nop") ;
p1 = ~p1 ;
}
void interrupt_timex(void)
{
// p1 = ~p1 ;
}
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -