| Electronic Components Datasheet Search |
|
PIC24HJ128GP310 Datasheet(PDF) 148 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC24HJ128GP310 Datasheet(HTML) 148 Page - Microchip Technology |
|
148 / 286 page ![]() PIC24HJXXXGPX06/X08/X10 DS70175F-page 146 © 2007 Microchip Technology Inc. To set up the SPI module for the Slave mode of operation: 1. Clear the SPIxBUF register. 2. If using interrupts: a) Clear the SPIxIF bit in the respective IFSn register. b) Set the SPIxIE bit in the respective IECn register. c) Write the SPIxIP bits in the respective IPCn register to set the interrupt priority. 3. Write the desired settings to the SPIxCON1 and SPIxCON2 registers with MSTEN (SPIxCON1<5>) = 0. 4. Clear the SMP bit. 5. If the CKE bit is set, then the SSEN bit (SPIxCON1<7>) must be set to enable the SSx pin. 6. Clear the SPIROV bit (SPIxSTAT<6>). 7. Enable SPI operation by setting the SPIEN bit (SPIxSTAT<15>). The SPI module generates an interrupt indicating com- pletion of a byte or word transfer, as well as a separate interrupt for all SPI error conditions. FIGURE 15-1: SPI MODULE BLOCK DIAGRAM Note: Both SPI1 and SPI2 can trigger a DMA data transfer. If SPI1 or SPI2 is selected as the DMA IRQ source, a DMA transfer occurs when the SPI1IF or SPI2IF bit gets set as a result of an SPI1 or SPI2 byte or word transfer. Internal Data Bus SDIx SDOx SSx SCKx SPIxSR bit 0 Shift Control Edge Select FCY Primary 1:1/4/16/64 Enable Prescaler Sync SPIxBUF Control Transfer Transfer Write SPIxBUF Read SPIxBUF 16 SPIxCON1<1:0> SPIxCON1<4:2> Master Clock Clock Control Secondary Prescaler 1:1 to 1:8 SPIxRXB SPIxTXB |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |