Xminilab connection with arduino

More
8 years 4 months ago #1267 by mailmad
I try to send commands from an arduino to Xminilab through serial connection, according to user manual.
Arduino C provide 2 commands adequate for serial communication (if I am not mistaken):
a) Serial.print(XXX); to send an ascii character.
b) Serial.write(XXX); to send a binary character.
If for example I want to set Xminilab to X-Y mode, what should I do?
Already I have try this:
Serial.print(8);
Serial.write(X); ? ?// Where X all possible values from 0-255
Nothing change on display.
I should note that to translate voltage between Arduino and Xminilab, I place a voltage divider with a resistor 220? between?Arduino Tx and Xminilab Rx, and a 330? between Rx and GND of Xminilab.
Also I have set speed to 115000. Parity and stop bit are by default the same like those of Xminilab.
What should I do?

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago - 8 years 4 months ago #1268 by ganzziani
As mentioned in the manual, the command is sent in ASCII format./\r\n/To check that things work, start by sending the 'a' command. I guess it would be something like Serial.write('a');/\r\n/You should receive back the firmware version.
To set the scope to XY mode, you need to modify the MFFT variable by using command 'b', the MFFT variable is in Index 8./\r\n/Try this: Serial.write('b'); Serial.write(8); Serial.write(0x40);
Last edit: 8 years 4 months ago by ganzziani.

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago #1269 by mailmad
Thanks for your quick response, and yes, it works!!! Thanks again!
?
I am owner of Xprotolab and Xminilab, and I have to mention once again, I'm so excited for both devices!
Now I try to make my own version of oscilloscope based mainly on your Xminilab module. My goal is to make some small production of this unit.
Development estimated to last few months, and if ?everything go as planned will be beneficial for both of us.
?
Suggestions/corrections:
May an example like this you mention (a small piece of code), could be a good idea to be added in Xscope manual.
[h6]A tiny tiny type error founded in page 33. "using the" repeated once more.[/h6]
?
Sorry for babbling!
Regards!

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #1317 by agmihos
I try to enable x10 probe by Serial.write command, sending the follow: b, 1, and 3./\r\n/I guess I should see pointer of Ch1 shift a digit to the the right in meter mode, which I don't./\r\n/Other commands work fine, so communication work properly./\r\n/Do I miss something?

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #1321 by ganzziani
As stated on the manual, some options are not implemented, they have a note saying "For future hardware".

Please Log in or Create an account to join the conversation.

Time to create page: 0.164 seconds
Powered by Kunena Forum