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.

contents are sent duringthe timeslot */<br />

unsigned int TSCONvalue ;<br />

int i ;<br />

CloseDCI();<br />

/* Configure DCI receive/ transmit interrupt */<br />

ConfigIntDCI( DCI_INT_ON & DCI_INT_PRI_6);<br />

/* Configure DCI module to transmit 16bit data with multichannel mode<br />

*/<br />

DCICON1value = DCI_EN & DCI_IDLE_CON &<br />

DCI_DIGI_LPBACK_EN &<br />

DCI_SCKD_OUP &<br />

DCI_SAMP_CLK_FAL &<br />

DCI_FSD_OUP &<br />

DCI_TX_ZERO_UNF &<br />

DCI_SDO_TRISTAT &<br />

DCI_DJST_OFF &<br />

DCI_FSM_MULTI;<br />

DCICON2value = DCI_BUFF_LEN_4 & DCI_FRAME_LEN_4 &<br />

DCI_DATA_WORD_16 ;<br />

DCICON3value = 0x00;<br />

RSCONvalue = DCI_EN_SLOT_ALL & DCI_DIS_SLOT_11 &<br />

DCI_DIS_SLOT_4 & DCI_DIS_SLOT_5;<br />

TSCONvalue = DCI_EN_SLOT_ALL & DCI_DIS_SLOT_11 &<br />

DCI_DIS_SLOT_4 &DCI_DIS_SLOT_5;<br />

OpenDCI(DCICON1value, DCICON2value, DCICON3value,<br />

TSCONvalue, RSCONvalue);<br />

dsPIC Peripheral Libraries<br />

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

/* Load transmit buffer and transmit the same */<br />

i = 0;<br />

while( i

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

Saved successfully!

Ooh no, something went wrong!