30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Description: This macro disables all the peripheral interrupts for specified<br />

number of<br />

instruction cycles.<br />

Include: reset.h<br />

Arguments: cycles<br />

Remarks: This macro executes DISI instruction to disable all the peripheral<br />

interrupts for specified number of instruction cycles.<br />

Code Example: DisableInterrupts(15);<br />

PORStatReset<br />

Description: This macro sets POR bit of RCON register to reset state.<br />

Include: reset.h<br />

Arguments: None<br />

Remarks: None<br />

Code Example: PORStatReset;<br />

BORStatReset<br />

Description: This macro sets BOR bit of RCON register to reset state.<br />

Include: reset.h<br />

Arguments: None<br />

Remarks: None<br />

Code Example: BORStatReset;<br />

dsPIC<br />

®<br />

Language Tools Libraries<br />

INT_ENABLE<br />

INT_DISABLE<br />

Ưu tiên ngắt<br />

INT_PRI_0<br />

INT_PRI_1<br />

INT_PRI_2<br />

INT_PRI_3<br />

INT_PRI_4<br />

INT_PRI_5<br />

INT_PRI_6<br />

INT_PRI_7<br />

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

Bình luận: chức năng này sẽ xóa cờ ngắt tương ứng với pin INTx và<br />

sau đó chọn cạnh phát hiện cực.<br />

Sau đó, đặt ưu tiên ngắt và cho phép / vô hiệu hóa ngắt.<br />

Source File: ConfigInt0.c<br />

ConfigInt1.c<br />

ConfigInt2.c<br />

ConfigInt3.c<br />

ConfigInt4.c<br />

Mã số Ví dụ: ConfigINT0 (RISING_EDGE_INT & EXT_INT_PRI_5 &<br />

EXT_INT_ENABLE);<br />

dsPIC<br />

DS51456B-page 120<br />

2004 Microchip Technology Inc.<br />

®<br />

3.9 I/O PORT FUNCTIONS<br />

This section contains a list of individualfunctions for I/O ports. Functions may<br />

be<br />

implemented as macros.<br />

3.9.1 Individual Functions<br />

WDTSWEnable<br />

Description: This macro turns on the watchdog timer<br />

Include: reset.h<br />

Arguments: None<br />

Remarks: This macro sets Software WDT Enable (SWDTEN) bit of RCON<br />

register<br />

Code Example: WDTSWEnable;<br />

WDTSWDisable<br />

Description: This macro clears Software WDT Enable (SWDTEN) bit of RCON<br />

register<br />

Include: reset.h<br />

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

DS51456B trang 122 2004 Microchip Technology Inc<br />

ConfigCNPullups<br />

Mô tả: Chức năng này cấu hình các điện trở kéo lên cho CN chân.<br />

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

Prototype: void ConfigCNPullups (long int config);<br />

Đối số: cấu hình này là giá trị 32-bit để cấu hình pull-up. Thấp hơn<br />

từ được lưu trữ vào CNPU1 đăng ký và từ trên tiếp theo là<br />

lưu trữ trong CNPU2 đăng ký. 8 bit trên của CNPU2<br />

đăng ký là chưa thực hiện.<br />

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

Bình luận: Không có<br />

Source File: ConfigCNPullups.c<br />

Mã số Ví dụ: ConfigCNPullups (0xFFF);<br />

ConfigIntCN

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

Saved successfully!

Ooh no, something went wrong!