SparkFun will be closed May 25, 2015 for Memorial Day. Orders placed after 2pm on Friday the 22nd will ship out on Tuesday. Thanks!
Frequently Asked Questions
Mon-Fri, 9am to 5pm
U.S. Mountain Time:
Chat With Us
April 7, 2009
about 4 years ago
I wrote up what I did at http://www.ka1kjz.com/?p=1331 and stick around for other embedded goodness. I really have to wonder if they ever actually tested this.
I settled on using ¼ of a BOB-08745 to do my level shifting. I wanted true bi-directionality and to do it “right”. I’ll replace it with a single FET once I decide on one.
If, after whatever level shift of choice you use, you still get nonsensical responses, then slow down the SPI by setting the SPR0 and SPR1 bits in SPCR. I set it to the slowest but I’ll probably bring it up.
And finally, J.Carrier’s code above looks pretty good, more efficient than mine, but thats basically what I’ve done. I don’t bother to wait for the CTS bit though, but that’s certainly the right way to do it.
I found YET another problem, the SPI is set by default to it’s max speed of 4MHz. This was resulting in some nonsensical responses. I slowed it down to the slowest, 250KHz by setting the SPR1 SPR0 bits in SPCR.
No public wish lists :(
Forgot your password?
No account? Register one!