• 0
jfrenzel

Wi-FIRE and bit-banging SPI?

Question

I've been looking over the SD library that was installed as part of the chipKIT boards (ver 1.4.1) and I get the distinct impression that it implements the SPI protocol to the SD card using bit-banging, rather than a PIC32 SPI peripheral. Is this correct?

Assuming so, are there any Arduino-compatible libraries for the Wi-FIRE that utilized the SPI peripherals?

Assuming not, is my best be to go with MPLAB Harmony? (I'm an old MPLAB-X guy using version 2.10 and an old peripheral library)

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

I have since discovered that there are two relevant libraries for Arduino included as part of the Digilent Core: DSPI and DSDVOL. I believe the former provides a hardware implementation of SPI using the PIC32 SPI controllers, which is in turn used by the latter to implement access to the SD card via SPI3.

Share this post


Link to post
Share on other sites
  • 0

Hi @jfrenzel,

Looking at the reference manual for the ChipKit Wi-Fire here under section 9 it says that the SD card is accessed using an SPI interface on PIC32 microcontroller pins dedicated to this purpose. The Arduino IDE SD library uses a “bit-banged” software SPI implementation to talk to SD card. However, software can be written to access the SD card using SPI3. I do not believe there is a Arduino compatible SD libraries that use the SPI peripherals. Unfortunately ,I have not used Harmony so I would not be able to directly speak to its use but Here is some Examples using chipKIT Wi-FIRE and this uses the sd card.

thank you,

Jon

Share this post


Link to post
Share on other sites
  • 0

Hi @jfrenzel,

I was aware of and used the DSPI library. I was not made aware of the DSDVOL. This library allows you to either use the SPI hardware or "bit bang".  Thank you for pointing this out.

cheers,

Jon

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now