JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

CH340G USB-to-Serial converter
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Hardware
View previous topic :: View next topic  
Author Message
binky123
Expert


Joined: 14 Feb 2004
Posts: 1292

                    
PostPosted: Sat May 12, 2018 2:15 pm    Post subject: Reply with quote

I was able to make progress on VS CE.

Project->Property. Windows SDK Version. click on drop down and select 10.0.17134.0 for now.
need WIN32 preprocessor definition
Additional include directories: c:\Program Files\Java\jdk1.8.0_121\include;c:\Program Files\Java\jdk1.8.0_121\include\win32
Project Defaults. Configuration type. was set to Application(.exe). changed to Dynamic library(.dll).

I then build a Release(x64) version. I've uploaded it here http://www.hifi-remote.com/forums/dload.php?action=file&file_id=25218. Place that in RemoteMaster\Windows-amd64\ folder.
RMIR in Help->About should show
JP1.X Serial version 0.22a Beta DTR changes for CH340G.
Back to top
View user's profile Send private message
blackride



Joined: 21 Mar 2018
Posts: 24

                    
PostPosted: Sat May 12, 2018 3:32 pm    Post subject: Reply with quote

binky123 wrote:
I was able to make progress on VS CE.

Project->Property. Windows SDK Version. click on drop down and select 10.0.17134.0 for now.
need WIN32 preprocessor definition
Additional include directories: c:\Program Files\Java\jdk1.8.0_121\include;c:\Program Files\Java\jdk1.8.0_121\include\win32
Project Defaults. Configuration type. was set to Application(.exe). changed to Dynamic library(.dll).

I then build a Release(x64) version. I've uploaded it here http://www.hifi-remote.com/forums/dload.php?action=file&file_id=25218. Place that in RemoteMaster\Windows-amd64\ folder.
RMIR in Help->About should show
JP1.X Serial version 0.22a Beta DTR changes for CH340G.


Thank you binky123. I replace library, but this is not work with ch340G.

Today I received another adapter HL-340 (usb -> com).
https://www.aliexpress.com/item/1pcs-HL-340-New-USB-to-RS232-COM-Port-Serial-PDA-9-pin-DB9-Cable-Adapter/32838036883.html
I ordered the adapter for work and decided to check with the adapter, which I assembled on M74HC266B1 according to Tommy's scheme. And it works! The collected adapter cost me $ 0.5. Of course, this is relevant if you have a com port or a usb -> com adapter.

Even the version of the HP 1.4 has been defined. And I was able to add and load a new device. But I was confused by one thing - for some reason only one cell of "free memory" was shown in the status bar as in URC-6440. And on the screenshots in the wiki I saw 3 cells.
Back to top
View user's profile Send private message
binky123
Expert


Joined: 14 Feb 2004
Posts: 1292

                    
PostPosted: Sat May 12, 2018 5:54 pm    Post subject: Reply with quote

Thanks for checking. I forgot to say the changes suggested by shenson are only for a JP1.2/JP1.3 remote and the URC-7140 is a JP1.4 remote. There is a different function for connecting to a JP2/JP1.4 remote.

I can try to make the changes so that a JP1.4 remote can work with DTR if you want. Let me know.
Back to top
View user's profile Send private message
binky123
Expert


Joined: 14 Feb 2004
Posts: 1292

                    
PostPosted: Sat May 12, 2018 6:56 pm    Post subject: Reply with quote

I've made the changes to JP2_14Connect() so if it fails to get a JP2_14 Info and signature, it'll try toggling DTR. I've updated the file at http://www.hifi-remote.com/forums/dload.php?action=file&file_id=25218 and version is now 0.22b Beta.
Back to top
View user's profile Send private message
blackride



Joined: 21 Mar 2018
Posts: 24

                    
PostPosted: Sun May 13, 2018 12:25 am    Post subject: Reply with quote

binky123 wrote:
I've made the changes to JP2_14Connect() so if it fails to get a JP2_14 Info and signature, it'll try toggling DTR. I've updated the file at http://www.hifi-remote.com/forums/dload.php?action=file&file_id=25218 and version is now 0.22b Beta.

I checked. As before, when downloading information from the remote control on the remote control, the light bulb flashes a couple of times and can not find the remote control. I connect with 3.3v in pin and without it.
Back to top
View user's profile Send private message
blackride



