Arduino interface - resolved problems with RMIR
Posted: Sat May 19, 2018 5:27 pm
I haven't used JP1 since the old parallel port days but recently needed to add a new device to an old URC-8810. No more parallel ports, but did have some Arduinos and found the code in the files section to turn them into an interface for the old eeprom based controls. Had a lot of problems, but finally got it to work. Thought I would describe the problems in case anyone else tried this interface.
First problem was that I needed to add a 10k pull up to the SCL line. Most of the eeprom based remotes have a pull up on the SDA line, but not on the SCL line.
Next problem was that the current code sends out a 4 byte command for the JP2_4 that is not handled in the Arduino code. The first 3 bytes are invalid commands for the eeprom adapter, but the last byte is an "S" which is a write eeprom command. Patched the arduino code to ignore this 4 byte command.
After these fixes it found the control and identified it correctly as an 881x, however, it still didn't work. It showed the eeprom as all zeros. I am using win7 and was able to download and build jp12serial.dll and trace through and find the problem. The cause was that it was timing out on long eeprom reads (and also writes). JP12serial.dll was setting ReadTotalTimeoutMultiplier and WriteTotalTimeoutMultiplier to 10ms. Changing them to 20ms fixed the problem and I was able to successfully program the control with the new device.
Don't know if the arduino is just too slow on the I2C eeprom accesses or what. The default arduino I2C clock is supposedly 100kHz and could probably try changing it to 400kHz but don't know if eeproms in all controls would handle that. Changing the timeouts in JP12serial.dll worked fine for me and I am happy. The new Remote Master is a lot easier than the old spreadsheet stuff from when I used JP1 long ago.
First problem was that I needed to add a 10k pull up to the SCL line. Most of the eeprom based remotes have a pull up on the SDA line, but not on the SCL line.
Next problem was that the current code sends out a 4 byte command for the JP2_4 that is not handled in the Arduino code. The first 3 bytes are invalid commands for the eeprom adapter, but the last byte is an "S" which is a write eeprom command. Patched the arduino code to ignore this 4 byte command.
After these fixes it found the control and identified it correctly as an 881x, however, it still didn't work. It showed the eeprom as all zeros. I am using win7 and was able to download and build jp12serial.dll and trace through and find the problem. The cause was that it was timing out on long eeprom reads (and also writes). JP12serial.dll was setting ReadTotalTimeoutMultiplier and WriteTotalTimeoutMultiplier to 10ms. Changing them to 20ms fixed the problem and I was able to successfully program the control with the new device.
Don't know if the arduino is just too slow on the I2C eeprom accesses or what. The default arduino I2C clock is supposedly 100kHz and could probably try changing it to 400kHz but don't know if eeproms in all controls would handle that. Changing the timeouts in JP12serial.dll worked fine for me and I am happy. The new Remote Master is a lot easier than the old spreadsheet stuff from when I used JP1 long ago.