Advertisement
amigojapan

USB SPI bridge question

Oct 16th, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. USB SPI bridge
  2. man, I thought this would be easy, but it seems to be quite challenging to find documentation and samples that do what I need… one of my customers asked me to make a bridge so that he can send commands to an SPI master device, so he can just send the commands from a serial USB on a computer to the device with an arduino in-between as a bridge between serial and SPI… after reading a lot I came up with this.
  3.  
  4. Since I don’t have his device I decided to connect two arduinos and use one as the master and the other as the slave, eventually the slave should be the one that communicates with the computer. is SPI even a two way protocol? I don’t seem to find any examples that seem to send and receive data in the same app…
  5.  
  6. sketch on arduino 1 slave http://pastebin.com/7DP88qjd
  7. sketch on arduino 2 master http://pastebin.com/FCZuFfia
  8.  
  9. but when I try it on the arduino simulator I get no output from either arduino, any idea what I am doing wrong? ty in advanced!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement