30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

Create successful ePaper yourself

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

2004 Microchip Technology Inc. DS51456B-page 111<br />

ConfigIntTimer23<br />

ConfigIntTimer45<br />

Description: This function configures the 32-bit timer interrupt.<br />

Include: timer.h<br />

Prototype: void ConfigIntTimer23(unsigned int config);<br />

void ConfigIntTimer45(unsigned int config);<br />

Arguments: config Timer interrupt priority and enable/disable information as<br />

defined below:<br />

Tx_INT_PRIOR_7<br />

Tx_INT_PRIOR_6<br />

Tx_INT_PRIOR_5<br />

Tx_INT_PRIOR_4<br />

Tx_INT_PRIOR_3<br />

Tx_INT_PRIOR_2<br />

Tx_INT_PRIOR_1<br />

Tx_INT_PRIOR_0<br />

Tx_INT_ON<br />

Tx_INT_OFF<br />

Return Value: None<br />

Remarks: This function clears the 32-bit Interrupt Flag (TxIF) bit and then sets<br />

the<br />

interrupt priority and enables/disables the interrupt.<br />

Source File: ConfigIntTimer23.c<br />

ConfigIntTimer45.c<br />

Code Example: ConfigIntTimer23(T3_INT_PRIOR_5 & T3_INT_ON);<br />

OpenTimer1<br />

OpenTimer2<br />

OpenTimer3<br />

OpenTimer4<br />

OpenTimer5<br />

Description: This function configures the 16-bit timer module.<br />

Include: timer.h<br />

Prototype: void OpenTimer1(unsigned int config,<br />

unsigned int period)<br />

void OpenTimer2(unsigned int config,<br />

unsigned int period)<br />

void OpenTimer3(unsigned int config,<br />

unsigned int period)<br />

T1_SOURCE_INT, 0xFF);<br />

OpenTimer23<br />

OpenTimer45<br />

Mô tả: Chức năng này cấu hình các mô-đun bộ đếm thời gian 32-bit.<br />

Bao gồm: timer.h<br />

Prototype: void OpenTimer23 (int config,<br />

thời gian dài không dấu);<br />

khoảng trống OpenTimer45 (int config,<br />

thời gian dài không dấu);<br />

Đối số: cấu hình này bao gồm các thông số hy vọng sẽ được cấu hình trong<br />

TxCON<br />

đăng ký theo quy định dưới đây:<br />

Mô-đun giờ On / Off<br />

Tx_ON<br />

Tx_OFF<br />

Thơi gian Mô-đun chế độ Chờ On / Off<br />

Tx_IDLE_CON<br />

Tx_IDLE_STOP<br />

Tích lũy thời gian hẹn giờ Cổng phép<br />

Tx_GATE_ON<br />

Tx_GATE_OFF<br />

OpenTimer1 (Tiếp theo)<br />

OpenTimer2<br />

OpenTimer3<br />

OpenTimer4<br />

OpenTimer5<br />

dsPIC Thư viện ngoại vi<br />

2004 Microchip Technology Inc DS51456B trang 113<br />

Thơi gian prescaler<br />

Tx_PS_1_1<br />

Tx_PS_1_8<br />

Tx_PS_1_64<br />

Tx_PS_1_128<br />

Hẹn giờ đồng hồ đồng bộ cho phép<br />

Tx_SYNC_EXT_ON<br />

Tx_SYNC_EXT_OFF<br />

Nguồn đồng hồ hẹn giờ<br />

Tx_SOURCE_EXT<br />

Tx_SOURCE_INT<br />

Giai đoạn này có giá trị phù hợp với thời gian được lưu trữ vào

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

Saved successfully!

Ooh no, something went wrong!