12.07.2015 Views

MPLAB® C18 C 编译器函数库

MPLAB® C18 C 编译器函数库

MPLAB® C18 C 编译器函数库

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MPLAB ® <strong>C18</strong> C 编 译 器 函 数 库2.9 定 时 器 函 数下 列 函 数 支 持 定 时 器 外 设 :表 2-9: 定 时 器 函 数函 数CloseTimerx 禁 止 定 时 器 x。OpenTimerx 配 置 定 时 器 x。ReadTimerx 读 取 定 时 器 x 的 值 。WriteTimerx 向 定 时 器 x 写 入 一 个 值 。描 述2.9.1 函 数 描 述CloseTimer0CloseTimer1CloseTimer2CloseTimer3CloseTimer4功 能 : 禁 止 指 定 的 定 时 器 。包 含 头 文 件 : timers.h原 型 : void CloseTimer0( void );void CloseTimer1( void );void CloseTimer2( void );void CloseTimer3( void );void CloseTimer4( void );说 明 : 该 函 数 禁 止 中 断 和 指 定 的 定 时 器 。文 件 名 :t0close.ct1close.ct2close.ct3close.ct4close.cOpenTimer0功 能 :配 置 timer0。包 含 头 文 件 : timers.h原 型 : void OpenTimer0( unsigned char config );参 数 :config从 下 面 所 列 出 各 类 型 中 分 别 取 一 个 值 并 相 与 (‘&’) 所 得 的 值 。 这 些 值 在文 件 timers.h 中 定 义 。允 许 Timer0 中 断 :TIMER_INT_ON 允 许 中 断TIMER_INT_OFF 禁 止 中 断定 时 器 宽 度 :T0_8BIT 8 位 模 式T0_16BIT 16 位 模 式时 钟 源 :T0_SOURCE_EXT 外 部 时 钟 源 (I/O 引 脚 )T0_SOURCE_INT 内 部 时 钟 源 (TOSC)外 部 时 钟 触 发 (T0_SOURCE_EXT):T0_EDGE_FALL 外 部 时 钟 下 降 沿T0_EDGE_RISE 外 部 时 钟 上 升 沿DS51297C_CN 第 48 页© 2004 Microchip Technology Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!