Joined: 21 Mar 2018
Posts: 24

                    
PostPosted: Sun May 13, 2018 7:53 am    Post subject: Reply with quote

binky123
Have you checked FTDI FT232RL? Does this controller work?
The next week I'll get a FTDI FT232RL full-fledged com port. Can I check with your the last library that you uploaded?
Back to top
View user's profile Send private message
binky123
Expert


Joined: 14 Feb 2004
Posts: 1292

                    
PostPosted: Sun May 13, 2018 8:58 am    Post subject: Reply with quote

blackride,
Thanks for checking. Unfortunately, I don't have a JP1.4 remote but I will check the signals timing and compare it to the RTS output. The LED flashes do mean the remote is being reset. I will let you know if I find anything.

I do have a FTDI FT232RL and this controller definitely works and is the recommended chip to use. This controller does provide RTS output. The standard version 0.22 library should work. The 0.22b BETA library should also work as it still tries to use RTS to reset remote (as well as trying DTR).

The FT232RL can also be used as a simple low frequency logic signal analyzer if you need to look at signal timing. This is useful if you want to look at the DTR, TX, RX signals from the CH340G chip.
Back to top
View user's profile Send private message
binky123
Expert


Joined: 14 Feb 2004
Posts: 1292

                    
PostPosted: Mon May 14, 2018 6:44 pm    Post subject: Reply with quote

I checked the timings on a FT232RL chip tester box and when RTS goes low, DTR goes low as well. RTS goes high after 116ms but DTR stays low. The code then tries to connect with the remote and it should fail as the RTS is not used. The code then sets DTR low but it is already low, then it goes high 90ms after this point. The code then tries to connect with the remote. If I add a CLRDTR right before the first DTR low, I do see DTR go high for 3ms and then it does the low for 90ms.

So the signal on DTR is going low and then high which should cause JP1.4 remote to go into communication mode. The difference with RTS is that DTR stays low for 386ms as it stays low during RTS and the connection test. This is behavior on my FT232RL tester box and the CH340G may behave differently.

The CH340G chip does provide RTS but the ebay link shows it only brings out DTR or CTS pin. You could solder a wire to the RTS pin on the cihp if needed.
Back to top
View user's profile Send private message
blackride



Joined: 21 Mar 2018
Posts: 24

                    
PostPosted: Tue May 15, 2018 2:41 am    Post subject: Reply with quote

binky123 wrote:

The CH340G chip does provide RTS but the ebay link shows it only brings out DTR or CTS pin. You could solder a wire to the RTS pin on the cihp if needed.

Ok. I soldered the wire on 14 (RTS) pin of chip. But I decided to check what voltage this pin gives out. And my multimeter showed that with the "GND" pin it gives out 5V. I did not dare to connect this pin to the "Reset" pin of the remote control. Sad
Back to top
View user's profile Send private message
binky123
Expert


Joined: 14 Feb 2004
Posts: 1292

                    
PostPosted: Tue May 15, 2018 8:32 am    Post subject: Reply with quote

The CH340G board is getting +5V from the USB connection. The datasheet for CH340G chip says it does support 3.3V or 5V. The chip inside the remote supports 3.3V or 5V also. My FT232RL also uses 5V from USB connection.
Back to top
View user's profile Send private message
blackride



Joined: 21 Mar 2018
Posts: 24

                    
PostPosted: Tue May 15, 2018 1:00 pm    Post subject: Reply with quote

binky123 wrote:
The CH340G board is getting +5V from the USB connection. The datasheet for CH340G chip says it does support 3.3V or 5V. The chip inside the remote supports 3.3V or 5V also. My FT232RL also uses 5V from USB connection.

No. Pins GND + 14 pin on chip (RTS) = 5V.
In adapter based on the M74HC266B1 Pins GND + Reset = 0V.

If I connect to a pin Reset of CH340G chip in the remote control as 5v, then I can damage the remote control.
Back to top
View user's profile Send private message
binky123
Expert


Joined: 14 Feb 2004
Posts: 1292

                    
PostPosted: Tue May 15, 2018 3:24 pm    Post subject: Reply with quote

