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 function turns off the DCI module<br />

Include: dci.h<br />

Prototype: void CloseDCI(void);<br />

Arguments: None<br />

Return Value: None<br />

Remarks: This function first turns off the DCImodule and then disables the DCI<br />

interrupt.The Interrupt Flag bit is also cleared.<br />

Source File: CloseDCI.c<br />

Code Example: CloseDCI();<br />

BufferEmptyDCI<br />

Description: This function returns the DCI Transmit Buffer Full status.<br />

Include: dci.h<br />

Prototype: char BufferEmptyDCI(void);<br />

Arguments: None<br />

Return Value: If the value of TMPTY is ‘1’, then ‘1’ is returned, indicating that<br />

the<br />

transmit buffer is empty.<br />

If the value of TMPTY is ‘0’, then ‘0’ is returned, indicating that the<br />

transmit buffer is not empty.<br />

Remarks: This function returns the status of the DCISTAT bit. This<br />

bit<br />

indicates whether the transmit buffer is empty.<br />

Source File: BufferEmptyDCI.c<br />

Code Example: while(!BufferEmptyDCI());<br />

dsPIC Peripheral Libraries<br />

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

ConfigIntDCI<br />

Description: This function configures the DCI interrupt.<br />

Include: dci.h<br />

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

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

defined below:<br />

DCI Interrupt enable/disable<br />

DCI_INT_ON<br />

DCI_INT_OFF<br />

DCI Interrupt priority<br />

DCI_INT_PRI_0<br />

DCI_INT_PRI_1<br />

DCI_INT_PRI_2<br />

DCI_INT_PRI_3<br />

Kiểm soát biện minh dữ liệu<br />

DCI_DJST_ON<br />

DCI_DJST_OFF<br />

Khung chế độ Sync chọn<br />

DCI_FSM_ACLINK_20BIT<br />

DCI_FSM_ACLINK_16BIT<br />

DCI_FSM_I2S<br />

DCI_FSM_MULTI<br />

config2 này chứa các thông số được cấu hình trong<br />

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

Đệm dài<br />

DCI_BUFF_LEN_4<br />

DCI_BUFF_LEN_3<br />

DCI_BUFF_LEN_2<br />

DCI_BUFF_LEN_1<br />

DCI Khung điều khiển máy phát đồng bộ<br />

DCI_FRAME_LEN_16<br />

DCI_FRAME_LEN_15<br />

DCI_FRAME_LEN_14<br />

.....<br />

DCI_FRAME_LEN_1<br />

DCI kích thước từ dữ liệu<br />

DCI_DATA_WORD_16<br />

DCI_DATA_WORD_15<br />

DCI_DATA_WORD_14<br />

.....<br />

DCI_DATA_WORD_5<br />

DCI_DATA_WORD_4<br />

OpenDCI (Tiếp theo)<br />

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

2004 Microchip Technology Inc DS51456B trang 153<br />

config3 này chứa các bit giá trị máy phát điện đồng hồ để được<br />

cấu hình trong đăng ký DCICON3.<br />

trans_mask / này chứa các truyền / nhận khe<br />

recv_mask Enable bit được cấu hình vào TSCON /<br />

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

DCI_DIS_SLOT_15<br />

DCI_DIS_SLOT_14<br />

.....

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

Saved successfully!

Ooh no, something went wrong!