Silicon ChipPrinter Status Indicator For PCs - January 1994 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Some Australian companies still do not give good service
  4. Book Store
  5. Feature: The World Solar Challenge by Brian Woodward
  6. Feature: Electronic Engine Management; Pt.4 by Julian Edgar
  7. Project: 40V 3A Variable Power Supply; Pt.1 by John Clarke
  8. Order Form
  9. Feature: Luxman A-371 Amplifier & D-351 CD Player by Leo Simpson
  10. Feature: Active Filter Design For Beginners by Elmo Jansz
  11. Project: A Switching Regulator For Solar Panels by Otto Priboj
  12. Project: Printer Status Indicator For PCs by Darren Yates
  13. Project: Simple Low-Voltage Speed Controller by Darren Yates
  14. Vintage Radio: Realism realised - the Precedent console receiver by John Hill
  15. Serviceman's Log: It was all a long time ago by The TV Serviceman
  16. Feature: Computer Bits by Darren Yates
  17. Back Issues
  18. Feature: Remote Control by Bob Young
  19. Project: Control Stepper Motors With Your PC by Marque Crozman
  20. Review: Kenwood's DCS-9120 Oscilloscope by John Clarke
  21. Product Showcase
  22. Notes & Errata: Solar-Powered Electric Fence, April 1993; UHF Remote Switch, December 1989 & August 1990
  23. Market Centre
  24. Advertising Index
  25. Outer Back Cover

This is only a preview of the January 1994 issue of Silicon Chip.

You can view 29 of the 96 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • Darwin To Adelaide On Solar Power (October 1993)
  • The World Solar Challenge (November 1993)
  • The World Solar Challenge (January 1994)
Articles in this series:
  • Electronic Engine Management; Pt.1 (October 1993)
  • Electronic Engine Management; Pt.2 (November 1993)
  • Electronic Engine Management; Pt.3 (December 1993)
  • Electronic Engine Management; Pt.4 (January 1994)
  • Electronic Engine Management; Pt.5 (February 1994)
  • Electronic Engine Management; Pt.6 (March 1994)
  • Electronic Engine Management; Pt.7 (April 1994)
  • Electronic Engine Management; Pt.8 (May 1994)
  • Electronic Engine Management; Pt.9 (June 1994)
  • Electronic Engine Management; Pt.10 (July 1994)
  • Electronic Engine Management; Pt.11 (August 1994)
  • Electronic Engine Management; Pt.12 (September 1994)
  • Electronic Engine Management; Pt.13 (October 1994)
Items relevant to "40V 3A Variable Power Supply; Pt.1":
  • 40V 3A Variable Power Supply PCB pattern (PDF download) [04202941] (Free)
Articles in this series:
  • 40V 3A Variable Power Supply; Pt.1 (January 1994)
  • 40V 3A Variable Power Supply; Pt.2 (February 1994)
Items relevant to "A Switching Regulator For Solar Panels":
  • 72W Switching Regulator for Solar Panels PCB pattern (PDF download) (Free)
Items relevant to "Printer Status Indicator For PCs":
  • DOS software for the Printer Status Indicator (Free)
  • Printer Status Indicator PCB patterns (PDF download) [06101941/2, 07101941] (Free)
Items relevant to "Simple Low-Voltage Speed Controller":
  • Simple Low-Voltage Speed Controller PCB pattern (PDF download) [09111931] (Free)
Items relevant to "Computer Bits":
  • Games Card Breakout PCB [07103941] (PCB Pattern, Free)
  • DOS software for Computer Bits, November 1993 & January/February 1994 (Free)
Articles in this series:
  • Experiments For Your Games Card (January 1992)
  • Computer Bits (November 1993)
  • Computer Bits (January 1994)
  • Computer Bits (February 1994)
  • Computer Bits (April 1994)
