have you looked at the diode protected serial xfer method? put a serial plug on your device a handfull of diodes and resistors etc might be ok because you are only recieving data -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Kirk Lau Sent: Wednesday, March 31, 2004 11:52 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [EE:] Phototransistor as Serial Input? That's a pretty cool idea.... but..... As some folks pointed out, you might have to run in rather low baud.. probably somewhere in 10 to 20 baud biggest problem u are facing is the refresh rate of the monitor... especially on a Win32 or any GUI platform some ppl runs at 56 hz, to something godly like 90Hz... and since phototransistor is quite fast (compare to 56Hz...) it will definately picks it up... so the signal from the output of the phototransistor collector will be "modulated" at a frequency of the refresh rate... but at the same time.. if u runs under DOS or any text base environment, the rate has yet to determine... and i can see there is a chance that it might be rather CPU dependent on some extreme cases.. even tho u can put delay loop in it.. to get around with the refresh rate... probably a low pass filter (RC network?) might do the trick.. or may be a monostable oscillator (a simple 555?), or an integrator circuit(any opamp?), with a time constant around 30ms... Or if u want to implement a software routine delay... that should be possible too.. also, a CDS MIGHT be a better choice rather than a phototransistor, due to it's responses in terms of time as well as wavelength. but that has to prove by experiment (I might actually give that a try later tonight and see...) another thing is you might consider putting a diffusive plate in front, to scatter the light, as well as "average" out the intensity of the area it looks at, cuz as the beam scanning down the monitor, the phototransistor should picks up the scan...i am not sure if that's needed.. but is also a possibility to look at. that's all so far.. i might do some test these few days to see how that goes and post more... BTW.. i am new to the list(just joined yesterday), nice to meet u all Kirk > I'm designing a little PIC-based gadget that will have 8-10 variable paramaters that I'll store on-board the PIC. > I'd like people to be able to configure this gadget by means of a PC program. The program will have the nice interface and do the > necessary calculations, but ultimately the 8-10 8-bit variables that will result need to be delivered to the PIC. I want to keep > cost and weight down, so my idea is to use a phototransistor on the PC board to watch a "flashing box" on the monitor that sends > serial data from the PC program. The user would hold the board up to the monitor, hit a key, and the data would be transferred. > > Has anyone done anything like this before? I think it would be relatively straight forward, but I'm not sure how to filter and > massage the input from the phototransistor. Any help would be appreciated. > > Thanks, > > Jeff > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body