levyshay
October 13th, 2002, 12:55 PM
Hi Jon,Luc and everyone...
I've replaced my IR detector with a shielded one which I took from an old creative infra cdrom. The detector had 47uf capacitor in parralel so I connected it also. Now my UIRT doesn't output any garbage at all.
My configuration:
UIRT2 (Kit A) from Luc, girder 3.24, 10Mhz PIC clock, programed with v1.7
PC: PIII-800. Also my kit is well built, And generaly I get it to work very well, ...
I took some time and do some testing, and I encountered the flollowing problems:
1. I use an original pin to pin serial cable, when connected a program that access the UIRT (Girder,Test App,Terminal) will crash/hang after recieving 20-50 codes from a remote. Adding in series with that cable a small adapter which connects only TxD, RxD and GND (both pin 5 and shield GND) solves this problem. So I guess the problem come from RTS/CTS/DTR, but I couldn't find which.
2. I use the UIRT to recieve a button from a remote (Volume Up/Down) and send it to my AVR. Generaly it works fine. Sometime the pic gets into a loop an starts trasmitting garbage for 5-10 seconds, during this time it's not accessible to the PC. Disconnecting the UIRT from RS232 doesn't stop it while it is in this loop, so I think the problem is inside the PIC software.
3. I have 2 remtoes which when using normal IR decoder (Like igor's one) produce diffrent codes, under UIR mode this remote produce exactly the same codes. I've tested them with the test app in all modes, on RAW/STRACTURED mode you can see that the codes they send are not the same, only the last bytes are the same (which I think describe the key on the remote which can be the same) but the first bytes (which I think are the remote ID) are not the same. UIR mode will produce the same code for those remotes.
4. Using a remote that trasmits it's code once, and then a diffrent code for repeat will produce only one event, as the key was pressed just once, and not helded. On remotes that send the same key it works fine.
I would like to ask if a small routine can be implemented into the pic which will solve this.
I wrote such routine for a dos driver I wrote long ago, what should be done is:
After decoding a code from a remote you start a timer (something around 200ms), if during that time something is sensed from IR decoder the same code allready decoded should be sent to the PC, so the pc see's the same button repeats. When the timer ends the next thing come from IR decoder will be considered as a new key. This is based on the fact that normal people can't press two different keys within 200ms time.
Alternatly a much simpler but less clear solution would be to trasmite the second code from IR decoder to the PC, So in this case the job of detecting a repeated code would relay on the plugin.
I've tryied configuring a serial plugin for girder which will recieve codes as stractured (Not UIR as normal) and this way I got one code for the 1st press, and a diffrent code indicates repeating.
5. If I leave the pic in RAW/STRACTURED mode and start girder it will not put the UIRT back to UIR mode. Entering learn mode (for trasmiting) in the plugin would put it back to UIR mode. So I think the plugin is missing an init that would put it in UIR mode at start (maybe it is done via RTS line, but mine is not connected to the pic..., so it should be done via a command also, atleast when fast UIR init is not checked)
Well this message becomes too long ... so thanks for reading.
Shay Levy.
I've replaced my IR detector with a shielded one which I took from an old creative infra cdrom. The detector had 47uf capacitor in parralel so I connected it also. Now my UIRT doesn't output any garbage at all.
My configuration:
UIRT2 (Kit A) from Luc, girder 3.24, 10Mhz PIC clock, programed with v1.7
PC: PIII-800. Also my kit is well built, And generaly I get it to work very well, ...
I took some time and do some testing, and I encountered the flollowing problems:
1. I use an original pin to pin serial cable, when connected a program that access the UIRT (Girder,Test App,Terminal) will crash/hang after recieving 20-50 codes from a remote. Adding in series with that cable a small adapter which connects only TxD, RxD and GND (both pin 5 and shield GND) solves this problem. So I guess the problem come from RTS/CTS/DTR, but I couldn't find which.
2. I use the UIRT to recieve a button from a remote (Volume Up/Down) and send it to my AVR. Generaly it works fine. Sometime the pic gets into a loop an starts trasmitting garbage for 5-10 seconds, during this time it's not accessible to the PC. Disconnecting the UIRT from RS232 doesn't stop it while it is in this loop, so I think the problem is inside the PIC software.
3. I have 2 remtoes which when using normal IR decoder (Like igor's one) produce diffrent codes, under UIR mode this remote produce exactly the same codes. I've tested them with the test app in all modes, on RAW/STRACTURED mode you can see that the codes they send are not the same, only the last bytes are the same (which I think describe the key on the remote which can be the same) but the first bytes (which I think are the remote ID) are not the same. UIR mode will produce the same code for those remotes.
4. Using a remote that trasmits it's code once, and then a diffrent code for repeat will produce only one event, as the key was pressed just once, and not helded. On remotes that send the same key it works fine.
I would like to ask if a small routine can be implemented into the pic which will solve this.
I wrote such routine for a dos driver I wrote long ago, what should be done is:
After decoding a code from a remote you start a timer (something around 200ms), if during that time something is sensed from IR decoder the same code allready decoded should be sent to the PC, so the pc see's the same button repeats. When the timer ends the next thing come from IR decoder will be considered as a new key. This is based on the fact that normal people can't press two different keys within 200ms time.
Alternatly a much simpler but less clear solution would be to trasmite the second code from IR decoder to the PC, So in this case the job of detecting a repeated code would relay on the plugin.
I've tryied configuring a serial plugin for girder which will recieve codes as stractured (Not UIR as normal) and this way I got one code for the 1st press, and a diffrent code indicates repeating.
5. If I leave the pic in RAW/STRACTURED mode and start girder it will not put the UIRT back to UIR mode. Entering learn mode (for trasmiting) in the plugin would put it back to UIR mode. So I think the plugin is missing an init that would put it in UIR mode at start (maybe it is done via RTS line, but mine is not connected to the pic..., so it should be done via a command also, atleast when fast UIR init is not checked)
Well this message becomes too long ... so thanks for reading.
Shay Levy.