The voltages on the pins swing from 5V(High signal) to 0V(Low signal). Even if RESET pin starts out at 0V, the rising voltage from 0V to 5V will cause the remote control to reset.
Back to top
View user's profile Send private message
binky123
Expert


Joined: 14 Feb 2004
Posts: 1292

                    
PostPosted: Tue May 22, 2018 9:07 am    Post subject: Reply with quote

I made a new version v0.22c at same place http://www.hifi-remote.com/forums/dload.php?action=file&file_id=25218. This version replaces the calls to SETRTS/CLRRTS with SETDTR/CLRDTR in jp2_14connect(). The timing of the signal matches the original waveform seen on the RTS pin.

The first versions kept SETRTS/CLRRTS/talk_with_remote and then if it failed, it tried SETDTR/CLRDTR/talk_with_remote. Now it is just doing SETDTR/CLRDTR/talk_with_remote. Since RTS is not connected, I don't think this change will make a difference though.
Back to top
View user's profile Send private message
blackride



Joined: 21 Mar 2018
Posts: 24

                    
PostPosted: Fri May 25, 2018 8:09 am    Post subject: Reply with quote

binky123 wrote:
I made a new version v0.22c at same place http://www.hifi-remote.com/forums/dload.php?action=file&file_id=25218. This version replaces the calls to SETRTS/CLRRTS with SETDTR/CLRDTR in jp2_14connect(). The timing of the signal matches the original waveform seen on the RTS pin.

The first versions kept SETRTS/CLRRTS/talk_with_remote and then if it failed, it tried SETDTR/CLRDTR/talk_with_remote. Now it is just doing SETDTR/CLRDTR/talk_with_remote. Since RTS is not connected, I don't think this change will make a difference though.

Hi binky123. I checked all the libraries that you changed, as well as the standard one in the program, with the RTS pin on chip (soldered wire was also connected, I even risked). Nothing comes out. The program does not see the urc-7140. After checking, I decided to reconnect to the 74HC266BM1 adapter and he also sees the remote control.
So, i can say that CH340G is not suitable for JP1. But I thank you for your efforts, thank you!
Back to top
View user's profile Send private message
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4515
Location: Cambridge, UK

                    
PostPosted: Wed Aug 04, 2021 9:22 am    Post subject: Reply with quote

I know this is a very old thread, but I have recently started looking at USB-to-Serial converters that use chips other than FTDI. Early in this thread, blackride gave a link to one that has a CH340G chip:

blackride wrote:
The Robman wrote:
blackride wrote:
I also have another console (URC-7140 Version JP1.4). I connect it via the CH340 converter.

What is a "CH340 converter" ?

https://www.ebay.com/itm/222436686027

CH340G Not Support?

This device outputs the DTR signal rather than the RTS that is used by our usual FTDI cables. The conclusion in this thread, following work by binky123 to create a modified version of jp12serial that uses DTR, was "that CH340G is not suitable for JP1".

I have now obtained one of these interface boards and have tried it with RMIR v2.13.0 with the interface selected as JP11USB. This is a new interface type designed for cables connected thus:

Pin 2 = DTR, Pin 3 = GND, Pin 4 = TXD, Pin 5 = RTS, Pin 6 = RXD.

I left pin 5 unconnected due to the absence of an RTS output. That line is required only for JP1.1 for which this new interface type was designed.

JP11USB also supports JP1.2 and JP1.3, with or without the RTS connection. I found that the CH340 converter DOES work with JP1.2 and JP1.3. Specifically, I used it to download a URC7781 (JP1.2) and URC7940 (JP1.3). I have now further modified the JP11USB interface type to support all other types of remote, and with this I have downloaded a URC7145 (JP1.4) and Atlas 1056 B03 (JP2) and also a URC8850 (JP1) with the CH340 converter and a JP1 EEPROM adapter, so I am confident it will do anything that an FTDI cable will do.

I have yet to post the modified version of jp12serial (which is used also for JP11USB) needed to make the CH340 converter support all that FTDI does, as I also want to investigate why cables with the Prolific chip fail with many remotes and I am waiting for my Prolific cable to arrive. However, I can post it now if there is any interest in it, as it is excellent value, currently $1.65 from the site blackride quoted above, including a loose-wire cable.
_________________
Graham
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Hardware All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control