iowarios 24 basics
Moderator: Guido Körber
-
- Posts: 5
- Joined: Thu Mar 03, 2016 4:42 pm
iowarios 24 basics
Hi,
I'm a total beginner with I2C and my iowarrior 24, so I get sarted by using "Simple-I2C" soft.
The dongle is connected with this two devices:
- MPL3115A2 from adafruit (datasheet : https://www.adafruit.com/datasheets/1893_datasheet.pdf)
page 16 we can see thant the read command code is 0xC1
- SDP610-25 from sensirion (datasheet : https://www.sensirion.com/fileadmin/use ... _V.1.9.pdf)
page 5 we can see thant the read command code is hF1
The dongle is found, the two I2C devices are found too, but when I write a read command the reading is always 02 00 00 for the sensirion and 03 00 00 00 for the Adafruit. What do I miss please?
copy of the data monitor:
Info Connected to IO-Warrior24 (000059C9) Version 1030
Device I²C device found. Adress: 40 (8Bit: 80)
Device I²C device found. Adress: 60 (8Bit: C0)
Info Number of devices: 2
Info Adress 40 chosen
Write 40 F1
Read 02 00 00
Info Adress 60 chosen
Write 60 C1 02
Read 03 00 00 00
Thanks
Damien
I'm a total beginner with I2C and my iowarrior 24, so I get sarted by using "Simple-I2C" soft.
The dongle is connected with this two devices:
- MPL3115A2 from adafruit (datasheet : https://www.adafruit.com/datasheets/1893_datasheet.pdf)
page 16 we can see thant the read command code is 0xC1
- SDP610-25 from sensirion (datasheet : https://www.sensirion.com/fileadmin/use ... _V.1.9.pdf)
page 5 we can see thant the read command code is hF1
The dongle is found, the two I2C devices are found too, but when I write a read command the reading is always 02 00 00 for the sensirion and 03 00 00 00 for the Adafruit. What do I miss please?
copy of the data monitor:
Info Connected to IO-Warrior24 (000059C9) Version 1030
Device I²C device found. Adress: 40 (8Bit: 80)
Device I²C device found. Adress: 60 (8Bit: C0)
Info Number of devices: 2
Info Adress 40 chosen
Write 40 F1
Read 02 00 00
Info Adress 60 chosen
Write 60 C1 02
Read 03 00 00 00
Thanks
Damien
-
- Site Admin
- Posts: 2856
- Joined: Tue Nov 25, 2003 10:25 pm
- Location: Germany/Berlin
- Contact:
Re: iowarios 24 basics
You have to shift the I2C address up by one bit.
I2C addresses are 7 bit long, the lowest bit transmitted on the bus is used as the R/W bit. So if you want to talk to the device with the address $40 you have to send $80 to write and $81 to read.
I2C addresses are 7 bit long, the lowest bit transmitted on the bus is used as the R/W bit. So if you want to talk to the device with the address $40 you have to send $80 to write and $81 to read.
- Christoph Jung
- Posts: 670
- Joined: Sun Oct 08, 2006 3:43 pm
- Location: Germany / Berlin
- Contact:
Re: iowarios 24 basics
The Simple I2C shift the address by itself.
You have to init the SDP610 I think.
Send for init the sensor first time: 0xF1
And then in an other report send for Read 0x00. Then you should get data from the sensor
You have to init the SDP610 I think.
Send for init the sensor first time: 0xF1
And then in an other report send for Read 0x00. Then you should get data from the sensor
- Christoph Jung
- Posts: 670
- Joined: Sun Oct 08, 2006 3:43 pm
- Location: Germany / Berlin
- Contact:
Re: iowarios 24 basics
I have found a samplecode for the SDP610. Maybe you can test it.
http://samples.codemercs.com/sdp610.zip
http://samples.codemercs.com/sdp610.zip
-
- Posts: 5
- Joined: Thu Mar 03, 2016 4:42 pm
Re: iowarios 24 basics
Hi all, thanks for your help.
I finally understand the procedure to read a sdp 610 sensor, you first have to write 0xF1 once to ask the sensor to send pressure on a read ask, then each time you need a reading, just send a read command (1 byte without 0xF1)
So with simple I2C you just have to select the proper adress (0x40), send 0xF1 once, then click the read button to receive data.
I'll now try to use the IOW24 with daqfactory...
Damien
I finally understand the procedure to read a sdp 610 sensor, you first have to write 0xF1 once to ask the sensor to send pressure on a read ask, then each time you need a reading, just send a read command (1 byte without 0xF1)
So with simple I2C you just have to select the proper adress (0x40), send 0xF1 once, then click the read button to receive data.
I'll now try to use the IOW24 with daqfactory...
Damien
- Christoph Jung
- Posts: 670
- Joined: Sun Oct 08, 2006 3:43 pm
- Location: Germany / Berlin
- Contact:
Re: iowarios 24 basics
We have no experience with DAQFactory, but of it works could you give us a short reply and maybe a short sample for other users here?
-
- Posts: 5
- Joined: Thu Mar 03, 2016 4:42 pm
Re: iowarios 24 basics
Hi,
I'm able to use the IOKit functions in dacfacfory (via the extern function), I am able to get the serial number and other basic function, but I don't understand the structure of the data I have to send...
I've read this datasheets, but I'm steal lost:
http://www.codemercs.com/downloads/iowa ... asheet.pdf
http://www.codemercs.com/downloads/iowa ... asheet.pdf
could you please tell me where I can find the source code of the simple-I2C.exe or Pressure SDP610.exe?
Thanks
Damien
I'm able to use the IOKit functions in dacfacfory (via the extern function), I am able to get the serial number and other basic function, but I don't understand the structure of the data I have to send...
I've read this datasheets, but I'm steal lost:
http://www.codemercs.com/downloads/iowa ... asheet.pdf
http://www.codemercs.com/downloads/iowa ... asheet.pdf
could you please tell me where I can find the source code of the simple-I2C.exe or Pressure SDP610.exe?
Thanks
Damien
- Christoph Jung
- Posts: 670
- Joined: Sun Oct 08, 2006 3:43 pm
- Location: Germany / Berlin
- Contact:
Re: iowarios 24 basics
Here is the VS project for the SDP610: http://samples.codemercs.com/sdp610.zip
The structure is very simple. You have to enable the I2C-Mode of the IO-Warrior (special mode 0x01) once.
Than you have to sent data vial special mode 0x02 and read data via special mode 0x03.
The structure of these special mode will be found in the datasheet from the IO-Warrior24/40.
The structure is very simple. You have to enable the I2C-Mode of the IO-Warrior (special mode 0x01) once.
Than you have to sent data vial special mode 0x02 and read data via special mode 0x03.
The structure of these special mode will be found in the datasheet from the IO-Warrior24/40.
-
- Posts: 5
- Joined: Thu Mar 03, 2016 4:42 pm
Re: iowarior 24 basics
Hi,
I've written a little code to change sdp610 address under daqfactory.
How can I share it here?
Damien
I've written a little code to change sdp610 address under daqfactory.
How can I share it here?
Damien
- Christoph Jung
- Posts: 670
- Joined: Sun Oct 08, 2006 3:43 pm
- Location: Germany / Berlin
- Contact:
Re: iowarios 24 basics
Of course we would be happy if the code would be published here. This will certainly help other users a lot
-
- Posts: 5
- Joined: Thu Mar 03, 2016 4:42 pm
Re: iowarios 24 basics
OK, but how can I join the file?
- Christoph Jung
- Posts: 670
- Joined: Sun Oct 08, 2006 3:43 pm
- Location: Germany / Berlin
- Contact:
Re: iowarios 24 basics
Ahh sorry... It is not allawed for normal user to attach files I think. But send me an email at jung@codemercs.com and I will attach this to the thread.
-
- Site Admin
- Posts: 2856
- Joined: Tue Nov 25, 2003 10:25 pm
- Location: Germany/Berlin
- Contact:
Re: iowarios 24 basics
Yes, please email it, we will post it in the "Application Corner" section.