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

Suggestion: Add 8- or 16-bit transfer size setter #7

Open
crteensy opened this issue Mar 22, 2015 · 8 comments
Open

Suggestion: Add 8- or 16-bit transfer size setter #7

crteensy opened this issue Mar 22, 2015 · 8 comments

Comments

@crteensy
Copy link
Contributor

Can we have a method that sets the SPI to 8-bit or 16-bit mode, possibly with an enum argument that selects between these transfer sizes? These sizes are the common denominator for Teensy 3.x and Teensy LC.

Transfer size can probably not be added to SPISettings, because that's a part of the common arduino interface, isn't it?

@TheSeventhCG
Copy link

Perhaps it could be a nice idea to implement a real 16Bit SPI transfer function into the SPI library. Not like the current one, which is splitting the 16Bit word into a high and low 8Bit variables to send them.

Actually modifying the library to transfer 16Bit is not the problem, but if possible it would be nice to have a possibility to send 8Bits with SPI.transfer and real 16Bit with SPI.transfer16.

This is only an idea from my side in addition to what @crteensy said.

@PaulStoffregen
Copy link
Owner

I don't understand why you're asking this? On the hardware which supports 16 bit transfers, we do use it.

@TheSeventhCG
Copy link

On the arduino due one should be able to transfer 16bits while using the spi transfer16 function and it will send 16bit per spi transfer. Is that what you meant?

@PaulStoffregen
Copy link
Owner

You're asking in the wrong place regarding Arduino Due. This is the SPI library for Teensy boards.

@PaulStoffregen
Copy link
Owner

And yes, I would agree, the library for Due leaves much to be desired. But I'm not the one to fix it, and this is not the place to request changes to a completely different copy of the SPI library.

@TheSeventhCG
Copy link

Yes, you are right, this is the wrong place

sorry about that

@PaulStoffregen
Copy link
Owner

Maybe consider giving Teensy 3.5 or 3.6 a try? Both are more powerful than Due, and they use this SPI library which does support real 16 bit transfer. It also has many other performance improvements. I'm sure you'll find SPI on Teensy works much, much better! :-)

@TheSeventhCG
Copy link

For starters i will have a look into the Teensys and see what would be fitting my needs

Thanks for the pointer

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

3 participants