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

Using Arduino as a JP1 EEPROM adapter

 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Hardware
View previous topic :: View next topic  
Author Message
mathdon
Expert


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

                    
PostPosted: Thu Aug 19, 2021 9:07 am    Post subject: Using Arduino as a JP1 EEPROM adapter Reply with quote

The JP1 EEPROM adapter needed to use RMIR with legacy JP1 remotes seems currently to be unavailable. Its only known supplier is DIYGadget, which has resisted all my recent attempts to contact it. TXSat advertises a JP1 cable that incorporates an FTDI chip along with such an adapter but that too has not replied to attempts to contact it. See the Market Place forum for links to these companies. Although I do have an adapter, for the benefit of other users I therefore decided to try the JP1 EEPROM Adapter using an Arduino dating from 2012 that is discussed in this thread and to report my results.

Two weeks ago I hardly knew what an Arduino was, so I bought an Arduino starter kit both to gain some general experience with it and in particular to try this adapter program. The board in the kit is an Arduino Mega 2560 clone, which is different from the Arduino Duemillanove clone on which the program was developed, so I expected a few problems.

It turned out that there really was only one problem. The program gave errors when I attempted to load it into my Arduino. The documentation with the program says that "the Arduino can easily be enlisted to cover the combo of USB serial driver and JP1 EEPROM programmer". These Arduino boards have several serial ports (four, in my case), one of which is connected to a built-in USB-to-Serial converter that is used to upload programs to the board. The program as written uses this one for data input, so that RMIR connects to the USB port on the board without the need for a separate USB-to-Serial converter. The loading errors indicated to me that this was not possible with my board. So I edited the program to use a different one of the board's serial ports, by simply changing "Serial" to "Serial1" in the few places it occurs, and then connecting a USB-to-Serial cable (in my case a Chip Partner one) to the Serial1 port of the board.

That was all that was needed. I did add a 10k pull up resistor to the SCL line, as Jeffs555 suggested, though haven't tried without it to see if it was necessary. Jeffs555 also says "the current [jp12serial] code sends out a 4 byte command that is not handled in the Arduino code" and he needed to patch the Arduino code to ignore this. As of v0.28 of jp12serial included in RMIR v2.13.0, a JP1 EEPROM Adapter is recognised before that command is issued, so it is never sent when an adapter is connected and that patching is not needed.

I did not experience the timing problems that Jeffs555 found. I have downloaded my URC8550, which has a 2k EEPROM, modified the setup, uploaded the change and downloaded again to check that the change took place, all without any problem. However, I see no harm in changing the timeout multipliers from 10ms to 20ms. As these are simply timeout settings, they should not affect the speed of operation of RMIR so I will make this change for the next release of RMIR, which I expect to make shortly. He also remarks that the Arduino code does not support EEPROM sizes larger than 2kbytes. I see no reason why that should be so, as the code certainly includes a setting for 4kbytes, but I have no way of testing whether that works.
_________________
Graham
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21210
Location: Chicago, IL

                    
PostPosted: Thu Aug 19, 2021 10:17 pm    Post subject: Reply with quote

More super cool work Graham. Isn't it also possible to use an Arduino board to connect to JP1.x remotes?

Can you post some links to the items that folks who want to try this would need to buy?
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Sun Aug 22, 2021 11:54 am    Post subject: Reply with quote

Graham, nice to see you as Arduinaut. Cool There are a lot of cool Arduino-projects reported in this forum.

mathdon wrote:
I did add a 10k pull up resistor to the SCL line

Are you aware that using INPUT_PULLUP as second argument to PinMode will turn on a pull-up within the chip?

The Robman wrote:

Isn't it also possible to use an Arduino board to connect to JP1.x remotes?

I assume that it would be relatively ease; but of course 5Volt Arduinos cannot be (directly) connected to 3.3Volt remote, and vice versa. But more importantly: who will use this? There is already a simple solution with an FTDI cable. The ones who cannot use that solution are most likely not able to get an Arduino, install the Adruino IDE, compile and flash the program, make an Arduino-JP1 connector... Or do you see it differently?
The Robman wrote:

some links to the items that folks who want to try this would need to buy?


The Mega is described here. It can be bought from "any" DIY electonics store, unfortunately only for a somewhat hefty price (after all, it is an 8bit processor @16MHz and a few kB memory). Much more attractive prices are found on "Chinese" "clones", see EBay and Aliexpress. BUT, it may take a month or longer for delivery!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21210
Location: Chicago, IL

                    
PostPosted: Sun Aug 22, 2021 12:42 pm    Post subject: Reply with quote

Barf wrote:
The Robman wrote:
Isn't it also possible to use an Arduino board to connect to JP1.x remotes?

I assume that it would be relatively ease; but of course 5Volt Arduinos cannot be (directly) connected to 3.3Volt remote, and vice versa. But more importantly: who will use this? There is already a simple solution with an FTDI cable. The ones who cannot use that solution are most likely not able to get an Arduino, install the Adruino IDE, compile and flash the program, make an Arduino-JP1 connector... Or do you see it differently?

I was just wondering if it would be possible to make an Arduino board that could be used to program *BOTH* JP1 and JP1.x remotes? I am assuming that this is very unlikely, but you never know if you don't ask, right?
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
mathdon
Expert


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

                    
PostPosted: Sun Aug 22, 2021 1:24 pm    Post subject: Reply with quote

Barf wrote:
Are you aware that using INPUT_PULLUP as second argument to PinMode will turn on a pull-up within the chip?

I was aware of this, but somehow didn't think of it at the time. Thanks for reminding me.

The Robman wrote:
I was just wondering if it would be possible to make an Arduino board that could be used to program *BOTH* JP1 and JP1.x remotes?

You may have missed that I was using the Arduino as a JP1 EEPROM Adapter and needed to use a JP1.x cable with it, just as with any EEPROM adapter. The cable on its own is all that is needed for JP1.x remotes.

I agree with Bengt that there is no point in a parts list, the Arduino is all that is needed - as Bengt pointed out to me, even the 10K resistor I used isn't actually needed. But FYI, as I was totally new to the Arduino, what I actually bought was this Elegoo Mega Complete Starter Kit (for children aged 10 upwards Smile ), which includes a Chinese clone of the Arduino Mega and was delivered the next day from a UK supplier. For what it contains, I considered it excellent value for money as it is effectively a general electronics starter kit with an Arduino thrown in too. I feel I need such a kit, as although I played with electronics as a child, that was in the days of vacuum tubes (what we call "valves" in the UK), before transistors had been invented Rolling Eyes .
_________________
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
Page 1 of 1

 
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