

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
SPI ARDUINO SOFTWARE
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"ĪND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, Without specific prior written permission. May be used to endorse or promote products derived from this software Neither the name of the copyright holder nor the names of its contributors This list of conditions and the following disclaimer in the documentationĪnd/or other materials provided with the distribution.ģ. Redistributions in binary form must reproduce the above copyright notice, This list of conditions and the following disclaimer.Ģ.
SPI ARDUINO CODE
Redistributions of source code must retain the above copyright notice, Modification, are permitted provided that the following conditions are met:ġ. Redistribution and use in source and binary forms, with or without IF YOU DO NOT AGREE TO (OR CANNOT COMPLY WITH) ALL OF THE TERMS OF THIS AGREEMENT, SELECT "Decline", AND YOU SHALL NOT BE AUTHORIZED TO USE OR HAVE ANY LICENSE TO ANY PART OF THIS DOWNLOAD.
SPI ARDUINO INSTALL
IF YOU SELECT "Accept" OR IF YOU OTHERWISE INSTALL OR USE ANY PART OF THIS DOWNLOAD, YOU ARE REPRESENTING AND WARRANTING THAT YOU ARE CONSENTING TO BE BOUND BY,ĪND YOU HAVE BECOME A PARTY TO, THIS AGREEMENT.
SPI ARDUINO SOFTWARE LICENSE
THIS DOWNLOAD IS SUBJECT TO THIS END-USER SOFTWARE LICENSE AGREEMENT ("AGREEMENT").

#define DELAY_CYCLES_P1 3 //propogation post #define DELAY_CYCLES_P0 1 //propogation pre #define DELAY_CYCLES 2 //more precise than micro second delay, 1/4 of SPI bus frequency, depends on MCU master clock, for DUE 84MHz, need longer nop cycles to keep waveform! -> multiply each delay by 6 for example 8cycles as one SPI period, for Arduino mega2560 16MHz, SPI 2MHz, tested passed for AD7730! * usage: check and modify the header macro first, call spi_setup() before call spi_transfer()

Rename the “software_spi.txt” into “software_spi.cpp”, and put into your folder contains Arduino sketchbook. Here is the header codes (C style, not C++ class, can be easily adapted for other MCU): So a software bit-banging library may be necessary.įour SPI modes are supported, just change the macro definition in header file. If you wantto conenct some other sensors via SPI, the Ethernet lib is reluctant to cooperate. Since there is only one hardware SPI, but it is used by Ethernet or Wifi shield.
