Shop OBEX P1 Docs P2 Docs Learn Events
SPI Driver Similar to the I2C driver? — Parallax Forums

SPI Driver Similar to the I2C driver?

photomankcphotomankc Posts: 943
edited 2012-12-31 08:28 in Propeller 1
So I learned a lot from creating an I2C driver COGC program but only later learned that I had reinvented an already rolling wheel that was present in the drivers in PropGCC. Now I have switched my attention to SPI and want to make sure that I am not similarly reinventing another wheel that already exists. I found one thread that seemed to suggest that such a driver is not yet available but I wanted to see if anything had changed since that was posted?


My robot project has changed a bit from the original plan. I'm now looking at using a RaspberryPI for the bigger brain activities (Nav, Acc/Gyro/Compass calcs and such) and using the propeller mostly for low level work. SparkFun came out with a breakout for the L6470 stepper driver that will largely replace the need for my custom micro doing that work now. It's a complex SPI chip but works almost identical to how my solution worked. Tell it how far to go and how fast to go and it does all the rest of the work just operates over SPI rather than I2C.

Comments

  • David BetzDavid Betz Posts: 14,516
    edited 2012-12-30 19:13
    photomankc wrote: »
    So I learned a lot from creating an I2C driver COGC program but only later learned that I had reinvented an already rolling wheel that was present in the drivers in PropGCC. Now I have switched my attention to SPI and want to make sure that I am not similarly reinventing another wheel that already exists. I found one thread that seemed to suggest that such a driver is not yet available but I wanted to see if anything had changed since that was posted?


    My robot project has changed a bit from the original plan. I'm now looking at using a RaspberryPI for the bigger brain activities (Nav, Acc/Gyro/Compass calcs and such) and using the propeller mostly for low level work. SparkFun came out with a breakout for the L6470 stepper driver that will largely replace the need for my custom micro doing that work now. It's a complex SPI chip but works almost identical to how my solution worked. Tell it how far to go and how fast to go and it does all the rest of the work just operates over SPI rather than I2C.
    There is no generic SPI driver in PropGCC at the moment. There are cache drivers that use SPI but they have custom code and their SPI interfaces are not published for general use. I think you can go ahead and write your driver without worrying about reinventing the wheel! :-)
  • photomankcphotomankc Posts: 943
    edited 2012-12-30 20:58
    Dang...... Come on man, invent my wheel for me! ;)
  • David BetzDavid Betz Posts: 14,516
    edited 2012-12-31 08:28
    photomankc wrote: »
    Dang...... Come on man, invent my wheel for me! ;)
    Too busy having fun porting PropGCC to the Propeller 2! Sorry! :-)
Sign In or Register to comment.