iowarios 24 basics

This is the English forum for all topics related to IO-Warrior. Please post in English only

Moderator: Guido Körber

Post Reply
damienlehmann
Posts: 5
Joined: Thu Mar 03, 2016 4:42 pm

iowarios 24 basics

Post by damienlehmann »

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
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Re: iowarios 24 basics

Post by Guido Körber »

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.
User avatar
Christoph Jung
Posts: 670
Joined: Sun Oct 08, 2006 3:43 pm
Location: Germany / Berlin
Contact:

Re: iowarios 24 basics

Post by Christoph Jung »

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
Abteilung: Softwareentwicklung
Folge uns auf Twitter
Follow us on twitter
User avatar
Christoph Jung
Posts: 670
Joined: Sun Oct 08, 2006 3:43 pm
Location: Germany / Berlin
Contact:

Re: iowarios 24 basics

Post by Christoph Jung »

I have found a samplecode for the SDP610. Maybe you can test it.

http://samples.codemercs.com/sdp610.zip
Abteilung: Softwareentwicklung
Folge uns auf Twitter
Follow us on twitter
damienlehmann
Posts: 5
Joined: Thu Mar 03, 2016 4:42 pm

Re: iowarios 24 basics

Post by damienlehmann »

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
User avatar
Christoph Jung
Posts: 670
Joined: Sun Oct 08, 2006 3:43 pm
Location: Germany / Berlin
Contact:

Re: iowarios 24 basics

Post by Christoph Jung »

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?
Abteilung: Softwareentwicklung
Folge uns auf Twitter
Follow us on twitter
damienlehmann
Posts: 5
Joined: Thu Mar 03, 2016 4:42 pm

Re: iowarios 24 basics

Post by damienlehmann »

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
User avatar
Christoph Jung
Posts: 670
Joined: Sun Oct 08, 2006 3:43 pm
Location: Germany / Berlin
Contact:

Re: iowarios 24 basics

Post by Christoph Jung »

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.
Abteilung: Softwareentwicklung
Folge uns auf Twitter
Follow us on twitter
damienlehmann
Posts: 5
Joined: Thu Mar 03, 2016 4:42 pm

Re: iowarior 24 basics

Post by damienlehmann »

Hi,

I've written a little code to change sdp610 address under daqfactory.
How can I share it here?

Damien
User avatar
Christoph Jung
Posts: 670
Joined: Sun Oct 08, 2006 3:43 pm
Location: Germany / Berlin
Contact:

Re: iowarios 24 basics

Post by Christoph Jung »

Of course we would be happy if the code would be published here. This will certainly help other users a lot
Abteilung: Softwareentwicklung
Folge uns auf Twitter
Follow us on twitter
damienlehmann
Posts: 5
Joined: Thu Mar 03, 2016 4:42 pm

Re: iowarios 24 basics

Post by damienlehmann »

OK, but how can I join the file?
User avatar
Christoph Jung
Posts: 670
Joined: Sun Oct 08, 2006 3:43 pm
Location: Germany / Berlin
Contact:

Re: iowarios 24 basics

Post by Christoph Jung »

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.
Abteilung: Softwareentwicklung
Folge uns auf Twitter
Follow us on twitter
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Re: iowarios 24 basics

Post by Guido Körber »

Yes, please email it, we will post it in the "Application Corner" section.
Post Reply