Light pen
ZXNet echo conference «hardware.zx»
From Sergey Svetlov → To Kirill Frolov 26 February 2001
How is it okay, Kirill?
One day *25 Feb 01 10:17:02* I saw Kirill Frolov writing to Sergey
Svetlov and here...
SS>> layout (with your “tips”)... And simpler, this is: Change
SS>> frames 50 times per second, in one frame the beam passes across the screen 15625
SS>> pulses per second. This is what you need to catch with a photocell!
KF>> This is in the Y coordinate. What about X?
KF>
SS> Yes, what does the Y coordinate have to do with it? At a certain quantity
SS> pulses across the screen, location is determined
SS> photocell!
KF>
KF> Here is the algorithm for determining the X and Y coordinates, draw here with diamonds
^^^ - ?
KF> block diagrams or whatever you want. Or don't write nonsense.
KF>
SS> And for speck (screen usage ~70%), count pulses and
SS> even less. Look carefully above!
KF>
KF> And how many of them should be counted? Let's assume that KF> there are at least 100,000 dots on the screen. So that they fit into the frame
KF> information must be transmitted at a speed of 100000*(frames per
KF> second)=5 million points per second. Actually more.
Our TV the standard is 625 lines. From smart books I deduced that in 1 second.
2 full frames are obtained, that is, 25Hz per frame. (easy to check,
dividing the line frequency per frame and multiplying by 2)
Now a little theory:
The beam scans the screen from left to right and top to bottom in 1 frame (approximately!).
A table of impulses is being compiled (it may not be called that way - I’m not a programmer
), upon reaching a certain impulse, the photocell determines
coordinates from the table. Considering that the definition frequency is in the audio range
area (!), I can assume that this is not so expensive for the processor.
KF> The position of the pen is defined as the time from the beginning of the frame to the flash of the beam
KF> under the pen. Only one ray _sequentially passes through all points
KF> times - that means to get accuracy to one point you need to be able to
KF> count time and monitor the state of the photodiode
KF> faster than the beam passes one point on the screen. It turns out 200 KF> nanoseconds (actually even less) per point! Spectrum is resting here
^^^ - Where did such data come from - justify it.
KF> however, like any Pentium-III. It must be done or with iron logic
^^^ - you line frequency, at 85 Hz (at least 800x600),
do you know him?
KF> or on a specialized microprocessor.
KF>
SS> PS: well, I don’t know how to explain anymore...
KF>
KF> Because you don’t know how it works.
Read smart books...
* With the best... Sergey. *
From Dmitry Lomov → To Sergey Svetlov 27 February 2001
Hello, Sergey!
Once, Tue Feb 27 2001 12:17, Sergey Svetlov wrote to Dmitry Lomov:
KF>>> And how many of them should be counted? Let's proceed from the fact that
KF>>> that there are at least 100,000 dots on the screen. So that they
KF>>> fit into the frame, information must be transmitted at speed
KF>>> 100000*(frames per second)=5 million dots per second. Actually
KF>>> more.
DL>>
SS>> Our TV. the standard is 625 lines. From smart books I deduced that for
SS>> 1 sec. 2 full frames are obtained, that is, 25Hz per frame.
DL>>
DL>> what?
SS> Maybe you can explain how the TV works...
no, I won't be here. When I teach children in a circle, the process is superficial
familiarization with the raster and the principles of its formation on digital chips
takes about 4 hours, during which I wave my arms wildly and write
a bunch of boards, along the way asking a lot of leading questions, so that they themselves
everyone guessed ;)
in one second 25 full frames are obtained. In Spectrum, lowercase alignment
no pulses are used, so the frame rate is about 50 hertz.
SS>> upon reaching a certain impulse, SS>> photocell, the coordinates are determined from the table.
SS>> Considering that the definition frequency is in the audio region
SS>> (!),
DL>>
DL>> detection frequency - 50 hertz, detection accuracy - +-140 ns ;)
DL>> "spectrum" definition - about 7 MHz.
SS> Yes, I'm not talking about the full video signal! This is not about
SS> catching pixels, and the method determining the coordinates (of something)
SS> on the features of the TV.
How do you differentiate between the sensor being in the center of the screen and being alone?
a centimeter to the right? by its sound frequency? no, just a sensor impulse
will be ~1 µs later. what is the sound frequency here? ;)
SS>> I can assume that this is not so expensive for the processor.
DL>>
DL>> for a processor this is unrealistic.
SS> Does it have difficulty processing audio frequencies?
see above.
DL>> does this postulate also need to be substantiated?
SS> Yes, desirable.
there is nothing to erase quotation. I don’t remember what needs to be justified ;)
All the best.
Dmitry.