latchwrite CP210X / 64 Bit

40 views
Skip to first unread message

FlaegelEmbed

unread,
Jan 6, 2017, 4:49:32 AM1/6/17
to SerialPundit
Hi,
due to the newest update i can now load the runtime of a CP2104. Readings are all fine, but the latchwrite of the runtime doesn't work properly.
If i activate all GPIO in the example apllication (CP210xPortReadWrite) all relays goes on (0->relay on/1->relay off) and then run your test77 with a writeLatch(handle, 15, 1 ) all relay will be deactivated(). A modified writeLatch(handle, 15, 0 ) does not activate the relays. I have perform some loop to check input parameters, but no combination allows the latchwrite to 0. The readlatch always read the correct state (run testapplication before own code).
I guess it is the runtime dll? The test apllication runs with 32bit runtime dll. A test with the 64 bit i could not find.

Rishi Gupta

unread,
Jan 6, 2017, 5:12:54 AM1/6/17
to SerialPundit
- Please use 64 bit os
- Please use 64 bit runtime.dll (attached)
64.zip

FlaegelEmbed

unread,
Jan 6, 2017, 6:43:02 AM1/6/17
to SerialPundit
Thank you for the response :),

all three checked (64bit os was okay, DLL was the same, no new information found for my ), but same issue.

In the VB-2010 example it's only a:

                hUSBDevice = CreateFile(sPort, GENERIC_READ Or GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL Or FILE_FLAG_OVERLAPPED, 0)    'create handle (WIN32 API...)
                CP210xRT_WriteLatch(hUSBDevice, &HF, &H0)  ' Write new GPIO setting to switch the relays. 0F(hex) => all GPIOs will be addressed
                CloseHandle(hUSBDevice)
in the  "switch all 4 relay ON" button event


But same execution of DLL-function in SerialPudit doesn't work (except to set GPIO to High to deactivate Relays)
The DLL only provide write and read of the registers not to configure them as input/output, also no configation found in the VB-2010 example.
Message has been deleted
Message has been deleted
Message has been deleted

Rishi Gupta

unread,
Jan 8, 2017, 12:45:26 AM1/8/17
to SerialPundit
Please use the attached updated jar file.

Rishi Gupta

unread,
Jan 8, 2017, 12:45:49 AM1/8/17
to SerialPundit
Please use the attached updated jar file.

Rishi Gupta

unread,
Jan 9, 2017, 12:37:37 AM1/9/17
to SerialPundit
I have sent you new jar at your email via wetransfer.

FlaegelEmbed

unread,
Jan 9, 2017, 1:04:24 AM1/9/17
to SerialPundit
Tested and it works like a charm :).
Thank you!

Rishi Gupta

unread,
Jan 9, 2017, 1:09:15 AM1/9/17
to SerialPundit
Okay thanks.
Reply all
Reply to author
Forward
0 new messages