Skip to content

gicking/Arduino_SPI_bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Arduino_SPI_bridge is a small Arduino project to configure an Arduino as USB<->SPI gateway. The main objective for this project was to provide a OS-independent SPI-gateway for the stm8gal application. However, since the SPI can be freely configured, it should also work for other SPI slave devices.

Basically Arduino_SPI_bridge is remotely controlled via USB command using a simple UART protocol (for details see 'protocol.ods'). So far it has only been tested with an Arduino UNO (old ATMega type) and a Due (new CortexM type), but other boards shord work as well.

To test the functionality, a small Python project is also provided. Provided that Python and PySerial are installed, it should be compatible with Windows, MacOS X and Linux, including Raspbian.

For bug reports or feature requests please send me a note.

Have fun! Georg


License / Disclaimer

  • Arduino_SPI_bridge and it's source code is distributed under the Apache License Version 2.0 (see License)

Building the Software

Open 'SPI_bridge/SPI_bridge.ino' in the Arduino IDE, build and upload to the Arduino board.


Using the Software

Arduino_SPI_bridge waits for commands via USB and reacts accordingly. Frame syncronization is via inter-frame time (>1ms). The simple command and response protocol is (also see 'protocol.ods')

An example of protocol and possible error handling is given in 'Arduino_SPI_bridge.py'. This file can also be imported into bigger Python programs.


General Notes

  • before connecting different devices, please assert compatible voltage levels. Specifically, to avoid damage never expose a 3.3V device to 5V signals

Known Issues / Limitations

  • the initial version of Arduino_SPI_bridge used the NeoHWSerial library, which allows custom UART interrupt handlers. To also support newer Arduinos with 3.3V I/Os, protocol handling is now by serialEvent(), which uses polling. Therefore timing is much more critical, though no issue was found so far.

Revision History

v1.2.0 (2024-07-07)

  • shift CSN configuration from sen/receive to config
  • some cosmetic changes

v1.1.0 (2018-12-07)


v1.0.1 (2017-12-22)


v1.0.0 (2017-12-21)

  • initial release by Georg Icking-Konert under the Apache License 2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published