Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!lll-winken!ncis.tis.llnl.gov!helios.ee.lbl.gov!ucsd!sdcc6!sdcc13!pa1409 From: pa1409@sdcc13.ucsd.edu (Steven Haehnichen) Newsgroups: comp.sys.handhelds Subject: Easy HP infra-red PC receiver. Message-ID: <5916@sdcc6.ucsd.edu> Date: 5 Jan 90 02:22:44 GMT Sender: news@sdcc6.ucsd.edu Organization: University of California, San Diego Lines: 59 It has taken me a while to overcome some serious moral compunctions in recommending anything sold by Radio Shack/Tandy, but... I recently ran across a gadget at Radio Shack that seemed too easy to be true, and still might be. It's their "GP1U52X Infrared Receiver/Demodulator" (Catalog # 276-137). It sounded interesting so I bought one for about $3.50 and checked it out. I was slightly comforted by the name "Sharp" stamped into the tiny (1/2 inch) tin box. Anyway, it has a whopping three pins to it, and some relatively useless "technical data" with it. Ok.. The three pins are GND, Vcc, and Vout... simple, eh? I connected the Vout to the Error line of my PC's parallel port and put an LED on it just for looks. I stole the +/- 5 VDC from the key-board port and that was it. Now my error line goes high whenever the Receiver picks up a pulse of infra-red. All of the support circuitry is right on the little board. It has an IR phototransistor, amp, limiter, band-pass filter, demodulator, integrator, and comparator built in. BUT... Does it pick up HP-IR? Yup. Along with every IR remote control I own. The hardest part seems to be the software. I'm not real big on 8088 assembly, but it looks like it might be the only way to make sense of the signals. (I would assume they're pretty fast, but it seems to send a lot of data (several seconds) just for a screen dump.) If you set it up so that the input is fed into the Error line of the parallel port (like mine), the fourth bit of port 0x379 will be 0 on an IR pulse. (first bit being the LSB) so something like this works to read it: (Turbo C) IR = !(inportb(0x379) & 8) Where IR is true on a IR pulse. Anyway... to make a long story longer.. I hope someone can take it a little further than this, ideally reading in HP text (graphics?!?!) I used the Error line because it lets me leave my printer on and on-line without confusing the system, and if I mistakingly leave the IR receiver engaged and try to print, I get a friendy printer error. Oh, one other thing... It tends to pick up a few stray signals (especially in bright light) but they are very few compared to the HP data pulses. I haven't seen it pick up any interference at all in dim light. (One of those dark-red plastic sheilds might be nice.) There you have it. If anyone makes anything out of the signals, PLEASE send me some code. Good luck! Steve ---------------- shaehnichen@ucsd.edu shaehnic@ucsd.bitnet, and wherever else UCSD can get mail from. >>> The sooner I fall behind, the more time I have to catch up!! <<<