Question on I/O BUS and Centronics interface

65 views
Skip to first unread message

Gabriele Giani

unread,
Jun 20, 2024, 6:27:13 PMJun 20
to Altair-Duino
I assembled the centronics interface shown in David Hansel's github.
The printer is an OKI Microline 182.

I can show the printer to the Altair-duino, but it partially works, in other words when I print something, for example a simple listing in BASIC, the printer starts printing but it always does so on the same line, it's as if it wasn't there the Line Feed command. I also tried to force the LF command at the end of each line by setting it via the dipswitch on the printer, but the result does not change.
I followed David's video tutorial on youtube even though I didn't understand exactly which disc is mounted at first.
Can you tell me where I'm going wrong?

da...@hansels.net

unread,
Jun 20, 2024, 9:47:07 PMJun 20
to Altair-Duino
If the printer is printing then the card is working fine. There is no special handling for CR/LF on the card itself,
it just passes through whatever the Altair software writes to the printer port.

I'm surprised that the DIP switch on the printer did not make a difference. Generally this situation is
exactly what those switches are for. You may want to double-check the switch.

I'm away from home right now and also don't have the exact printer model you have so I don't know if
I can help you more with that. It might take some experimenting with the printer to figure it out. One
thing to try would be LPRINT CHR$(10) from BASIC. That should send an LF and force the printer to
advance to the next line. If that doesn't work either then maybe something is wrong with the printer
mechanism? Just guessing here.

David

John Galt

unread,
Jun 20, 2024, 11:45:53 PMJun 20
to Altair-Duino
check against the manual settings

I have experience with the microline 192 which i had hooked to my Altair but using the serial port with a parellel converter from B&B.

the 192/193 model has a internal battery for settings backup and instead of dip switches has a electronic menu where you setup everything internally without dip switches using the paper as a line terminal to make changes and save changes.

I had connection issues with the 192/193 printer as it does not have a large print buffer, the result was at 9600 baud i was dropping characters, i needed to drop serial speeds down to 300-1200 baud to allow the printer to keep up.

because of the issues i switched to a Microline 320 Turbo this printer was able to keep up with output at 9600baud. it was a pain to keep changing around the Baud rates as i have a serial switcher and have multiple 9600 baud devices sharing the same port.

what you might notice when you get the new line working is in basic if you LLIST it will seem ok 
but then you will start to notice some formatting weirdness on the paper, if you look close you might see data dropping out.

you can also hit CONTROL P on the CP/M prompt which will send screen copy to the printer.
when you hit DIR and have a large directory you will notice things dropping out as well.

if that happens drop the baud rate lower and lower until the issue stops.

hopefully this helps you.

Tom Wilson

unread,
Jun 20, 2024, 11:58:52 PMJun 20
to John Galt, Altair-Duino
Some other obvious things to test:

1. Does paper feed when you use the feed buttons on the front?
2. If you print a single line with the characters "@ABCDEFGHIJKLMNO", do they all come out correctly (aside from the line feed)?

#1 checks for something like a broken belt or the stepper motor for the roller not working 
#2 checks for a stuck bit or broken connection on the low 4 bits. 

It is possible for the CR to work and for LF to not work, if bit 1 is stuck off. The value 13 is 8+4+1, and the value 10 (LF) is 8+2. So if the "2" wire (bit 1) is broken, then line feed won't work, and the print @-P test will probabLy print something liKe @A@ADEDEHIHILMLM





--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/altair-duino/d047aa0f-678c-4649-a6e3-47f9d2761f31n%40googlegroups.com.

John Galt

unread,
Jun 21, 2024, 12:03:11 AMJun 21
to Altair-Duino
also the microline has a test mode it will print out all characters over and over and line feed automatically.
you could test to make the sure the printer is ok just to rule it out.
the buttons on the front of the machine are also notorious for getting a little flakey so you may need to wiggle them as you push them to make sure they activate.

Gabriele Giani

unread,
Jun 21, 2024, 9:30:42 AMJun 21
to Altair-Duino
Here I am, I have done all the tests you suggested, but I haven't solved the problem!
1. I did printer AutoTest, prints correctly, advances one line correctly
2. I tried to print LPRINT "@ABCDEFGHIJKLMNO", it prints correctly
3. The LINE FEED button on the printer advances one line correctly
4. modifying SWITCH#3 (on the printer) does not produce any changes. The switch should add an LF to the end of a print line (?)
5. the CONTROL+P command on CP/M does not print anything. Which version of CP/M should I use?

I add some information on my configuration, perhaps it is useful to understand the problem:
- AltairDuino configuration: I selected the "C700" as the printer with the "Not mapped" option. I also tried with "OKIDATA/88-LPC" and "generic" but nothing changes
- centronics interface card: the jumpers are set as shown in the image on github and in David's demonstration video (DDDDDDU - D=down, U=up)

Furthermore, two small questions:
A. Is it correct that PIN14 (LINE FEED) of the centronics connector is connected to nothing?
B. What is the PRINTER SELECT Jumper on the card for? Does it need to be open?

Thanks again, I hope this information can be useful to tell me what's wrong?

da...@hansels.net

unread,
Jun 21, 2024, 10:17:19 AMJun 21
to Altair-Duino
On Friday, June 21, 2024 at 9:30:42 AM UTC-4 gabriel...@gmail.com wrote:
Here I am, I have done all the tests you suggested, but I haven't solved the problem!
1. I did printer AutoTest, prints correctly, advances one line correctly
2. I tried to print LPRINT "@ABCDEFGHIJKLMNO", it prints correctly
3. The LINE FEED button on the printer advances one line correctly
4. modifying SWITCH#3 (on the printer) does not produce any changes. The switch should add an LF to the end of a print line (?)
5. the CONTROL+P command on CP/M does not print anything. Which version of CP/M should I use?

