I've been playing a bit with the Digital Discovery Waverforms application scripting to help speed development of some SPI peripherals. Although I find the scripting documentation mostly helpful, some things puzzle me (for example, where would one see 'true' or 'false'? even when I step through a script using the debugger, I don't see return values).
And from a script perspective, I *think* the script 'honors' the pin descriptions identified in the 'Settings' portion of the Waveforms app. So with this small script shown below...
SPI Chip select is on pin DIO24 and is active low
SPI clk is on DIO25 (even though the 'Settings' control indicates a frequency of 1MHz, the script sets the frequency to 100KHz)
MOSI is on DIO27
MISO is on DIO26
Then the script starting at line 7 merely starts the SPI function (pulling DIO24 low), then writes 8 bytes (lines 9-11), then waits 100ms, then writes 3 more bytes, then stops (pulling DIO24 high). Is anything I've said about the script not accurate?
Question
engrpetero
I've been playing a bit with the Digital Discovery Waverforms application scripting to help speed development of some SPI peripherals. Although I find the scripting documentation mostly helpful, some things puzzle me (for example, where would one see 'true' or 'false'? even when I step through a script using the debugger, I don't see return values).
And from a script perspective, I *think* the script 'honors' the pin descriptions identified in the 'Settings' portion of the Waveforms app. So with this small script shown below...
Then the script starting at line 7 merely starts the SPI function (pulling DIO24 low), then writes 8 bytes (lines 9-11), then waits 100ms, then writes 3 more bytes, then stops (pulling DIO24 high). Is anything I've said about the script not accurate?
fixed typo, clarification
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now