Nascom Newsletter |
Volume 3 · Number 4 · December 1983 |
Page 11 of 37 |
---|
duration, and each raster-strike on the active area of the pen produces a pulse of 20us duration. As the picture frame is re-displayed every 20ms, the sub-pixel will produce a train of four 20us pulses every 20ms. It is only through the persistance of vision that the image appears to be constantly displayed.
It now becomes necessary to build a circuit that will output two pulses. One pulse will be of 20us duration, to indicate that the pen has been struck by a raster, the other pulse will go high when the pen has been struck, and remain high for period of time that is greater than 20ms and will also be kept high every time that the pen is struck. By doing this, a high state is output as long as the pen remains over the displayed area, even though the area is being refreshed every 20ms, and being displayed for only 80us.
Figure 5 is the circuit diagram for the pen interface. IC1 is an NE555 timer configured as an astable multivibrator, the frequency of which is adjusted by RV1. IC2 is a 7493 Binary counter and IC3 and 4 are 7400 NAND gates and 74LS126 TRI-STATE buffers.
Oy power-up, the 7493 O outputs are in a low state and so IC3(1), in conjunction with the inverted output of IC2 and the output from the clock generator, begins to clock the counter through 16 counts until Q3 goes high. At this point, one of the inputs to IC3(a) becomes low and so the clock pulses are inhibited and the 7493 ceases to count. The HIGH at Q3 is inverted by IC3(b) and buffered by the TRI-STATE buffer IC4(a), the output of which will be enabled only when SW1 is closed.
It can be seen that the output to the ports is now held at a LOW state. If the pon ts now activated a 20us pulse will be sent to both the OUTPUT1 and the RESET input of the counter. Q3 now goes LOW, and thus IC3(b) gies HIGH, enabling the clock input and allowing the count to begin again. The output has now gone HIGH indicating a hit. As long as the frequency from the clock generator is lower than 20ms x 16 ie about 800Hz, than IC2 can not count up to 16 before the receipt of another reset pulse. Therefore, if the pen is struck by the raster every 20ms, IC2 will be reset and Q3 will remain LOW and the output2 HIGH.
Even though the pen has moved from a white area to a black area, it will not register the change until 16 clock pulses have been receive, and RV1 can be used to slow down the clock and increase the time taken to register a change in state. This can be used to effectively slow down the speed of the pen. Similarly, the frequency can be increased to a point where the reset pulse has no effect. The two LEDs indicate the pen’s status. LED1 indicates whether the pen has registered a hit, and LED2 shows if the data has been enabled into the ports.
The prototype was built on a small piece of veroboard and housed in a small ?????? aluminium box, and seems to have tolerated an immense amount of knocking. The pen was constructed using a small length of plastic tube with a 5-pin plug and socket to allow it to be disconnected from the system. I found that it was easier to assemble the pen in three pieces than to try and poke everything down the tube. If the sensor is glued into a smaller tube, (I used a drilled, solid piece of plastic for this) and then that inserted into a larger tube, the pen can easily separated for modification. Similarly, the
Page 11 of 37 |
---|