32bit data transfer through spi

General discussion on mikroElektronika website & forums.
Post Reply
Author
Message
faisal987
Posts: 1
Joined: 27 Dec 2013 06:25

32bit data transfer through spi

#1 Post by faisal987 » 27 Dec 2013 06:31

hy.
i am using pic16f887 to transfer data through spi. my slave device will take 32 bits of data to work properly. can you tell me how i can transfer 32 bit through spi st the same time..

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: 32bit data transfer through spi

#2 Post by marina.petrovic » 27 Dec 2013 14:35

Hi,

With PIC16F887 (PIC microcontroller), you only have 8-bit data transfer through SPI.
You can try something like this: drop CS, then write 4 x 8-bit and rise CS.

Also, you can consider to use some PIC32 microcontroller.

For example, in our compilers for PIC32 - SPI Library, you can find SPIx_Init_Advanced() function with parameter data_mode.
Parameter data_mode determines the data length mode, which can be 8-bits (per transitions cycle), 16-bits or 32-bits.

Best regards,
Marina

Post Reply

Return to “Website & Forums General Discussion”