Home Forum XMEGA Xminilab Xminilab connection with arduino
 Gabotronics Forum :: XMEGA Xminilab
Welcome Guest   
 Subject :Xminilab connection with arduino.. 2017-08-16 21:50:46 
mailmad
Joined: 2015-12-29 04:23:16
Posts: 3
Location

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?

IP Logged
 Subject :Re:Xminilab connection with arduino.. 2017-08-17 18:54:41 
ganzziani
Joined: 2012-04-02 15:42:39
Posts: 463
Location: Sarasota, FL
 

As mentioned in the manual, the command is sent in ASCII format.
To check that things work, start by sending the 'a' command. I guess it would be something like Serial.write('a');
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.
Try this: Serial.write('b'); Serial.write(8); Serial.write(0x40);

IP Logged
Gabriel Anzziani
 Subject :Re:Xminilab connection with arduino.. 2017-08-17 22:53:24 
mailmad
Joined: 2015-12-29 04:23:16
Posts: 3
Location

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.

A tiny tiny type error founded in page 33. "using the" repeated once more.

 

Sorry for babbling!

Regards!

IP Logged
 Subject :Re:Xminilab connection with arduino.. 2017-10-26 22:20:47 
agmihos
Joined: 2017-10-27 03:07:08
Posts: 6
Location
I try to enable x10 probe by Serial.write command, sending the follow: b, 1, and 3.
I guess I should see pointer of Ch1 shift a digit to the the right in meter mode, which I don't.
Other commands work fine, so communication work properly.
Do I miss something?
IP Logged
 Subject :Re:Xminilab connection with arduino.. 2017-10-28 22:30:15 
ganzziani
Joined: 2012-04-02 15:42:39
Posts: 463
Location: Sarasota, FL
 
As stated on the manual, some options are not implemented, they have a note saying "For future hardware".
IP Logged
Gabriel Anzziani
Page # 


Powered by ccBoard