SPI Transfer | Arduino Compatible Compiler for LabVIEW Discussions | Forum

Avatar
Please consider registering
guest
sp_LogInOut Log In sp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
SPI Transfer
March 27, 2017
11:23 am
Avatar
undermeadow
New Member
Members
Forum Posts: 1
Member Since:
March 24, 2017
sp_UserOfflineSmall Offline

Am I doing something wrong or is the SPI function poorly implemented? Even if I set the Transfer Mode to Continue there is still huge 5ms delay between transferred bytes. How can I get rid of it?
And what about Data Command? How can I set whenever the transferred data are data or command. I can see that everything is sent as Command automatically.
SPI-issue-01.PNGImage Enlarger

sp_PlupAttachments Attachments
April 3, 2017
1:46 pm
Avatar
ddowning1327
Member
Members
Forum Posts: 8
Member Since:
August 1, 2016
sp_UserOfflineSmall Offline

Are you watching the output with an oscilloscope?  Could you attach a screenshot? Which arduino are you using?  I used a Due and i only had 1us between bytes.

April 3, 2017
2:28 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

undermeadow said
Am I doing something wrong or is the SPI function poorly implemented? Even if I set the Transfer Mode to Continue there is still huge 5ms delay between transferred bytes. How can I get rid of it?
And what about Data Command? How can I set whenever the transferred data are data or command. I can see that everything is sent as Command automatically.

Yes, unfortunately for AVR boards (non Due), there is an intentional delay added between CS low and start of transfer.  This is because the AVR boards to not handle CS in hardware and it has to be handled in software using a GPIO output.  There has to be some delay between CS low and transfer for slave devices.  If you use a Due, the CS is handled by the SPI peripheral so that delay should be smaller.  To control that delay on AVR boards, you could wrap a custom library to achieve what you want.

Forum Timezone: UTC 0
Most Users Ever Online: 100
Currently Online:
3
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
miche91: 33
scottj: 28
scadao: 23
Member Stats:
Guest Posters: 5
Members: 202
Moderators: 0
Admins: 3
Forum Stats:
Groups: 1
Forums: 2
Topics: 266
Posts: 1222
Newest Members:
pujacontrol
Administrators: geadmin: 22, filipealtoe: 96, Steffan: 356