Behavior Discrepancy In Tyler's JP1.2/3 Interface Designs
Posted: Wed Jun 24, 2009 2:31 pm
Is anyone out there using the 3-transistor JP1.2/JP1.3 hardware interface design (either self-built or purchased) with a JP1.2 remote control (especially with the URC-8820, URC-10820, or similar model)?
I've now built and successfully tested both of the designs shown in Tommy Tyler's excellent 'Building a Serial Interface for JP1.2 and JP1.3.pdf' document. For those not familiar with the document, it shows 2 schematics, one using 3 common NPN transistors (e.g. 2N3904) and the other using a less-common quad-XNOR 14-pin DIP integrated circuit (part number 74HC266).
Tests were done using the 'jp12test.exe' utility (with version 0.13 of the 'jp12serial.dll' library) under Win98se with the interfaces connected directly to the PC's RS-232 port (i.e. no USB/RS-232 adapter was used).
Tests were also done with a test utility that I've written (but not yet publicly released) which provides some more user feedback on the process of putting a remote control into "serial communication" mode.
Both of the interface designs work flawlessly with my Radio Shack 15-135 (JP1.3) remote control, with both of the aforementioned test utilities.
The discrepancy I'm seeing between the operation of the 2 hardware interface designs comes into play when I attach my URC-8820 (JP1.2) remote control....
With the quad-XNOR interface, the URC-8820 generally works fine, going into serial communication mode without problems, with both of the aforementioned test utilities.
With the 3-transistor interface, the URC-8820 seems to somehow accumulate lots of "garbage" data internally in the read queue, which must be flushed, lest that garbage "prefix" data prevent the ASCII 'ACK' (0x06, 'acknowledge') byte from being detected when processing the remote control's reply to the 'ping' command to test if the remote has successfully entered the "serial communication" mode. This "garbage" data is usually nothing but a series of bytes that are mostly zero (0x00).
In layman's terms, this means that the 'jp12test' utility fails to detect the JP1.2 remote, reporting the standard "**** No JP1.2 compatible remote found! ****" error. My own utility also initially fails to detect the remote quite often. It shows that there is often a large amount (more than 200 bytes, sometimes as much as 2500+ bytes) of garbage data in the read queue that has to be flushed before the remote can be successfully 'pinged'.
Since my utility (currently) attempts to flush only 1000 bytes before doing the 'ping' test, it sometimes succeeds with the URC-8820 remote on the first try (i.e. if there are 1000 or fewer bytes of garbage data from the remote) and when it fails, it can be made to work by repeatedly attempting to put the remote into "serial comm" mode, since each attempt flushes another 1000 bytes.
The 'jp12serial.dll' code, in contrast, only flushes 20 bytes in the same situation. With the URC-8820 and the 3-transistor interface, it therefore seems to always fail.
Now, to be clear, the remote does appear to be entering serial communication mode, but the utilities think it hasn't because of all the leading garbage preceding the ASCII 'ACK' byte.
I'm not 100% certain at this point, but it seems like it's such that the more often the remote control is commanded to "normal operating mode" (as is done at the end of both of the test utilities mentioned and can be done independently [and therefore repeatedly, for testing] with my test utility), the more garbage there is to be found in the JP1.2 remote's queue.
I don't understand the discrepancy in behavior between these two JP1.x hardware interfaces. Furthermore, I'd expect that some other folks who've built the 3-transistor interface and are using it with a JP1.2 remote control would've also encountered problems with any application ('IR.exe' or 'RMIR') using that 0.13 version of 'jp12serial.dll'. It could be that this problem is specific to the URC-8820 (and its close brethren, like the URC-10820, which I also own and which succeeds/fails just like the URC-8820), but that wouldn't be my assumption just yet.
Of course, I won't rule out some sort of error in my hardware assemblies, but since the RS 15-135 JP1.3 remote works flawlessly on both interfaces and the JP1.2 remotes work flawlessly on the quad-XNOR interface, it isn't my first assumption at this point.
Does anyone have any insight on this? Thanks in advance for any guidance, suggestions, or comments....
Regards,
Bill
I've now built and successfully tested both of the designs shown in Tommy Tyler's excellent 'Building a Serial Interface for JP1.2 and JP1.3.pdf' document. For those not familiar with the document, it shows 2 schematics, one using 3 common NPN transistors (e.g. 2N3904) and the other using a less-common quad-XNOR 14-pin DIP integrated circuit (part number 74HC266).
Tests were done using the 'jp12test.exe' utility (with version 0.13 of the 'jp12serial.dll' library) under Win98se with the interfaces connected directly to the PC's RS-232 port (i.e. no USB/RS-232 adapter was used).
Tests were also done with a test utility that I've written (but not yet publicly released) which provides some more user feedback on the process of putting a remote control into "serial communication" mode.
Both of the interface designs work flawlessly with my Radio Shack 15-135 (JP1.3) remote control, with both of the aforementioned test utilities.
The discrepancy I'm seeing between the operation of the 2 hardware interface designs comes into play when I attach my URC-8820 (JP1.2) remote control....
With the quad-XNOR interface, the URC-8820 generally works fine, going into serial communication mode without problems, with both of the aforementioned test utilities.
With the 3-transistor interface, the URC-8820 seems to somehow accumulate lots of "garbage" data internally in the read queue, which must be flushed, lest that garbage "prefix" data prevent the ASCII 'ACK' (0x06, 'acknowledge') byte from being detected when processing the remote control's reply to the 'ping' command to test if the remote has successfully entered the "serial communication" mode. This "garbage" data is usually nothing but a series of bytes that are mostly zero (0x00).
In layman's terms, this means that the 'jp12test' utility fails to detect the JP1.2 remote, reporting the standard "**** No JP1.2 compatible remote found! ****" error. My own utility also initially fails to detect the remote quite often. It shows that there is often a large amount (more than 200 bytes, sometimes as much as 2500+ bytes) of garbage data in the read queue that has to be flushed before the remote can be successfully 'pinged'.
Since my utility (currently) attempts to flush only 1000 bytes before doing the 'ping' test, it sometimes succeeds with the URC-8820 remote on the first try (i.e. if there are 1000 or fewer bytes of garbage data from the remote) and when it fails, it can be made to work by repeatedly attempting to put the remote into "serial comm" mode, since each attempt flushes another 1000 bytes.
The 'jp12serial.dll' code, in contrast, only flushes 20 bytes in the same situation. With the URC-8820 and the 3-transistor interface, it therefore seems to always fail.
Now, to be clear, the remote does appear to be entering serial communication mode, but the utilities think it hasn't because of all the leading garbage preceding the ASCII 'ACK' byte.
I'm not 100% certain at this point, but it seems like it's such that the more often the remote control is commanded to "normal operating mode" (as is done at the end of both of the test utilities mentioned and can be done independently [and therefore repeatedly, for testing] with my test utility), the more garbage there is to be found in the JP1.2 remote's queue.
I don't understand the discrepancy in behavior between these two JP1.x hardware interfaces. Furthermore, I'd expect that some other folks who've built the 3-transistor interface and are using it with a JP1.2 remote control would've also encountered problems with any application ('IR.exe' or 'RMIR') using that 0.13 version of 'jp12serial.dll'. It could be that this problem is specific to the URC-8820 (and its close brethren, like the URC-10820, which I also own and which succeeds/fails just like the URC-8820), but that wouldn't be my assumption just yet.
Of course, I won't rule out some sort of error in my hardware assemblies, but since the RS 15-135 JP1.3 remote works flawlessly on both interfaces and the JP1.2 remotes work flawlessly on the quad-XNOR interface, it isn't my first assumption at this point.
Does anyone have any insight on this? Thanks in advance for any guidance, suggestions, or comments....
Regards,
Bill