The early JP1 remote controls (universal device IR remote controls for your audio-visual equipment - TVs, DVDs, Tivos, Cable boxes, etc.) were programmable through the parallel port on PCs. These days, parallel ports -as well as the original JP1 remotes- are becoming increasingly rare (both being replaced by the USB kind). Since at the moment I have a few more JP1 remotes (a handful) than parallel ports in operation (zero), I had to find a way to program updates for my audio-visual equipment lineup.
The Arduino can be accessed via USB and can also easily talk to the EEPROM that contains the program for the JP1 remote. The software for JP1/JP1.X programming does communicate via USB to a JP1 EEPROM programmer firmware in order to program the original JP1 remotes. It appears that the Arduino can easily be enlisted to cover the combo of USB serial driver and JP1 EEPROM programmer. Since Kevin Timmerman's open-sourced his JP1 EEPROM Programmer software (thanks, Kevin!), here we are!
Below are instructions and the Arduino sketch on how you can share the fun.
/***********************************************************************
Arduino sketch for programming of the original JP1 remotes
14 Mar 2012 by Tim6502
This is for the original JP1 remote control interface ONLY.
Not intended for JP1.1, 1.2, 1.3, etc. remotes!See JP1 - Just How Easy Is It? for background on
remote controls that are programmable via JP1.(1) Make yourself a JP1 cable - for example by cutting up an IDE cable.
View from the front of the female plug on the cable:
+----------+ JP1 Wire pinout on remote:
/ 1 3 5 | 1 - Vdd U1 2 - Vdd U2
| 2 4 6 | 3 - Ground 4 - Serial Data (SDA)
+-----------+ 5 - Reset 6 - Serial Clock (SCL)(2) Connect the wires from this cable as follows:
- connect 1 and 2 together
- connect 3 to Arduino Ground
- connect 4 (SDA) to Arduino Analog Pin 4
- connect 5 (Reset) to Arduino Ground
NOTE: you will need to unplug the remote from the cable to use it.- connect 6 (SCL) to Arduino Analog Pin 5
If the battery voltage in your remote is higher than the voltage
in the Arduino, you also need to pull up the following JP1 lines
via a 10k Ohm resistor each, connected to the JP1 Vdd line 1 (or 2):
4 (SDA) and 6 (SCL).(3) Attach the Arduino to your PC and upload this sketch.
When you run the RemoteMasterIR or IR programs, select
JP1.X Serial... interface.
Yes, even though this is for a non JP1.X remote!
Now you should be able to download and/or upload the EEPROM
content from or to your remote.Note that after an upload, the Arduino will be restarted by the
RM / IR program. If you want to avoid this, you would need to
pull RESET high with an adequate resistor value, or -if using
an external USB-Serial TTL converter device, make connections
except for the line that will pull on RESET.This sketch is directly based on assembler code from:
JP1 EEPROM Programming Adapter Firmware
Copyright (C) 2010 Kevin Timmerman
jp1epa [@t] compendiumarcana [d0t] com
JP1 EEPROM Programming AdapterFor EEPROM communication this sketch uses example code by
davekw7x, March, 2011, which in turn was
derived from sketch for 24C64 devices posted on
http://www.arduino.cc/playground/Code/I2CEEPROM
from hkhijhe Date: 01/10/2010.While this worked for me with a *duino Duemillanova clone and with a
URC 6131 remote using 2k 24C32 EEPROM chips (the default size this
sketch selects for EEPROMs), it has not been tested with other EEPROM
chips or other sizes.
More importantly, you should be aware that you are using these
instructions and code at your own risk. There are no guarantees
that this will work, or that it will not damage or blow up your
equipment (or yourself). You have been warned!
- Good luck!
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.#include <Wire.h>
// The seven-bit device address for EEPROMs
const byte DEVADDR = 0x50;const char hex[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
byte ee_size;
byte ee_fill;
byte jp1_cmd;
byte jp1_len;
byte jp1_chk;
byte addrl;
byte addrh;byte countl;
byte data_buf[40];
boolean fTwoByteAddress;
boolean fFillTestPattern;
boolean fShowAckWait;void setup() {
Serial.begin(38400);
Wire.begin();fTwoByteAddress = false;
fFillTestPattern = false;
fShowAckWait = false;C16();
}void loop() {
jp1_cmd = (byte) SerRx();
jp1_chk = jp1_cmd;
fShowAckWait = false;cmd_lookup();
}