Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Is it possible to use Software Spi? #32

Open
hmantz opened this issue Oct 8, 2019 · 2 comments
Open

Question: Is it possible to use Software Spi? #32

hmantz opened this issue Oct 8, 2019 · 2 comments

Comments

@hmantz
Copy link

hmantz commented Oct 8, 2019

Hi all! I have a project with an Atmega328P and I am using the hardware SPI pins for a different purpose. Is it possible to use non-standard pins to flash a new bootloader from a SD card?

@Kieran-Weaver
Copy link

Yes, to use software SPI or any other form of SPI, just rewrite these functions:

void init_spi (void);		/* Initialize SPI port (asmfunc.S) */
void xmit_spi (BYTE d);		/* Send a byte to the MMC (asmfunc.S) */
BYTE rcv_spi (void);		/* Send a 0xFF to the MMC and get the received byte (asmfunc.S) */

They can be written in C/C++ as well as in AVR assembly.

@FergusonMG
Copy link

FergusonMG commented Aug 2, 2021

Hello, we have an Arduino Mega2560 available here that comes preinstalled with a microSD flash installer while still supporting updates through SPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants