Shop OBEX P1 Docs P2 Docs Learn Events
SPI Slave code in SX/B — Parallax Forums

SPI Slave code in SX/B

BeanBean Posts: 8,129
edited 2008-12-19 11:37 in General Discussion
Here is a SX/B program that implements SPI slave functions.
This lets you make SX devices that communicate using SHIFTIN and SHIFTOUT from a BS2 or other device.

The main advantage is that unlike SERIN and SEROUT, you do not need a resonator.

Enjoy,
Bean.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The first rule to being successful is "Learn from your mistakes",
The second rule is "Be willing to make mistakes"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com

Comments

  • Capt. QuirkCapt. Quirk Posts: 872
    edited 2008-12-19 06:30
    Bean, when you created these routines, did you use any resistors between the SX & BS2?
  • BeanBean Posts: 8,129
    edited 2008-12-19 11:37
    If the SX is running at 5V, then you shouldn't need any.
    If the SX is running at a lower voltage, then I would use a 4.7K to prevent damage.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    "The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
    www.iElectronicDesigns.com

    ·
Sign In or Register to comment.