文件名称:500029_Sub_clock_Clock
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 93kb
- 下载次数:
- 0次
- 提 供 者:
- Shi***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
概要
本文档介绍了如何使用 MB95200H/210H 系列 MCU的副时钟设计时钟,并举例说明了其开发过程。-#include "../MB95200_IO/mb95200.h"
unsigned char C_Second
unsigned char C_Minute
unsigned char C_Hour
void Clock_minute_process(void)
void Clock_hour_process(void)
void Second_output(void)
void Minute_output(void)
void Hour_output(void)
/*-----------------------------------------------------------------------------
/*NAME : __interrupt void Watch_Prescaler (void)
/*FUNCTION : Processing the watch prescaler
/*INPUT : NO
/*OUTPUT : NO
-----------------------------------------------------------------------------*/
void System_SubC_init(void) // Clock Controller initial
{
SYSC_PGSEL = 0 // Enable sub-clock input
SYSC_PFSEL = 0 // Enable main-clock input
WATR = 0xC0
STBC = 0x00
SYCC2 = 0xFC // Enable sub-clock and main-clock
SYCC = 0x00
while(SYCC_SRDY)
}
void Watch_prescalar_initial(void)
{
WPCR = 0x46 // Enable interrupt, interval time = 1.s
WPCR_WCLR = 1 // Clears watch prescaler couter
}
__interrupt void Watch_P
本文档介绍了如何使用 MB95200H/210H 系列 MCU的副时钟设计时钟,并举例说明了其开发过程。-#include "../MB95200_IO/mb95200.h"
unsigned char C_Second
unsigned char C_Minute
unsigned char C_Hour
void Clock_minute_process(void)
void Clock_hour_process(void)
void Second_output(void)
void Minute_output(void)
void Hour_output(void)
/*-----------------------------------------------------------------------------
/*NAME : __interrupt void Watch_Prescaler (void)
/*FUNCTION : Processing the watch prescaler
/*INPUT : NO
/*OUTPUT : NO
-----------------------------------------------------------------------------*/
void System_SubC_init(void) // Clock Controller initial
{
SYSC_PGSEL = 0 // Enable sub-clock input
SYSC_PFSEL = 0 // Enable main-clock input
WATR = 0xC0
STBC = 0x00
SYCC2 = 0xFC // Enable sub-clock and main-clock
SYCC = 0x00
while(SYCC_SRDY)
}
void Watch_prescalar_initial(void)
{
WPCR = 0x46 // Enable interrupt, interval time = 1.s
WPCR_WCLR = 1 // Clears watch prescaler couter
}
__interrupt void Watch_P
(系统自动生成,下载前可以参看下载内容)
下载文件列表
500029 Sub_clock _Clock\Clock.dat
.......................\Clock.prj
.......................\Clock.wsp
.......................\Debug\simulator.sup
.......................\.....\watch.sup
.......................\.....\ABS\Clock.abs
.......................\.....\...\Clock.mhx
.......................\.....\...\watch.abs
.......................\.....\...\watch.mhx
.......................\.....\ABS
.......................\.....\LST\Clock.mp1
.......................\.....\...\watch.mp1
.......................\.....\LST
.......................\.....\MB95200_IO\ioreg.txt
.......................\.....\..........\ioregj.txt
.......................\.....\..........\ioregj_a.txt
.......................\.....\..........\ioreg_a.txt
.......................\.....\..........\mb95200.h
.......................\.....\..........\mb95200_a.inc
.......................\.....\..........\_f2mc8fx.c
.......................\.....\..........\_f2mc8fx.h
.......................\.....\..........\_f2mc8fx_a.asm
.......................\.....\MB95200_IO
.......................\.....\OBJ\main.obj
.......................\.....\...\main.stk
.......................\.....\...\mb95200.obj
.......................\.....\...\startup.obj
.......................\.....\...\vectors.obj
.......................\.....\...\vectors.stk
.......................\.....\...\watch_prescaler.obj
.......................\.....\...\watch_prescaler.stk
.......................\.....\...\watch_prescaler_lib.obj
.......................\.....\...\_f2mc8fx.obj
.......................\.....\...\_f2mc8fx.stk
.......................\.....\OBJ
.......................\.....\.PT\Clock.opa
.......................\.....\...\Clock.opb
.......................\.....\...\Clock.opc
.......................\.....\...\Clock.opl
.......................\.....\...\Clock.opv
.......................\.....\...\watch.opa
.......................\.....\...\watch.opb
.......................\.....\...\watch.opc
.......................\.....\...\watch.opl
.......................\.....\...\watch.opv
.......................\.....\OPT
.......................\.....\src\main.c
.......................\.....\...\startup.asm
.......................\.....\...\vectors.c
.......................\.....\src
.......................\Debug
500029 Sub_clock _Clock
.......................\Clock.prj
.......................\Clock.wsp
.......................\Debug\simulator.sup
.......................\.....\watch.sup
.......................\.....\ABS\Clock.abs
.......................\.....\...\Clock.mhx
.......................\.....\...\watch.abs
.......................\.....\...\watch.mhx
.......................\.....\ABS
.......................\.....\LST\Clock.mp1
.......................\.....\...\watch.mp1
.......................\.....\LST
.......................\.....\MB95200_IO\ioreg.txt
.......................\.....\..........\ioregj.txt
.......................\.....\..........\ioregj_a.txt
.......................\.....\..........\ioreg_a.txt
.......................\.....\..........\mb95200.h
.......................\.....\..........\mb95200_a.inc
.......................\.....\..........\_f2mc8fx.c
.......................\.....\..........\_f2mc8fx.h
.......................\.....\..........\_f2mc8fx_a.asm
.......................\.....\MB95200_IO
.......................\.....\OBJ\main.obj
.......................\.....\...\main.stk
.......................\.....\...\mb95200.obj
.......................\.....\...\startup.obj
.......................\.....\...\vectors.obj
.......................\.....\...\vectors.stk
.......................\.....\...\watch_prescaler.obj
.......................\.....\...\watch_prescaler.stk
.......................\.....\...\watch_prescaler_lib.obj
.......................\.....\...\_f2mc8fx.obj
.......................\.....\...\_f2mc8fx.stk
.......................\.....\OBJ
.......................\.....\.PT\Clock.opa
.......................\.....\...\Clock.opb
.......................\.....\...\Clock.opc
.......................\.....\...\Clock.opl
.......................\.....\...\Clock.opv
.......................\.....\...\watch.opa
.......................\.....\...\watch.opb
.......................\.....\...\watch.opc
.......................\.....\...\watch.opl
.......................\.....\...\watch.opv
.......................\.....\OPT
.......................\.....\src\main.c
.......................\.....\...\startup.asm
.......................\.....\...\vectors.c
.......................\.....\src
.......................\Debug
500029 Sub_clock _Clock