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.

dsPIC<br />

®<br />

Language Tools Libraries<br />

DS51456B-page 110<br />

ConfigIntTimer1<br />

ConfigIntTimer2<br />

ConfigIntTimer3<br />

ConfigIntTimer4<br />

ConfigIntTimer5<br />

2004 Microchip Technology Inc.<br />

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

Include: timer.h<br />

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

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

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

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

void ConfigIntTimer5(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 16-bit InterruptFlag (TxIF) bit and then sets<br />

the<br />

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

Source File: ConfigIntTimer1.c<br />

ConfigIntTimer2.c<br />

ConfigIntTimer3.c<br />

ConfigIntTimer4.c<br />

ConfigIntTimer5.c<br />

Code Example: ConfigIntTimer1(T1_INT_PRIOR_3 & T1_INT_ON);<br />

dsPIC Peripheral Libraries<br />

unsigned int thời gian)<br />

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

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

Thơi gian Mô-đun 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 />

dsPIC<br />

®<br />

Thư viện Công cụ Ngôn ngữ<br />

DS51456B trang 112 2004 Microchip Technology Inc<br />

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

Tx_GATE_ON<br />

Tx_GATE_OFF<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<br />

PR đăng ký<br />

Trở lại giá trị: Không<br />

Ghi chú: Chức năng này cấu hình 16-bit Thơi gian kiểm soát và thiết lập<br />

giá trị phù hợp với thời gian vào sổ đăng ký PR<br />

Source File: OpenTimer1.c<br />

OpenTimer2.c<br />

OpenTimer3.c<br />

OpenTimer4.c<br />

OpenTimer5.c<br />

Mã số Ví dụ: OpenTimer1 (T1_ON & T1_GATE_OFF &<br />

T1_PS_1_8 & T1_SYNC_EXT_OFF &

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

Saved successfully!

Ooh no, something went wrong!