Choon Shin Posted July 18, 2022 Share Posted July 18, 2022 Hello, I'm writing a script in Waveforms - Protocol - SPI - custom window. I wanted to change First bit: MSBit to LSBit. I can assign all other values but I couldn't find First bit assign script anywhere. Does anyone know the script to change the "First bit" value? ------------------- Select.Active.value = 0; Clock.Polarity.value = 1; Clock.Phase.value = 1; Clock.Frequency.value = 100e3; // 100kHz Select.value = 3; //Assigns pin Analog Discovery 2 DIO 3 Clock.value = 2; //Assigns pin Analog Discovery 2 DIO 2 DQ0.value = 4; //Assigns pin Analog Discovery 2 DIO 4 // // SPI: MOSI DQ1.value = 5; //Assigns pin Analog Discovery 2 DIO 5 // SPI: MISO ----------------- Thank you! Choon Link to comment Share on other sites More sharing options...
0 attila Posted July 19, 2022 Share Posted July 19, 2022 Hi @Choon Shin See the following: JColvin 1 Link to comment Share on other sites More sharing options...
0 Sagi Posted January 12 Share Posted January 12 (edited) @attila, I have the same question. How would I be putting this in the script? Protocol.SPI.Firstbit.text = 'MSBit'; Protocol.SPI.Firstword.text = 'LSWord'; The lines above do not work. Protocol does not come out in the editor as a valid option. Thanks Edited January 12 by Sagi Link to comment Share on other sites More sharing options...
0 attila Posted January 12 Share Posted January 12 Hi @Sagi See the following: Do you have the Protocol tool open ? Link to comment Share on other sites More sharing options...
0 Sagi Posted January 12 Share Posted January 12 @attila I moved the script to the script tab from the SPI custom. It works now. The SPI example in the scrip also helped. Thank you. attila 1 Link to comment Share on other sites More sharing options...
Question
Choon Shin
Hello,
I'm writing a script in Waveforms - Protocol - SPI - custom window. I wanted to change First bit: MSBit to LSBit.
I can assign all other values but I couldn't find First bit assign script anywhere.
Does anyone know the script to change the "First bit" value?
-------------------
Select.Active.value = 0;
Clock.Polarity.value = 1;
Clock.Phase.value = 1;
Clock.Frequency.value = 100e3; // 100kHz
Select.value = 3; //Assigns pin Analog Discovery 2 DIO 3
Clock.value = 2; //Assigns pin Analog Discovery 2 DIO 2
DQ0.value = 4; //Assigns pin Analog Discovery 2 DIO 4 // // SPI: MOSI
DQ1.value = 5; //Assigns pin Analog Discovery 2 DIO 5 // SPI: MISO
-----------------
Thank you!
Choon
Link to comment
Share on other sites
4 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