Let’s say that you didn’t choose to tackle one of the previous projects. That’s fine; I don’t blame you for wanting to start with something less complicated than, for instance, the appliance controller. There are other things that can be done with the 2068 that are just as interesting and helpful as the projects previously discussed. Before you start any of them, however, you must read all the material on electronic controls that has already been presented. You must do this in order to understand some of the things that are presented here. Many of the relevant component diagrams also are shown in previous sections. It is especially necessary that you understand and build both the 7475 output port and the 8212 input port (chapter 3) for the upcoming projects.
There are many things that you could try. After reading some of the control details, you probably can think of projects that are more exciting than the projects that are listed here. By all means, be as creative as you wish. With the 7475 output port and the 8212 input port, you can do almost anything. Take a shot at your wildest idea. It might be just the thing that we’ve been looking for since the invention of the transistor.
The projects presented in the rest of the chapter are mainly one-purpose designs, but it’s quite possible to combine some for several purposes. The electronics aren’t simple, though; they involve state-of-the-art components. Again, study the previous discussions of control before you build any of the circuits presented from here on.
The Timex/Sinclair 2068 is blessed with the ability to load and save data files separately, but not automatically. You must be there in person to push the tape recorder’s play and record buttons to turn the recorder off or on at the exact second that it has finished or needs to start its task.
You can use the output port to have the recorder turn itself on and off automatically to save and load data files. If you don’t want to wait around to cut the recorder off when the file of your choice has been found and loaded, simply insert a small program like the one at the end of this chapter, and go take a break. The recorder will shut itself off when the load (or save) is complete.
Turning things on and off is a specialty of the 2068. Most recorders can be hooked up to the 7475 output port to obtain this on-and-off switching capability. A 5-volt relay (figure 4.6) is a good device to use for this purpose since we will be switching the recorder motor on and off. The motor that drives the recorder’s spindles is not small, so a relay is used to switch the power. Figure 4.7 is a complete detail of the components and connections you’ll need in order to build the recorder’s control.


First, you need a recorder that has the small extra jack on the MIC connection that allows you to use the mike as a pause button. Most recorders have this. But, if yours doesn’t, then you might want to remove the recorder’s case and add a pause jack to the red lead of the motor wiring. It’s not too complicated to do this with most units.
The control diagram (figure 4.7) shows that the relay is driven by a 2N2222 transistor that is turned on and off by the data presented on pin 16 of the 7475 output port. If the data reads 1, the recorder’s motor is engaged; if the data reads 0, the recorder stops. Of course, you will need a small jack plug that fits the pause jack. This plug can be easily obtained from most local supply outlets such as Radio Shack. The Radio Shack number is listed in figure 4.7.
Notice that the common connection of the relay is resting on the NO (normally off) post (figure 4.7). The activation of the relay simply connects the COM (common) and NO points, and the recorder’s motor starts. Deactivation (giving the data word 0 to the port) stops the recorder. If you need to operate the recorder without giving a command to the port, just unplug the pause plug, and you are back to normal operation.
Wire the circuit as shown in figure 4.7. Since there are so few components and connections, this is a good circuit to breadboard for testing. You may notice that there is a small diode connected between the coil leads on the relay (figure 4.7). The diode is there to cancel any spikes that might develop when the coil is de-energized. You really should insert one to be on the safe side. I didn’t, and there were no problems, but, if the computer had been driving the relay directly, you can bet that there would have been. If you want to be safe and not take a chance on ruining your 2N2222 transistor or the 7475 IC, insert the diode as shown. The Radio Shack number for it is 276-1122. Once the complete circuit is working, you might want to wire it more permanently. As shown, the 7475 port is connected to device-select 192. You can change this to 193, 194, and so on by selecting various pins on the 74LS154 decoder (see figure 3.17 in chapter 3).
Once you have the controller wired, make sure the port is cleared by entering:
OUT 192,0
Then test the controller’s operation by inserting the pause plug into the pause jack, depressing the play button, and entering the following direct command:
OUT 192,1
The recorder should start immediately. To stop the recorder, enter:
OUT 192,0
Now you are ready for the big time—automatic data loading and saving, just as the Wangs can do! Enter and run the following program with the recorder connected. The response of the program will amaze you:
1 LET X=0
5 DIM A(50)
10 FOR N=1 TO 50
15 LET A(N)=X
20 LET X=X+1
30 NEXT N
40 OUT 192,1
45 PRINT "PRESS RECORD AND PLAY BUTTON"
50 SAVE "LIST" DATA A()
55 OUT 192,0
60 PRINT "IF YOU WISH TO RECALL DATA FILE, PRESS PLAY AND ENTER Y"
70 INPUT Z$: IF Z$="N" THEN GOTO 100
75 PRINT "PRESS REWIND": OUT 192,1
80 LOAD "LIST" DATA A()
85 OUT 192,0
90 FOR N=1 TO 50: PRINT A(N): NEXT N
100 STOP
Lines 1 through 20 of the program set up a numeric array and fill it with numbers from 1 through 49. This array could be file data that has been entered with an accounting program. Line 40 activates the recorder, and line 50 saves the data on tape. Line 55 stops the recorder.
To play the data back into memory from tape, press rewind and enter Y in response to the input command in line 70. The 2068 will prompt you to press the play button and will automatically load the data and display it on the screen. This program only shows the capability of the controller, but it could be effectively used as a routine in a much larger, multitask program (such as a data-base or spreadsheet program) that needs to store and load several different files. With a little ingenuity and a couple of electromagnetic solenoids hooked up to a couple of relays from the port, you could even automate the pressing of the record, play, and rewind buttons. I can’t tell you exactly how to experiment with that idea because recorder mechanisms vary considerably. But, generally, just connect a relay to the solenoid, connect the solenoid shaft to the appropriate lever(s) on the recorder, and you will have a completely automated unit. (Radio Shack’s part number for the solenoid is 273-251.)