Articles in this series:
  • Remote Control (October 1989)
  • Remote Control (November 1989)
  • Remote Control (December 1989)
  • Remote Control (January 1990)
  • Remote Control (February 1990)
  • Remote Control (March 1990)
  • Remote Control (April 1990)
  • Remote Control (May 1990)
  • Remote Control (June 1990)
  • Remote Control (August 1990)
  • Remote Control (September 1990)
  • Remote Control (October 1990)
  • Remote Control (November 1990)
  • Remote Control (December 1990)
  • Remote Control (April 1991)
  • Remote Control (July 1991)
  • Remote Control (August 1991)
  • Remote Control (October 1991)
  • Remote Control (April 1992)
  • Remote Control (April 1993)
  • Remote Control (November 1993)
  • Remote Control (December 1993)
  • Remote Control (January 1994)
  • Remote Control (June 1994)
  • Remote Control (January 1995)
  • Remote Control (April 1995)
  • Remote Control (May 1995)
  • Remote Control (July 1995)
  • Remote Control (November 1995)
  • Remote Control (December 1995)
Items relevant to "Control Stepper Motors With Your PC":
  • DOS software for Stepper Motor Control (Free)
  • Stepper Motor PC Interface PCB pattern (PDF download) [07201941] (Free)
A printer status indicator for PCs Have you ever been frustrated by files disappearing down your printer cable & not appearing at the other end? This Print­er Status Indicator uses an alphanumeric display to indicate any errors that occur during transmission. By DARREN YATES When it comes to printing, most programs leave you flat if something goes wrong while the file is being sent to the printer. And with many graphics print files exceeding 4Mb, it can be extremely annoying after sitting around for 10 minutes or so for the printer to compile the pages and then nothing happens! If you are using Windows, you will 44  Silicon Chip know that it does have a fairly good and reliable Print Manager to take care of these things. However, booting up Windows just to use the Print Manager is an exercise in time-wasting. If you’re running a small business with a number of PCs, the odds are that only one of the machines is connected to the printer. Those who need to print a file can then “Print to file” on their own machine, copy that file to a floppy disc and then trans­ fer the file to the PC that’s hooked to the printer. The problem arises when you use the DOS commands COPY <file­name. ext> LPT1 or PRINT <file­name.ext>. They give you little or no indication as to what’s going on. Try this for a test. Disconnect the printer from your PC and go into the root direc­ tory of your boot drive. Type “COPY AUTOEXEC.BAT LPT 1” and press <enter>. You should find that you get a message saying that the machine is now happily sending your file to the printer. You will have to wait quite a while to see it though – an eternity, in fact. Our Printer Status Indicator won’t prevent errors from occurring but it will notify you as soon as they happen. The basis of the project is a driver program called PRINTER.EXE and a 16-character x 2-line alphanumeric display. The Printer Status Indicator connects between your PC’s printer port and the printer (via DB-25 sockets) but becomes transparent to the printer port when a print file is being sent. Circuit diagram The circuit for the Printer Status Indicator in Fig.1 shows that very little additional electronic circuitry is involved. Putting it simply, the computer sends data to the printer via an 8-way Tri-state buffer. This is enabled via the SI line (pin 17) from the printer port. The SI (Select In), I (Initialise) and AF (auto-feed) control lines do not have to go directly from the computer to the printer socket for the printer to work correctly. As long as these lines are at the correct logic state, the print­ er will behave as normal. The only control line that must be fed straight through to the printer socket is the STROBE line. The SLCT, PE, BUSY, ACK and ERROR lines are outputs from the printer back to the PC and are used to indicate any problems the printer may experience during a print run. To enable us to run both the printer and the alphanumeric display from the same port, we have to stop the data from port A (data lines D0-D7) that is specifically meant for the display from going to the printer. This is accomplished by using IC1, the 74HC244 8-way Tri-state buffer. When SI pulls low, the buffers allow data to flow from the PC to the printer but when SI goes high, the outputs of IC1 go into a high-impedance state. Since IC1 is used to prevent confusion between data for the printer and data for the display, you may wonder how the display can function properly since it has the data lines connected to its inputs at all times. This is OK though because the display does not respond to the data until the AF and I lines are changed appropriately. In effect, pin 6 of the display must go high and then low (it’s a negative edge-triggered device) and pin 4 must either be high for data or low for a command (such as “clear display”). Power supply PRINTER PORT OUTPUT FROM PC (15) ERROR PRINTER PORT OUTPUT TO PRINTER ERROR (15) STR (1) (1) STR (13) SLCT SLCT (13) (12) PE PE (12) BUSY (11) (11) BUSY ACK (10) (10) ACK 1 1G 19 (17) SI 8 (2) D0 6 (3) D1 4 (4) D2 2 (5) D3 17 (6) D4 15 (7) D5 13 (8) D6 11 (9) D7 (14) AF (16) I IC1 74HC244 2G 1A4 1Y4 1A3 1Y3 1A2 1Y2 1A1 1Y1 2A4 2Y4 2A3 2Y3 2A2 2Y2 2A1 2Y1 10 6 4 7 8 9 12 D0 (2) 14 D1 (3) 16 D2 (4) 18 D3 (5) 3 D4 (6) 5 D5 (7) 7 D6 (8) 9 D7 (9) AF (14) 20 I (16) 10 11 12 13 14 2 ROW x16 CHARACTER ALPHANUMERIC DISPLAY VCC GND R/W 5 1 VO 2 3 SI (17) D1 1N4004 VR1 10k OUT 10 16VW 78L05 GND IN 9VDC 300mA PLUGPACK 10 16VW IN PRINTER STATUS INDICATOR OUT GND VIEWED FROM BELOW Fig.1: the circuit uses Tri-state buffer IC1 to prevent information intended for the alphanumeric display from corrupting the data intended for the printer. The alphanumeric display shows the current printer status & displays error messages under software control. dicator comes via a 9V DC 300mA plugpack. Diode D1 provides reverse polarity protection. A 78L05 low-power 5V regulator produces the 5V DC required to drive the display, as well as the two “dummy drive” lines to the print­er; ie the AF and I lines to the Centronics port connector. Trimpot VR1 allows you to optimise the contrast of the display to suit your viewing angle. Software As mentioned earlier, the Printer Status Indicator is driven via a software program called PRINTER. EXE. You can obtain a copy of this program from SILICON CHIP as set out PARTS LIST 1 PC board, code 07101941, 133 x 84mm 1 zippy case, 158 x 95 x 53mm 1 front panel label, 90 x 131mm 1 9VDC 300mA plugpack 1 DB25 male-to-male cable 2 DB25 PC-mount female sockets 1 2.1mm DC socket 1 16-pin 90-degree pin header 1 10kΩ horizontal 5mm trimpot 2 10µF 16VW electrolytic capacitors 4 10mm x 3mm spacers 2 5mm x 3mm spacers Semiconductors 1 16x2 row alphanumeric display (Altronics Z-7299; see note) 1 74HC244 Tri-state buffer (IC1) 1 78L05 5V 100mA regulator 1 1N4004 rectifier diode (D1) Miscellaneous Tinned copper wire, solder, screws, nuts & washers. Note: an alternative alpha­numeric display panel and matching PC board are available for this project from Oatley Electronics. For details, phone them on (02) 579 4985. Power for the Printer Status InJanuary 1994  45 FROM PC TO PRINTER ALPHANUMERIC DISPLAY IC1 74HC244 1 10uF 78L05 D1 VR1 10uF 9V FROM PLUGPACK Fig.2: install the wire links on the PC board before mounting the remaining parts. The alphanumeric display is installed by first soldering a right-angle pin header to the underside of the module & then soldering the pin header directly to the PC board. in the accompanying panel. We’ll be supplying both the EXE file and the source code for this project, so that those of you with the skill and incliBelow: the PC board assembly is secured to the lid of the case on 10mm stand-offs, with an extra nut on each stand-off to provide additional spacing. The trimpot sets the display contrast. 46  Silicon Chip nation can modify the program to suit an individual need. In operation, the software drives the alphanumeric display and sends the file byte by byte to the printer. It also provides a continuous on-screen display which shows the current status of the file in terms of the number of kilobytes sent and its status in bargraph form. This can be seen in the screen shots elsewhere in this article. Briefly, the program checks the printer’s status lines after each byte is sent to make sure that no errors have occurred during that transmission. If an error does occur, the printer changes the state of one of these status lines and the program then notifies you, both on-screen and on the LCD, that the error has occurred. To keep the speed up, the program uses one of the DOS interrupts, INT 21, in a machine-code routine to send each byte of data to the printer. The main benefit of this project is in the remote display. By having this sit next to your printer, you can instantly see when an error occurs and then rectify it. Construction The Printer Status Indicator is constructed on a small PC board coded 07101941 and measuring 133 x 84mm. Before you start installing components, check the PC board carefully against the published artwork – see Fig.7. Any defects should be fixed before proceeding further. You can start the board assembly by installing the wire links. Next up, take the alphanumeric display module and solder the 16-pin right-angle connector to the copper pads on the underside of its board. You should end up with a How To Buy The Software The program PRINTER.EXE and the source code PRINTER.BAS can be obtained by sending $6 plus $3 for postage and packing to SILICON CHIP, PO Box 139, Collaroy, NSW 2097 or by faxing your credit card authorisation to (02) 979 6503. Please nominate your choice of 3.5-inch or 5.25-inch floppy disc to suit IBM com­pat­ible computers. We accept credit card authorisations for Bank­­c ard, Visacard and Master­card. Fig.4: this is the opening on-screen display when PRINTER.EXE is executed. It gives the name of the file to be printed plus various file details & gives you the option of either printing or quitting back to the DOS prompt. row of pins which will then fit neatly into the associated holes on the main PC board. Don’t solder them to the main PC board just yet, though. The next task is to solder in the IC, followed by the capacitors, the diode, the regulator and the trimpot. After that, you can install the two right-angle DB25 female connectors on the board. Finally, mount the display module in position and secure it at the back using two 5mm spacers plus machine screws, nuts and washers. Drilling the case The next major job is to make the necessary cutouts in the specified plastic case which measures 158 x 95 x 53mm. You will need cutouts for the display bezel and for the two DB-25 sockets. The first step is to use the front panel label as a template to mark the cutout for the alphanumeric dis­play. The easiest way to make this cutout is to first drill a series of small holes around the inside perimeter of the display’s outline. The centre piece can then be knocked out and the job filed to a smooth finish. This done, the board can be temporarily positioned on the lid and its four mounting holes marked and drilled. The next step is to mark the cutouts for the two DB-25 sockets. Note that these cutouts must provide sufficient clearance for the cable connectors. As you can see from the photos, this requires holes to be cut in both the lid and the base. The cutouts in the lid are approximately 58 x 13mm at both ends, while the cutouts in the ends of the base are 58 x 14mm deep. Fig.5: this is the on-screen display that appears if problems are encountered in transferring the file. It suggests possible causes of the problem (eg, printer out of paper, printer cable not connected or printer off-line) & tells you what to check. Pressing ‘c’ will continue the file transfer to the printer once the problems have been cleared or you can press ‘q’ to quit. Fig.6: if printing is successful, the on-screen display completes the bargraph at top right & indicates that the file has been sent. Pressing any key then returns you to the DOS prompt. January 1994  47 TO PRINTER TO PC + 9VDC 300mA PRINTER STATUS INDICATOR Fig.7: it’s a good idea to check your PC board for etching defects by comparing it with this full-size pattern before installing any of the parts. The board is coded 07101941 & measures 133 x 84mm. Finally, you will have to drill a hole in one end of the case for the DC power socket. Applying power Before the unit is fully assembled into the case, it should be tested and the first step is check its current consumption. To do this, connect your multimeter in series with one of the supply leads (select the 400mA range), apply power and check that the current Fig.8: this artwork can be used as a drilling template for the display cutout. The cutout is made by drilling a series of small holes around the inside perimeter & then knocking out the centre piece & filing to a smooth finish. is less than 10mA. Any more than 20mA and you should switch off and check that you have installed all of the components correctly. If this is OK, you can hook up your printer and computer to the PC board via two DB25 cables. It is time to test the software and alphanumeric display. Copy the files on the program disc into a directory on your hard disc that’s in the path command (or modify your path command to include the These two photos show the read-out on the alphanumeric display when the printer is off-line & when the printer is switched off, respectively. Other messages are used to indicate that the printer is out of paper or that the file is being sent to the printer. 48  Silicon Chip relevant directory) and type: PRINTER C:\AUTO­EXEC.BAT <return>. You should obtain a screen display similar to those shown in this article. You are now asked to “Press [c] to start printing”. When you do so, the alphanumeric display should now show “Sending file:” on the top line and “AUTOEXEC.BAT_” on the bottom line. At the same time, your printer should also start to operate. If you’ve come this far without any problems, then it’s safe to say that the unit is working correctly. If the alpha­nu­meric display shows the correct information but the printer isn’t working, you should check that IC1 is working correctly and that you’ve installed it the correct way around. Finally, bolt the board to the lid and secure the lid to the case. Your Printer Status Indicator is now ready SC for action.