Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using USI #1

Open
tz1 opened this issue Jan 21, 2014 · 2 comments
Open

Using USI #1

tz1 opened this issue Jan 21, 2014 · 2 comments

Comments

@tz1
Copy link

tz1 commented Jan 21, 2014

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.

@Nephiel
Copy link
Owner

Nephiel commented Jan 22, 2014

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.

@tz1
Copy link
Author

tz1 commented Jan 22, 2014

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" notifications@github.com 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//issues/1#issuecomment-33013022
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants