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 编 译 器 函 数 库OpenTimer1 ( 续 )文 件 名 :t1open.c代 码 示 例 : OpenTimer1( TIMER_INT_ON &T1_8BIT_RW &T1_SOURCE_EXT &T1_PS_1_1 &T1_OSC1EN_OFF &T1_SYNC_EXT_OFF &T1_SOURCE_CCP );OpenTimer2功 能 :配 置 timer2。包 含 头 文 件 : timers.h原 型 : void OpenTimer2( unsigned char config );参 数 :config从 下 面 所 列 出 各 类 型 中 分 别 取 一 个 值 并 相 与 (‘&’) 所 得 的 值 。 这 些 值 在文 件 timers.h 中 定 义 。允 许 Timer2 中 断 :TIMER_INT_ON 允 许 中 断TIMER_INT_OFF 禁 止 中 断预 分 频 值 :T2_PS_1_1 1:1 预 分 频T2_PS_1_4 1:4 预 分 频T2_PS_1_16 1:16 预 分 频后 分 频 值 :T2_POST_1_1 1:1 后 分 频T2_POST_1_2 1:2 后 分 频: :T2_POST_1_15 1:15 后 分 频T2_POST_1_16 1:16 后 分 频说 明 :该 函 数 按 照 指 定 的 选 项 配 置 timer2。文 件 名 :t2open.c代 码 示 例 :OpenTimer2( TIMER_INT_OFF &T2_PS_1_1 &T2_POST_1_8 );DS51297C_CN 第 50 页© 2004 Microchip Technology Inc.

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

Saved successfully!

Ooh no, something went wrong!