--- title: "Centronics Parallel Interface" type: "article" slug: "centronics-parallel-interface" url: "http://localhost/article/centronics-parallel-interface/" markdown_url: "http://localhost/article/centronics-parallel-interface.md" published_at: "2026-12-01T10:02:11+00:00" modified_at: "2026-12-01T10:02:11+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Our microcomputer move data to and from peripheral devices in eight-bit bytes. There are two methods of moving a byte from one location to another. We can send all eight bit at once, or we can send one bit at a time. The one-bit-at-a-time approach is called serial data transmission, and the all-at-once approach is…" post_tag: - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" indiv: - name: "Guillermo Antonio Garcia (LU8MAD)" slug: "guillermo-antonio-garcia-lu8mad" taxonomy: "indiv" url: "http://localhost/indiv/guillermo-antonio-garcia-lu8mad/" publication: "QZX" publication_r: id: 21219 title: "QZX" type: "periodical" url: "http://localhost/periodical/qzx/" authors: "Guillermo Antonio Garcia (LU8MAD)" volume: "6" issue: "11" issues_articles: - id: 70148 title: "QZX v6 n11" type: "issue" url: "http://localhost/issue/qzx-v6-n11/" pages: "5-8" pubdate: "October 1988" related_articles: - id: 83275 title: "I Have Create a Monster!" type: "article" url: "http://localhost/article/i-have-create-a-monster/" - id: 83270 title: "Parallel (II)" type: "article" url: "http://localhost/article/parallel-ii/" - id: 83292 title: "Successfull Matching" type: "article" url: "http://localhost/article/successfull-matching/" - id: 83316 title: "EPROM Programmer EP 1000" type: "article" url: "http://localhost/article/eprom-programmer-ep-1000/" - id: 83265 title: "BCN-1000 Building a Beacon" type: "article" url: "http://localhost/article/bcn-1000-building-a-beacon/" - id: 83283 title: "RPT-1000 Repeater Controller" type: "article" url: "http://localhost/article/rpt-1000-repeater-controller/" archive_link: false volumeissue: "v6n11" --- # Centronics Parallel Interface Our microcomputer move data to and from peripheral devices in eight-bit bytes. There are two methods of moving a byte from one location to another. We can send all eight bit at once, or we can send one bit at a time. The one-bit-at-a-time approach is called serial data transmission, and the all-at-once approach is called parallel data transmission. Plotters and printers usually operate with parallel interfaces (usually CENTRONICS protocol). This project consist of two external ports: Centronics, and a parallel interface. The parallel interface consist of eight imput signal lines and eight output (latched) signal lines. The Centronics interface consist of ten signal lines and ground Of the active lines (non-ground), eight are for data, one is strobe line, which indicates to the receiving device that it should take the data present on the data lines, one is BUSY signal, which goes high (usually) to indicate that the receiving device is busy, and not to transmit any more data until it goes low. Some printers may have additional signals such as “PAPER END”, “SELECT”, “I-PRIME”, “FAULT”, “+ 5 Volts”, etc. ### What software is needed? The programs described here can be adapted and expanded in a number of ways. Program “TEST”: can be used to test parallel I/O port. You must adapted this principle to your need. Printer Program: The TS1000 uses its own special character code so in the program SINCLAIR code are translated to ASCII code before output. ASCII encoded data (used to driver printer) requires seven bits, so the eight bit may be ignored or used for other purposes. The routine is relocatable. Minor changes may be needed for some printers. For example, an active low READY signal requires that the jump at 16669 must be changed from JR Z to JR NZ. The addresses used by this interface is MAPPED I/O F3, but can be easily changed to FB (used by TS2040 printer) if you make an omission of inverter IC in line A3 and you must change 243 by 251 in ML at address 16647 and 16666. ### PROGRAM “TEST” ``` 16514 219 IN A, N 16522 136 16515 243 16523 64 16516 6 LD B,N 16524 211 OUT N,A 16517 0 16525 243 16518 79 LD C, A 16526 1 LD BC,NN 16519 201 RET 16527 0 16520 0 DATA 16528 0 16521 58 LD A, (NN) 16529 201 RET ``` ``` 1 REM ..(16 bytes).. 5 REM OUTPUT 10 IMPUT B 20 POKE 16520,B 30 RAND USR 16521 35 STOP 40 REM IMPUT 50 LET F=USR 16514 60 PRINT F ``` [![CENTRONICS PARALLEL INTERFACE schematic (74LS32, 74LS132, 74LS273, 74LS244, printer and peripherals connectors)](http://localhost/wp-content/uploads/2026/12/qzx-new-v6n11-centronics-parallel-interface-1-822x1024.png)](http://localhost/wp-content/uploads/2026/12/qzx-new-v6n11-centronics-parallel-interface-1.png)CENTRONICS PARALLEL INTERFACE schematic (74LS32, 74LS132, 74LS273, 74LS244, printer and peripherals connectors) ### PRINTER PROGRAM ``` 1 REM ...(159 BYTES)... 10 INPUT A$ 20 FOR X=1 TO LEN A$ 30 IF CODE A$(X)<=10 THEN GOTO 80 40 POKE 16664,CODE A$(X) 50 RAND USR 16665 60 NEXT X 70 GOTO 10 80 POKE 16642,CODE A$(X) 90 RAND USR 16643 100 GOTO 60 ``` [![PRINTER PROGRAM machine code, part 1: 1 REM, Tables 1-3 and code 16514-16587](http://localhost/wp-content/uploads/2026/12/qzx-new-v6n11-centronics-parallel-interface-2-560x1024.png)](http://localhost/wp-content/uploads/2026/12/qzx-new-v6n11-centronics-parallel-interface-2.png)PRINTER PROGRAM machine code, part 1: 1 REM, Tables 1-3 and code 16514-16587 [![PRINTER PROGRAM machine code, part 2: 16588-16675](http://localhost/wp-content/uploads/2026/12/qzx-new-v6n11-centronics-parallel-interface-3-419x1024.png)](http://localhost/wp-content/uploads/2026/12/qzx-new-v6n11-centronics-parallel-interface-3.png)PRINTER PROGRAM machine code, part 2: 16588-16675 ### CONTROL CODES (ASCII) [![CONTROL CODES (ASCII) chart: SI, SO, DC4, CR, LF, BS, DLE, ESC, NUL, FS with their Sinclair graphics characters](http://localhost/wp-content/uploads/2026/12/qzx-new-v6n11-centronics-parallel-interface-4-1024x335.png)](http://localhost/wp-content/uploads/2026/12/qzx-new-v6n11-centronics-parallel-interface-4.png)CONTROL CODES (ASCII) chart: SI, SO, DC4, CR, LF, BS, DLE, ESC, NUL, FS with their Sinclair graphics characters SI = shift in SO = shift out DC4 = device control 4 CR = carriage return LF = line feed BS = backspace DLE = data link escape ESC = escape NUL = null / tape feed FS = file separator When you need for your printer some control codes, “Printer Program” will solve this problem for you. In fact, Sinclair graphics characters aren’t included in the program printable character set and some are interpred by the printer as special control characters You will include some control character into string A$ as part of text, and the printer (that not print those) consider those characters as control codes and respond accordingly. ### ENDING This program is only a starting-point for a more elaborated for your TS1000, with LIST, COPY, GRAPHIC, etc. capability. 73’s Guillermo (LU8MAD) *** ### Corrections *[Correction printed in QZX December 1988 (v7n1), page 7; the article is referred to there as the November 1988 issue:]* There are two errors in the schematic. The IC in the upper right corner is a 74LS123 (not a 74LS132). Also the pin of that IC between pins 11 and 4 is pin 16. In the short BASIC program which accompanied the article line 30, 80, 90, and 100 should be deleted.