|
||||||||||||||||||||||
Controlling the Cabinet/Monitor from the PC
The Circuits Like most of the circuits on this site - the following two are made from components I had 'at hand'. As such, neither contains a latch register or a timer. Instead a 4510 counter is used to act like a latch register and a 7404 hex inverter is used to act like a timer/delay. This isn't so bad - it cuts down on both the amount of soldering and the cost of the circuits. |
||||||||||||||||||||||
Making a Latch Register from a 4510 Counter
Many ICs can be made to act like a latch register, in the case of the 4510 counter we can use its weighted inputs and outputs and its 'parallel load' line to make it behave like a 4 line latch register. Basically, we attach one of the weighted inputs to a data line from the PC's printer port , the 'parallel load' to the strobe line and use the corresponding weighted output as our data 'latch' When the PC sends a byte through the printer port,the counter 'loads' whatever is on the 4 input lines and these appear at the 4 outputs - and remain there until another byte is sent from the PC. We're only interested in one 'bit' from the PC (data line 7) so we only need to wire in that input and the 'parallel load' line. All other inputs are made 'inactive' by connecting them to ground. (apart from 'Carry In' which ,on the 4510, uses inverted logic and must be connected to logic 1 (+5V) to be inactive) Making a Delay from a 7404 Hex Inverter The 4510 is handling our data input - we now need to take care of the 'Busy' and 'Acknowledge' signals sent back to the PC. This is fairly simple, when the PC sends a 1 down the 'Strobe' line, we need to send a 1 back to the PC down the 'Busy' line. Then ,after a short delay, we need to send 0 down the 'Busy' line and 1 down the 'Acknowledge' line. To achieve this we run the 'Strobe' line through a capacitor and a resistor (connected to ground) and then into one of the inputs on the hex inverter. The inverted output of this will become our 'Acknowledge' line, we'll then invert this output again to get our 'Busy' line. What happen is this:- The 'Strobe' line is normally held at logic 0 (Ground) and our 'Acknowledge' line (which is just the inverse of this) will be held at logic 1 (+5V). Our 'Busy' line is just the inverse of our 'Acknowledge' line, so this will normally be at logic 0. When the 'Strobe' line goes to logic 1 , our 'Acknowledge' line goes to 0 and our 'Busy' line goes to logic 1. However, the capacitor attached to the hex inverter begins to charge (at a rate governed by the resistor). As it charges, less and less current flows through it - until eventually the input to our hex inverter goes to logic 0 (even though the 'Strobe' line is still at logic 1). This causes our 'Busy' line to go to logic 0 and our 'Acknowledge' line to go to logic 1. So our interface receives the 'Strobe' input then sets the 'Busy' line to 1 and the 'Acknowledge' line to 0. Then, after a delay governed by the resistor and capacitor, sets the 'Busy' line to 0 and the 'Acknowledge' line to 1. Exactly duplicating the actions of a printer. The resistor and capacitor used in the circuit produce a delay larger than is needed for the circuit to operate - this is just so you can see that the circuit is actually working by looking at its LEDs. |