iowarios 24 basics

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

Moderator: Guido Körber

damienlehmann
Beiträge: 3
Registriert: Do Mär 03, 2016 4:42 pm

iowarios 24 basics

Beitragvon damienlehmann » Do Mär 03, 2016 5:19 pm

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
Beiträge: 3194
Registriert: Di Nov 25, 2003 10:25 pm
Wohnort: Germany/Berlin
Kontaktdaten:

Re: iowarios 24 basics

Beitragvon Guido Körber » Do Mär 03, 2016 5:33 pm

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.
Benutzeravatar
Christoph Jung
Beiträge: 561
Registriert: So Okt 08, 2006 3:43 pm
Wohnort: Germany / Berlin
Kontaktdaten:

Re: iowarios 24 basics

Beitragvon Christoph Jung » Do Mär 03, 2016 5:48 pm

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
Benutzeravatar
Christoph Jung
Beiträge: 561
Registriert: So Okt 08, 2006 3:43 pm
Wohnort: Germany / Berlin
Kontaktdaten:

Re: iowarios 24 basics

Beitragvon Christoph Jung » Do Mär 03, 2016 5:53 pm

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
Beiträge: 3
Registriert: Do Mär 03, 2016 4:42 pm

Re: iowarios 24 basics

Beitragvon damienlehmann » Fr Apr 15, 2016 11:21 am

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
Benutzeravatar
Christoph Jung
Beiträge: 561
Registriert: So Okt 08, 2006 3:43 pm
Wohnort: Germany / Berlin
Kontaktdaten:

Re: iowarios 24 basics

Beitragvon Christoph Jung » Fr Apr 15, 2016 11:52 am

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
Beiträge: 3
Registriert: Do Mär 03, 2016 4:42 pm

Re: iowarios 24 basics

Beitragvon damienlehmann » Sa Apr 30, 2016 1:45 pm

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
Benutzeravatar
Christoph Jung
Beiträge: 561
Registriert: So Okt 08, 2006 3:43 pm
Wohnort: Germany / Berlin
Kontaktdaten:

Re: iowarios 24 basics

Beitragvon Christoph Jung » Mo Mai 02, 2016 11:11 am

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

preparat alveo http://www.alveo-akuna.pl

Zurück zu „IO-Warrior English“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast