Hi, I've got some source code in VB I would like to translate to Delphi 4 (Object Pascal). I would be glad if someone could help me out.<br>I've got the same source for Turbo Pascal, Visual Basic 3.0 & 4.0, C and QBasic.<br>You'll think: he's got it in Turbo Pascal, why not use it in Delphi directly. Well I tried but it makes use or TPs PORT array, which doesn't exist in Delphi.<br><br>Here's one of the most important procedures. If you really want to help me, I could send you one of the units.<br>Mind that I've never programmed in this language before, so there could be some missing things.<br>The unit uses inpout.dll.<br><br><FONT FACE=monospace><br>Sub ReadIOchip (ChipNo%)<br> Dim Datavar%, StartChannel%, Temp%, Datvar$, Channel%<br> I2Cstart<br><br> Datavar% = IOChipCode%(ChipNo%) Or 1<br> I2COutput Datavar%<br><br> I2Cclockpulse<br><br> IOdata%(ChipNo%) = I2CInput()<br> IOdata%(ChipNo%) = BINNOT(IOdata%(ChipNo%))<br> I2Cclockpulse<br><br> I2CStop<br><br> StartChannel% = ChipNo% * 8 + 1<br> Temp% = IOdata%(ChipNo%)<br> Datvar$ = DecToBin(Temp%)<br> For Channel% = 0 To 7<br> If Mid$(Datvar$, 8 - Channel%, 1) = "1" Then<br> IO%(StartChannel% + Channel%) = 1<br> Else<br> IO%(StartChannel% + Channel%) = 0<br> End If<br> Next<br>End Sub<br></font><br><br>Thanks in advance, <p>Bert Vingerhoets<br><a href=mailto:vingerhoetsbert@hotmail.com>vingerhoetsbert@hotmail.com</a><br><a href= > </a><br>