Bascom ---> Pascal

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Page 4 of 6
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1372
Registered: 03 / 2005
Subject:

Re: Bascom ---> Pascal

 · 
Posted: 09.08.2022 - 10:13  ·  #25
Hi Miparo.

You say I2COut in Beta doesn'y work any more. In what way? Doesn't compile? produces bad code?

Thanks

Merlin.
miparo
Administrator
Avatar
Gender:
Location: Germany
Age: 59
Posts: 956
Registered: 09 / 2007
Subject:

Re: Bascom ---> Pascal

 · 
Posted: 09.08.2022 - 11:06  ·  #26
Hi Merlin,
procedure BME280write8(reg, data: byte);
begin
I2Cout(BME_Addr, reg, data); don't compile
end;

miparo
miparo
Administrator
Avatar
Gender:
Location: Germany
Age: 59
Posts: 956
Registered: 09 / 2007
Subject:

Re: Bascom ---> Pascal

 · 
Posted: 09.08.2022 - 12:50  ·  #27
Hi Merlin,
Any changes to the I2C driver are useless, because it is already 8/16/24/32 ... Bits can be transferred like this.
This is just not described in the manual.

Code

var
  Onebyte : byte;
  Twobytes : word;
  ThreeBytes : Array[0..2] of byte;  // 24-Bit
   Fourbytes : longword;
....
   I2Cinp(Addr,OneByte);
   I2Cinp(Addr,TwoByte);
   I2Cinp(Addr,ThreeByte);
   I2Cinp(Addr,FourByte);
   // the same with
  I2Cout(addr,reg,[Bytes]);


This is also how it works on the BME280 , which provides a 24-bit temperature value.
See my short example code above.

miparo
Mathias
Benutzer
Avatar
Gender: n/a
Location: Weingarten - Baden
Posts: 307
Registered: 07 / 2003
Subject:

Re: Bascom ---> Pascal

 · 
Posted: 09.08.2022 - 18:16  ·  #28
Quote

Nicht den letzten Beta Compiler hier im Thread benutzen, da geht kein I2Cout mehr.


Habe die Version: 5.11.00
Welche Version ist aktuell sinnvoll?

Mathias
miparo
Administrator
Avatar
Gender:
Location: Germany
Age: 59
Posts: 956
Registered: 09 / 2007
Subject:

Re: Bascom ---> Pascal

 · 
Posted: 09.08.2022 - 18:53  ·  #29
Hi Matthias,
5.11.11 lief noch aber 5.11.15 nicht mehr.

Merlin ist da dran....


Habs nochmal angepasst aber Pressure will noch nicht :(

Wofür braucht man eigentlich so eine Krücke ?
miparo
Mathias
Benutzer
Avatar
Gender: n/a
Location: Weingarten - Baden
Posts: 307
Registered: 07 / 2003
Subject:

Re: Bascom ---> Pascal

 · 
Posted: 11.08.2022 - 23:55  ·  #30
Hallo,
hat jemand die 5.11.11 für mich?

Danke
miparo
Administrator
Avatar
Gender:
Location: Germany
Age: 59
Posts: 956
Registered: 09 / 2007
Subject:

Re: Bascom ---> Pascal

 · 
Posted: 12.08.2022 - 00:37  ·  #31
Hi Matthias,
laut Merlin soll auch die letzte 5.11.15 funktionieren, bei mir nicht.
Probiere mal.....

miparo
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1372
Registered: 03 / 2005
Subject:

Re: Bascom ---> Pascal

 · 
Posted: 12.08.2022 - 14:02  ·  #32
Hi Miparo.

The test code you sent me (Labelled Mega4809) compiles and assembles. Beyond that I cannot test. If you have different code that does not work you need to let me have it.

Hi Matthias

I have 5.11.11 archived, so if 5.11.15 does not work I will send it to you. But if I do, please preserve your asm/dsm files for both versions so I can see what has gone wrong (if anything).

Regards

Merlin

====================================================

Hallo Miparo.

Der Testcode, den du mir geschickt hast (mit der Bezeichnung Mega4809) kompiliert und assembliert. Darüber hinaus kann ich nicht testen. Wenn Du einen anderen Code hast, der nicht funktioniert, musst Du ihn mir zur Verfügung stellen.

Hallo Matthias

ich habe 5.11.11 archiviert, wenn also 5.11.15 nicht funktioniert, werde ich es dir schicken. Aber wenn ich das tue, bewahren Sie bitte Ihre asm/dsm-Dateien für beide Versionen auf, damit ich sehen kann, was falsch gelaufen ist (wenn überhaupt).

Mit freundlichen Grüßen

Merlin

Übersetzt mit www.DeepL.com/Translator (kostenlose Version)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Page 4 of 6
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   135   149 · Page-Gen-Time: 0.019885s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI