sdlocker-tiny
sdlocker-tiny copied to clipboard
Using USI
I forked the repo (to my tz1) and added USI support. The docs are at best confusing, at worst wrong, but I get the high speed.
NOTE MOSI and MISO are REVERSED!!! - I needed to swap the pins.
I'm also not using the interrupts, but doing a series of writes to the register to do the clocking - 1 cycle each. There are other optimizations, but this is the main one.
I've done I2C master using the USI, and always wanted to try to get the SPI working.
Thanks for the port.
Nice! I did try swapping MISO and MOSI, but couldn't get it to work either way. Thanks for the tip, I'll try again.
The fork in my repo has a cleaned up version using the USI, or if you need help, just ask.
I needed to use a scope - the datasheet ans sample code is unclear, probably wrong. I just tweaked it until my waveforms were like yours, only faster. On Jan 22, 2014 3:19 AM, "Nephiel" [email protected] wrote:
Nice! I did try swapping MISO and MOSI, but couldn't get it to work either way. Thanks for the tip, I'll try again.
— Reply to this email directly or view it on GitHubhttps://github.com/Nephiel/sdlocker-tiny/issues/1#issuecomment-33013022 .