What about LPRINT CHR$(10)
Does that advance the paper?
 
I add some information on my configuration, perhaps it is useful to understand the problem:
- AltairDuino configuration: I selected the "C700" as the printer with the "Not mapped" option. I also tried with "OKIDATA/88-LPC" and "generic" but nothing changes

This configuration is just for printer emulation. It does nothing for a real connected printer.
The only important setting is to set the printer to "Not mapped" (as you did) to turn off printer emulation.
 
- centronics interface card: the jumpers are set as shown in the image on github and in David's demonstration video (DDDDDDU - D=down, U=up)

Those jumpers are for configuring the card address. Since your printer does print your settings here
must be correct. They have nothing to do with linefeeds.
 
Furthermore, two small questions:
A. Is it correct that PIN14 (LINE FEED) of the centronics connector is connected to nothing?

That's a good question. Some documentation suggests that pulling this LOW (connecting to ground)
may cause some printers to produce a line feed after carriage return. It never made any difference for
the printers I had that's why it is not connected. Connecting pin 14 to ground may be something to try.
 
B. What is the PRINTER SELECT Jumper on the card for? Does it need to be open?

Another signal that is required by some printers and not others. Some printers need the PRINTER
SELECT signal grounded, otherwise they won't respond at all. If your printer generally responds
without this jumper installed then installing it won't make a difference.

David

Gabriele Giani

unread,
Jun 21, 2024, 11:16:40 AMJun 21
to Altair-Duino
RESOLVED !!!!

Thanks to David's suggestion!
I grounded the PIN14 of the Centronics cable (used for the AUTO LINE FEED) and now the printer works correctly!

Thank you all so much for the support you are giving.
Now I'll have fun with some other interface cards.

I'd like to build a PAPER TAPE READER, but I can't find the paper tape.
1. can you tell me where I can buy the tape (I'm from Europe)?
2. How are the holes made on the tape?

Chris Davis

unread,
Jun 21, 2024, 12:05:58 PMJun 21
to Altair-Duino
I'm not aware of any vendor that sells 1" paper tape consistently.  You can occasionally find it on eBay.  eBay is also your best source for a paper tape punch, but they are very expensive.


I was fortunate to get a heck of a deal on a paper tape punch/reader a few years ago.  Here it is in operation: https://youtu.be/Nf1vG_Dn-Ew?si=mkJOrl2RGyj0IKY6

John Galt

unread,
Jun 21, 2024, 12:38:07 PMJun 21
to Altair-Duino
with "Control P" and Cp/m

if that does not work then you need to modify the IOBYTE.

you can type in  "STAT VAL:"  at the prompt and it will list devices

CON: = TTY: CRT: BAT: UC1:
RDR: = TTY: PTR: UR1: UR2:
PUN: = TTY: PTP: UP1: UP2:
LST: = TTY: CRT: LPT: UL1:

your interested in LST:
the default LST: is set to CRT: usually

STAT DEV: gives your current configuration.

if you want to get a working printer out of PORT B then you type
STAT LST:=LPT:

to flip port b into a remote terminal type or start using the printer as a line terminal.
STAT CON:=UC1:

to flip back  or if your cp/m had a different default you can use the information you got from STAT DEV:
STAT CON:=CRT: 

you can then play around with LST: and try UL1 or LPT to see if it will map the printer device to the Centronics card.

on each cold boot you would have to just type the device change on the command line.
or there is a way to modify the IOBYTE save the change and on each cold boot it will automatically make the change for you.

how to modify the O/S:


Mark Moulding

unread,
Jun 21, 2024, 1:20:04 PMJun 21
to Altair-Duino
The printer's built-in test mode is engaged by holding down the LineFeed button while turning the power on; at that point the printer should output a "slide" of the entire character set continuously until the SEL button is pressed or power is turned off.  However, just pushing the LineFeed button alone (sith the SEL light off) should be enough to determine whether the printer itself is the problem.

Silly question: Is the paper clamp engaged (the lever that clamps the paper using pressure rollers against the platen roller)?  Unless you're using pin-fed paper, this must be the case.

Regarding dropping character at higher baud rates: That's what flow control is for.  The printer has a Busy signal that it asserts when fewer than 256 characters of space remain in its internal buffer.  This is the probably pin 4-RTS (Request To Send), which will be de-asserted to indicate a busy condition.  At this point, the UART driver code should suspend sending further characters until the RTS line becomes asserted once again.  CP/M has a BIOS function (15-LISTST) to allow a user program to determine if the printer is busy as well; this would also check the state of the RTS line.  (In the BIOSs I wrote, internally I'd just call that function before sending any character to the printer.  There's also pin 20-DTR (Data Terminal Ready), which the printer de-asserts when it's off-line or the paper is out; this should probably also be handled the same way as the RTS line.
~~
Mark

Mark Moulding

unread,
Jun 21, 2024, 1:27:02 PMJun 21
to Altair-Duino
Ah - sorry.  I see that the OP is using the Centronics parallel interface, not serial.  In that case, all of the same logic regarding the busy and ready signals exists; they're just on different lines in the parallel connector.  Specifically, pin 10 is the BUSY signal (high when busy), and pin 11 is the PAPER OUT signal (high when paper is out).  Pin 12 is also implemented, showing that the printer is on-line (high=SELECT ON).
~~
Mark

Reply all
Reply to author
Forward
0 new messages