|
Post by tkpatric on May 2, 2021 12:53:25 GMT -5
The attached program did work under all Windows versions, except W10. Please help!
Attachments:Programming.rtf (33.84 KB)
|
|
|
Post by Rod on May 2, 2021 13:17:06 GMT -5
Ugg... Bit banging of parrallel ports died twenty years ago and bit banging serial ports long before that. There is surely an easier way to do this now.
I would first suspect that you have lost the "hard" com1 address and that if you look for the serial port in "devices" you will find it has another virtual address. You also need to have followed the help file advice about INP and OUT and the associated special driver software.
But what is the device and what is the messaging protocol?
|
|
|
Post by tkpatric on May 2, 2021 13:38:57 GMT -5
It is the LM186, a 8 Channel I2C Analog to digital converter that I use... And I use the right digital com port...
|
|
|
Post by Rod on May 2, 2021 14:34:11 GMT -5
What error message do you get?
|
|
|
Post by tenochtitlanuk on May 2, 2021 15:19:14 GMT -5
Are you using LB 4.5 on 64 bit machines? Did you really mean LM186, and why the mention of I2C?? But as Rod says, there are much easier ways to read analog values, unless you need a high speed conversion- eg see my page at www.diga.me.uk/serialADCreadLinux.html
|
|
|
Post by tkpatric on May 3, 2021 3:47:05 GMT -5
Are you using LB 4.5 on 64 bit machines? Did you really mean LM186, and why the mention of I2C?? But as Rod says, there are much easier ways to read analog values, unless you need a high speed conversion- eg see my page at www.diga.me.uk/serialADCreadLinux.htmlI use the MAX186 Low Power 8-Channel Serial 12-Bit ADC on 64 bit W10. I have 5 devices with closet, connections, alimentation... so it is difficult to built new ones... I am 72 ...
|
|
|
Post by Rod on May 3, 2021 11:16:44 GMT -5
It will help if you can tell us how it fails. What error message do you get and is anything written to the error.log
There is also the option to run in compatibility mode even in win10
|
|
|
Post by tkpatric on May 3, 2021 11:22:04 GMT -5
It will help if you can tell us how it fails. What error message do you get and is anything written to the error.log There is also the option to run in compatibility mode even in win10 I do not get an error code, I have simply no output... The only thing that it must do is handle the serial port with INP and OUT. Therefore I use ntport.dll, ntport2.reg and zntport.sys
|
|
|
Post by Rod on May 3, 2021 11:32:21 GMT -5
It would also be useful to know if the system that fails is unique. Is the win10 system new hardware, a new serial port. A new win10 system is unlikely to have an actual serial port and probably needs a usb dongle.
|
|
|
Post by tkpatric on May 3, 2021 12:03:24 GMT -5
No, it does not work on 3 different W10 computers. one tower and two laptops. (thank you)
|
|
|
Post by Rod on May 3, 2021 13:32:16 GMT -5
Can you press the windows key plus the x key and then select device manager, then Ports(Com&LPT) Please tell us what Com port numbers are listed as in use. You should have and USB device plugged in when you do this.
|
|
|
Post by Rod on May 3, 2021 13:37:04 GMT -5
' InOut4kbasr
' Is port 1 not 3F8 ?
' port 1 = 3FC ' port 2 = 2FC ' port 3 = 3EC ' port 4 = 2EC
open "com1:9600,n,8,1" for random as #commHandle Port = hexdec("3FC")
nomainwin
textbox #Meten.a, 10, 10, 140, 22 open "Meten" for Graphics_nsb as #Meten Print #Meten, "trapclose [quit]"
while 1 scan timer 100,[done] wait [done] timer 0 GoSub [getdata] vo1=vo1+v1 aa=aa+1 result=vo1/aa 'average Print #Meten.a, "K1 = result = "; int(result) wend
|
|
|
Post by Rod on May 3, 2021 13:38:49 GMT -5
The forum will not accept your inp() anfd out() statements, they probably think it is hacking code :) The above code changed the top of your program the lower part is unchanged. Is the port address 3FC or 3F8?
|
|
|
Post by tkpatric on May 3, 2021 13:45:19 GMT -5
First I look for the right port with another program. In this case it is 3FC.
Yes some instructions are dangerous! :-) Therefore I submitted the program as text file in an attachment.
|
|
|
Post by Rod on May 3, 2021 16:02:59 GMT -5
Sorry to be pedantic but did the windows key plus x key then device manager then ports show Com1 as the com port number? Did you try putting the ntport.dll in the same folder as your program? What specific device are you using as the serial port, is it a pci card or is it a USB dongle? what make and model is it. Have you been able to access the device on Win10 with the other software you mention?
|
|