RoboPro 3.1.3 with I2C!
Forumsregeln
Bitte beachte die Forumsregeln!
Bitte beachte die Forumsregeln!
Re: RoboPro 3.1.3 with I2C!
Thanks for your effort.
Is the 250 msec an one time event or does it arrives more?
A rather slow on-line implementaion.
In that case a solution with for example the Microchip USB-2-I2C interface/(the serial analyzer; +/- 40 Euro's) is much faster.
Are you able to speculate about the situation when there are more TX-C slave in use?
It looks like that the bypass the TA in the off-line mode.
Only the master can be addressed for I2C use, it looks like that the slave are excluded in RoboPro, or make I a mistake?
Is the 250 msec an one time event or does it arrives more?
A rather slow on-line implementaion.
In that case a solution with for example the Microchip USB-2-I2C interface/(the serial analyzer; +/- 40 Euro's) is much faster.
Are you able to speculate about the situation when there are more TX-C slave in use?
It looks like that the bypass the TA in the off-line mode.
Only the master can be addressed for I2C use, it looks like that the slave are excluded in RoboPro, or make I a mistake?
- Peterholland
- Beiträge: 324
- Registriert: 01 Nov 2010, 22:28
- Wohnort: Poederoyen NL
Re: RoboPro 3.1.3 with I2C!
Hallo Sven oder andere I2C-users
Du hast (auch) vor das LED I²C Display beim Flipper zu nutzen. Funktioniert dieser schon ?
Ich versuche jetzt der LED-DisplaySAA1064 in verschiedene einfache RoboPro-Programme anzuwenden.
Wäre es möglich deine Robo-Flipper-Program mit dem integrierter "I2C-Bus LED Display Conrad # 198344" als Beispiel zu mailen oder zu uploaden ?
Wie damals beim Tutorial von Ulrich Müller lernt man sehr viel und schnell wenn es mehrere Beispiel-Programme gibt, die man selbst ändern kann.
Grüss,
Peter
Poederoyen NL
Du hast (auch) vor das LED I²C Display beim Flipper zu nutzen. Funktioniert dieser schon ?
Ich versuche jetzt der LED-DisplaySAA1064 in verschiedene einfache RoboPro-Programme anzuwenden.
Wäre es möglich deine Robo-Flipper-Program mit dem integrierter "I2C-Bus LED Display Conrad # 198344" als Beispiel zu mailen oder zu uploaden ?
Wie damals beim Tutorial von Ulrich Müller lernt man sehr viel und schnell wenn es mehrere Beispiel-Programme gibt, die man selbst ändern kann.
Grüss,
Peter
Poederoyen NL
Peter Poederoyen NL
- Peterholland
- Beiträge: 324
- Registriert: 01 Nov 2010, 22:28
- Wohnort: Poederoyen NL
Re: RoboPro 3.1.3 with I2C!
Ich habe 2 RoboPro-Programm mit I2C-Bus LED Display geuploaded aber dieser sind noch nicht freigeschaltet:
- G-krachtmeting-max-min + LED-I2C (=Neuhold 3-Achsen Beschleunigungs-Senor-Module (=300mV/g) + I2C-Bus LED Display Conrad # 198344)
und
- LED-SAA1064 + 5K=Potmeter
Grüss,
Peter
Poederoyen NL
- G-krachtmeting-max-min + LED-I2C (=Neuhold 3-Achsen Beschleunigungs-Senor-Module (=300mV/g) + I2C-Bus LED Display Conrad # 198344)
und
- LED-SAA1064 + 5K=Potmeter
Grüss,
Peter
Poederoyen NL
Peter Poederoyen NL
Re: RoboPro 3.1.3 with I2C!
Dear All,
yeah, today the ft-guys have released the C-Compiler Programmierpaket FIRMWARE 1.30 and PC Programming ROBO TX Controller Version 1.5 including the i2c interface.
Now I see a chance to implement a reansonable logging interface from an C-compiled appication running on the TX to a generic application running on a PC. Fortunately a colleague of mine donated me a little cute "mbed NXP LPC11U24" controller, he is just happy with the more powerful version LPC1768. The LPC11U24 provides an i2c interface on one side and a USB serial interface on the other side. The idea is to send the logs from the TX via i2c to the LPC11U24 (configured as i2c-slave) that simply forwards them via USB serial to the PC. The i2c voltage levels are different: 3.3 vs. 5V. Even though I have read in some blog that the mbed devices are "5V tolerant", I guess that it is not wise to try to connect them directcly. I have already found a guide to build a simple level shifter.
Now the big question. What transfer rate could I expect?
I read in an earlier posting that 1Byte/100µs~10K/s can be achieved.
Do I realize this, by calling the write function several times in one 500µs/ms-slot using the KeepOpen-flag? Each call of write_i2c appends a data byte to a buffer and later the OS sends the whole buffer to the i2c bus?
Do you think that this is a reasonable approach? I am an i2c newbie and I also know that using the nice mbed as relay is a kind of abuse, but currently I don't see any other way to get some debug info out of the TX.
Just to make sure: I have thoroughly read the bluetooth documentation. My conclusion was that it is not possible to transfer data from a TX application to a generic application running on the PC via BT. Is this correct?
Are there any other options?
cheers,
Helmut
yeah, today the ft-guys have released the C-Compiler Programmierpaket FIRMWARE 1.30 and PC Programming ROBO TX Controller Version 1.5 including the i2c interface.
Now I see a chance to implement a reansonable logging interface from an C-compiled appication running on the TX to a generic application running on a PC. Fortunately a colleague of mine donated me a little cute "mbed NXP LPC11U24" controller, he is just happy with the more powerful version LPC1768. The LPC11U24 provides an i2c interface on one side and a USB serial interface on the other side. The idea is to send the logs from the TX via i2c to the LPC11U24 (configured as i2c-slave) that simply forwards them via USB serial to the PC. The i2c voltage levels are different: 3.3 vs. 5V. Even though I have read in some blog that the mbed devices are "5V tolerant", I guess that it is not wise to try to connect them directcly. I have already found a guide to build a simple level shifter.
Now the big question. What transfer rate could I expect?
I read in an earlier posting that 1Byte/100µs~10K/s can be achieved.
Do I realize this, by calling the write function several times in one 500µs/ms-slot using the KeepOpen-flag? Each call of write_i2c appends a data byte to a buffer and later the OS sends the whole buffer to the i2c bus?
Do you think that this is a reasonable approach? I am an i2c newbie and I also know that using the nice mbed as relay is a kind of abuse, but currently I don't see any other way to get some debug info out of the TX.
Just to make sure: I have thoroughly read the bluetooth documentation. My conclusion was that it is not possible to transfer data from a TX application to a generic application running on the PC via BT. Is this correct?
Are there any other options?
cheers,
Helmut
Re: RoboPro 3.1.3 with I2C!
Thanks Rei!
The wireless solution sounds interesting. But it is a pity that one has to add two additional moduls to get some data out of the TX.
Cheers,
Helmut
The wireless solution sounds interesting. But it is a pity that one has to add two additional moduls to get some data out of the TX.
Cheers,
Helmut
Re: RoboPro 3.1.3 with I2C!
@Hamlet,
I2C opens new ways for the PC-TX-C commnication.
For example:
*) USB<->I2C connector (Microchip serial analyzer +/- 40 EUro) makes the PC act as an I2C slave.
*) I2C <-> wifi webserver board,
*) etc.
Bad luck that the online I2C implementation is so slow (ref. the experiment of Ad2)
I2C opens new ways for the PC-TX-C commnication.
For example:
*) USB<->I2C connector (Microchip serial analyzer +/- 40 EUro) makes the PC act as an I2C slave.
*) I2C <-> wifi webserver board,
*) etc.
Bad luck that the online I2C implementation is so slow (ref. the experiment of Ad2)
Zuletzt geändert von vleeuwen am 11 Mai 2012, 22:38, insgesamt 1-mal geändert.
Re: RoboPro 3.1.3 with I2C!
With 2 TX it should be possible to communicate at a reasonable speed over BT using messages. Connect one TX with USB to a PC. The other TX (in download mode with a C program) can communicate any data over bluetooth to the first TX (in online mode with a C program). This comes very close to the memory read and write functions we had with the RoboInterface.
Re: RoboPro 3.1.3 with I2C!
This package
C-Compiler Programmierpaket FIRMWARE 1.30 and PC Programming ROBO TX Controller Version 1.5 including the i2c interface.
is still based on a old Yagarto/GNU version.
C-Compiler Programmierpaket FIRMWARE 1.30 and PC Programming ROBO TX Controller Version 1.5 including the i2c interface.
is still based on a old Yagarto/GNU version.
Re: RoboPro 3.1.3 with I2C!
@Helmut.
I notice a simularity between your results and the results of Ad2, some weeks ago.
The online mode result is very disappointing.
In the online mode it looks like that it will be more efficient to make use of a normal USB to I2C connector.
I notice a simularity between your results and the results of Ad2, some weeks ago.
The online mode result is very disappointing.
In the online mode it looks like that it will be more efficient to make use of a normal USB to I2C connector.
Re: RoboPro 3.1.3 with I2C!
Hi,
may I ask you: Did you expect a control-device for toys when you bought the TX or a professional industrial control-unit? Let's not get carried away.
To connect displays, sensors etc. the data-rate will be enough. To build a milling-machine with I²C-Stepper-controllers and full 3D 3-axis path control the data rate maybe will not be enough. I can deal with it.
may I ask you: Did you expect a control-device for toys when you bought the TX or a professional industrial control-unit? Let's not get carried away.
To connect displays, sensors etc. the data-rate will be enough. To build a milling-machine with I²C-Stepper-controllers and full 3D 3-axis path control the data rate maybe will not be enough. I can deal with it.
Gruß
Thomas
Thomas
Re: RoboPro 3.1.3 with I2C!
Hi Thomas,
Based on my earlier comment you were able to know that I am not expecting miricals from the TX-C I2C implementation.
My reference is the 45 Euro Microchep serial analyzer ( same as the Microchip USB-I2C interface) and not the more industrial and more expencive I2C interfaces.
I did not expected the same quality from the TX-C as offer by this Microchip USB-I2C interface at dotNet framework level.
I was expecting four bytes data transfer+ address info in one TA refresh cycle (online mode).
And not 6 to 9 TA refresh cycles for one I2C command.
http://forum.ftcommunity.de/viewtopic.p ... 1274#p8627
Even with a additional I2C preprocessor between the (I2C) actuator/sensor devices and the TX-C is one byte/TA refresh cycle very slow to obtain some results in the online mode.
Based on my earlier comment you were able to know that I am not expecting miricals from the TX-C I2C implementation.
My reference is the 45 Euro Microchep serial analyzer ( same as the Microchip USB-I2C interface) and not the more industrial and more expencive I2C interfaces.
I did not expected the same quality from the TX-C as offer by this Microchip USB-I2C interface at dotNet framework level.
I was expecting four bytes data transfer+ address info in one TA refresh cycle (online mode).
And not 6 to 9 TA refresh cycles for one I2C command.
http://forum.ftcommunity.de/viewtopic.p ... 1274#p8627
Even with a additional I2C preprocessor between the (I2C) actuator/sensor devices and the TX-C is one byte/TA refresh cycle very slow to obtain some results in the online mode.
- Peterholland
- Beiträge: 324
- Registriert: 01 Nov 2010, 22:28
- Wohnort: Poederoyen NL
Re: RoboPro 3.1.3 with I2C!
Ich habe für den Flipper eine LCD (für noch ein Spiel ?) + LED Anzeige für die Punkte (account). Das funktioniert gut.
Ich möchte aber noch ein zweiter extra LED-Anzeige für die Kugelzahl : I2C-Bus LED Display (4 Digits 7Segs. rot 13mm) Conrad # 198344.
Wie erkannt das Robo Pro -Programm die beiden I2C-Bus LED Display (Conrad # 198344) weil sie Identisch sind ?.....Grüss,
Peter
Poederoyen NL
Ich möchte aber noch ein zweiter extra LED-Anzeige für die Kugelzahl : I2C-Bus LED Display (4 Digits 7Segs. rot 13mm) Conrad # 198344.
Wie erkannt das Robo Pro -Programm die beiden I2C-Bus LED Display (Conrad # 198344) weil sie Identisch sind ?.....Grüss,
Peter
Poederoyen NL
Peter Poederoyen NL
- Peterholland
- Beiträge: 324
- Registriert: 01 Nov 2010, 22:28
- Wohnort: Poederoyen NL
Re: RoboPro 3.1.3 with I2C!
Ich habe in die Anleitung gefunden : es gibt 4 Jumper-möglichkeiten die dem Modul die
einstellbare Adresse 0 bis 3 zuweisen.
Muss man bei eine andere Jumper-position auch noch etwas ändern im Robo Pro Programm ?Grüss,
Peter
Poederoyen NL
Im Anleitung lese ich....
Adressierung:
Die Adresse besteht aus einem festen, nicht veränderbaren Anteil und einem vom Benutzer
wählbaren Teil (zwei Bits x y). Das letzte Bit legt fest ob eine READ (Eingabe) oder WRITE
(Ausgabe) über den SAA1064 erfolgt. Allerdings ist beim diesem Baustein die interne
Adressdecodierung etwas anders als üblich. Das Modul hat deshalb 4 Jumper die dem Modul die
einstellbare Adresse 0 bis 3 zuweisen. Es darf jeweils nur ein Jumper gesteckt sein.
J1 x=0, y=0
J2 x=1, y=0
J3 x=0, y=1
J4 x=1, y=1
0 1 1 1 0 y x 1 READ-Operation
I----------I--------I--I
FIX ADR ADR R/W
Für eine WRITE- Operation ist das letzte Bit LO und es ergibt sich folgender Wert:
0 1 1 1 0 y x 0 WRITE- Operation
I----------I--------I--I
FIX ADR ADR R/W[/i]
einstellbare Adresse 0 bis 3 zuweisen.
Muss man bei eine andere Jumper-position auch noch etwas ändern im Robo Pro Programm ?Grüss,
Peter
Poederoyen NL
Im Anleitung lese ich....
Adressierung:
Die Adresse besteht aus einem festen, nicht veränderbaren Anteil und einem vom Benutzer
wählbaren Teil (zwei Bits x y). Das letzte Bit legt fest ob eine READ (Eingabe) oder WRITE
(Ausgabe) über den SAA1064 erfolgt. Allerdings ist beim diesem Baustein die interne
Adressdecodierung etwas anders als üblich. Das Modul hat deshalb 4 Jumper die dem Modul die
einstellbare Adresse 0 bis 3 zuweisen. Es darf jeweils nur ein Jumper gesteckt sein.
J1 x=0, y=0
J2 x=1, y=0
J3 x=0, y=1
J4 x=1, y=1
0 1 1 1 0 y x 1 READ-Operation
I----------I--------I--I
FIX ADR ADR R/W
Für eine WRITE- Operation ist das letzte Bit LO und es ergibt sich folgender Wert:
0 1 1 1 0 y x 0 WRITE- Operation
I----------I--------I--I
FIX ADR ADR R/W[/i]
Zuletzt geändert von Peterholland am 05 Aug 2012, 15:41, insgesamt 2-mal geändert.
Peter Poederoyen NL
- Peterholland
- Beiträge: 324
- Registriert: 01 Nov 2010, 22:28
- Wohnort: Poederoyen NL
Re: RoboPro 3.1.3 with I2C!
Heist das im alle RoboPro-Icons in Unterprogramm I2CLED-Set das betr. Display mit Jumper2 (statt 1) die Subadresse ändern in: 1x0 statt 0x0 ?
Apparat-adres beiden: 0x38 ?
Grüss,
Peter
Poederoyen NL
Apparat-adres beiden: 0x38 ?
Grüss,
Peter
Poederoyen NL
Peter Poederoyen NL
- Peterholland
- Beiträge: 324
- Registriert: 01 Nov 2010, 22:28
- Wohnort: Poederoyen NL
Re: RoboPro 3.1.3 with I2C!
Ich habe Heute erst ein zweiter extra LED-Anzeige für die Kugelzahl : I2C-Bus LED Display bei Conrad # 198344 bestellt.
Es dauert also noch einige Tagen zum probieren......
Beim I2C -LED und -LCD Anzeige für Flipper habe ich herausgefunden das die Stabilität des Zählen im Download-betrieb besser ist als im online-Betrieb.
Peter
Poederoyen NL
Es dauert also noch einige Tagen zum probieren......
Beim I2C -LED und -LCD Anzeige für Flipper habe ich herausgefunden das die Stabilität des Zählen im Download-betrieb besser ist als im online-Betrieb.
Peter
Poederoyen NL
Peter Poederoyen NL
- Peterholland
- Beiträge: 324
- Registriert: 01 Nov 2010, 22:28
- Wohnort: Poederoyen NL
Re: RoboPro 3.1.3 with I2C!
Gehört 0x1 zu J2 (Jumper 2) ?Ford hat geschrieben:stop:
wschl nicht 1x0 sondern 0x1!
alternative Möglichkeit, falls es nicht funzt:
Apparate-Addresse 0x39 statt 0x38.
Grüss,
Peter
Poederoyen NL
Peter Poederoyen NL
Re: RoboPro 3.1.3 with I2C!
Moin,
man muss unterscheiden zwischen Geräteadresse (device-address) und Subadresse.
Die Geräteadresse spricht das Gerät (= Chip, Modul, was auch immer) an. Die Subadresse ist nicht bei jedem Gerät vorhanden und dient zur Adressierung von Parametern innerhalb des Geräts.
Zum Beispiel bei einem EEPROM wird mit der Subadresse die Nummer der Speicherstelle mitgeteilt, auf die zugegriffen werden soll, während ein Port-Expander wie der PCF8574 keine Subadresse besitzt.
Es ist relativ üblich, über Pins verschiedene Geräteadressen zuweisen zu können, damit mehr als ein Gerät an den Bus angeschlossen werden kann.
Um die Geräteadresse aus dem obigen Beispiel zu berechnen, muss man Binärarithmetik bemühen:
Zum Beispiel bei y=0 und x=0 wäre die Adresse:
0111000
Das R/W (bzw. "D" für direction) interessiert in diesem Fall nicht, es wird von RoboPro automatisch der Übertragungsrichtung entsprechend gesetzt.
Um nun die Geräteadresse anzugeben, fängt man rechts in 4-er Schritten an, die Binärdaten in Hex zu wandeln (da gehe ich nun nicht näher darauf ein, im Internet gibt es genügend hierzu).
Also bekomme ich Hex 38 = 0x38 heraus.
Wird nun statt J1 der Jumper J2 gesetzt, so ist nach Anleitung x=1 und y=0.
0111001
Rechnet man das nun um, bekommt man 0x39 heraus.
Also muss man das Gerät, sofern es umgejumpert wird, mit Adresse 0x39 ansprechen - wie von Ford vermutet. Die Subadressen bleiben unverändert.
man muss unterscheiden zwischen Geräteadresse (device-address) und Subadresse.
Die Geräteadresse spricht das Gerät (= Chip, Modul, was auch immer) an. Die Subadresse ist nicht bei jedem Gerät vorhanden und dient zur Adressierung von Parametern innerhalb des Geräts.
Zum Beispiel bei einem EEPROM wird mit der Subadresse die Nummer der Speicherstelle mitgeteilt, auf die zugegriffen werden soll, während ein Port-Expander wie der PCF8574 keine Subadresse besitzt.
Es ist relativ üblich, über Pins verschiedene Geräteadressen zuweisen zu können, damit mehr als ein Gerät an den Bus angeschlossen werden kann.
Code: Alles auswählen
0 1 1 1 0 y x D
I----------I--------I--I
FIX ADR ADR R/W
Zum Beispiel bei y=0 und x=0 wäre die Adresse:
0111000
Das R/W (bzw. "D" für direction) interessiert in diesem Fall nicht, es wird von RoboPro automatisch der Übertragungsrichtung entsprechend gesetzt.
Um nun die Geräteadresse anzugeben, fängt man rechts in 4-er Schritten an, die Binärdaten in Hex zu wandeln (da gehe ich nun nicht näher darauf ein, im Internet gibt es genügend hierzu).
Also bekomme ich Hex 38 = 0x38 heraus.
Wird nun statt J1 der Jumper J2 gesetzt, so ist nach Anleitung x=1 und y=0.
0111001
Rechnet man das nun um, bekommt man 0x39 heraus.
Also muss man das Gerät, sofern es umgejumpert wird, mit Adresse 0x39 ansprechen - wie von Ford vermutet. Die Subadressen bleiben unverändert.
Gruß
Thomas
Thomas
- Dirk Fox
- ft:pedia-Herausgeber
- Beiträge: 1845
- Registriert: 01 Nov 2010, 00:49
- Wohnort: Karlsruhe
- Kontaktdaten:
Re: RoboPro 3.1.3 with I2C!
Hallo zusammen,
Gruß, Dirk
die Verwirrung kommt vermutlich daher, dass der Wikipedia-Artikel über I²C (http://de.wikipedia.org/wiki/I%C2%B2C) die konfigurierbaren Adressbestandteile im I²C-Device fälschlich "Subadresse" nennt, nach den Datenblättern der I²C-Devices darunter aber eindeutig eine Device-Interne Adressierung zu verstehen ist. Das hat mich zunächst auch irritiert...thkais hat geschrieben:man muss unterscheiden zwischen Geräteadresse (device-address) und Subadresse.
Gruß, Dirk
- Peterholland
- Beiträge: 324
- Registriert: 01 Nov 2010, 22:28
- Wohnort: Poederoyen NL
Re: RoboPro 3.1.3 with I2C!
Hallo zusammen,
Meine Flipper funtioniert jetzt mit 2x I2C-Bus LED Display (Conrad # 198344) + 1x LCD Anzeige (Conrad # 198330) .
LED Display- nr2 mit Jumper 2 wird im Robo Pro Programm mit Adresse 0x39 ansprochen.
Vielen Dank für die Hinweise.
Link um FT-Community:
http://www.ftcommunity.de/categories.php?cat_id=2616
ftCommunity | Bilderpool | Modelle | Sonstiges | Spielautomaten | Flipper PD-Holland
Robo Pro Programm gibt es unter:
http://www.ftcommunity.de/downloads.php ... ie=RoboPro
Grüss,
Peter Poederoyen NL
Meine Flipper funtioniert jetzt mit 2x I2C-Bus LED Display (Conrad # 198344) + 1x LCD Anzeige (Conrad # 198330) .
LED Display- nr2 mit Jumper 2 wird im Robo Pro Programm mit Adresse 0x39 ansprochen.
Vielen Dank für die Hinweise.
Link um FT-Community:
http://www.ftcommunity.de/categories.php?cat_id=2616
ftCommunity | Bilderpool | Modelle | Sonstiges | Spielautomaten | Flipper PD-Holland
Robo Pro Programm gibt es unter:
http://www.ftcommunity.de/downloads.php ... ie=RoboPro
Grüss,
Peter Poederoyen NL
Zuletzt geändert von Peterholland am 10 Aug 2012, 22:06, insgesamt 4-mal geändert.
Peter Poederoyen NL