[Coco] Serial I/O / Printer port - “printer ready”, etc.
Brendan Donahe
brendan at polylith.com
Thu Mar 8 23:03:59 EST 2018
Allen,
My TDP-100 is near my DMP-130, so I hooked it up and tried what you
requested. &HFF21 doesn't work, and it looks like that would be CD FIRQ
control (per the Lomont PDF
<http://www.lomont.org/Software/Misc/CoCo/Lomont_CoCoHardware_2.pdf>).
However, the least significant bit of &HFF22 was able to detect whether the
printer was ready and on line or not. So I think that code should read:
IF (PEEK(&HFF22) AND 1)=0 THEN printer is ready
When I put a PRINT PEEK(&HFF22) AND 1 into an infinite loop, I could see
that turning on and off the printer would affect this bit, as would the use
of the on-line button. 0 was on and on-line, 1 was off or off-line.
Hope this helps,
Brendan
On Thu, Mar 8, 2018 at 4:07 PM, Joe Grubbs <jsgrubbs at hotmail.com> wrote:
> This reminds me of a project my dad and I embarked on when I was like 9 or
> 10. We had an enormous Data South DS-180 printer with serial and parallel
> connections. I wanted to be able to print, so we built a cable with the 4
> pin DIN and DB25 connectors, tying pin 20 (DTR) from the printer to pin 2
> on my Coco. Worked like a champ! I suffered through 600 baud printing at
> first until I found the POKEs for a bit more speed.
>
>
> ________________________________
> From: Coco <coco-bounces at maltedmedia.com> on behalf of Allen Huffman <
> alsplace at pobox.com>
> Sent: Thursday, March 8, 2018 4:48 PM
> To: CoCoList for Color Computer Enthusiasts
> Subject: [Coco] Serial I/O / Printer port - “printer ready”, etc.
>
> The Serial I/O (printer) port on the CoCo provides transmit (TX), receive
> (RX), carrier detect (CD) and ground (GND).
>
> I was aware of BASIC hanging if you tried to print and the printer was not
> online. I had been assuming this was due to using the CD line to indicate
> the printer was ready, but according to this 1983 Compute! article, it was
> the RX line:
>
> https://www.atarimagazines.com/compute/issue37/coco_printer.php
>
> This is good, because I was wondering if I could use RX with my SirSound
> Jr. project instead of the CD line so folks could build one using a $4
> Arduino clone and a .92 cent RS232-to-TTL adapter that did not provide CD.
>
> From an old modem program I wrote, I see this detects carrier:
>
> CD=PEEK(&HFF20)
> IF (PEEK(&HFF21) AND 128)=128 THEN carrier detect
>
> And from the 500 POKES, PEEKS and EXECS book in the archive, it shows this
> for printer ready:
>
> IF (PEEK(&HFF21) AND 1)=0 THEN printer is ready
>
> I don’t have a way to test the printer one, so I ask if someone here could
> verify this information is correct. I used the CD detect one, so I think it
> is okay.
>
> Being able to use two sources will enable me to have one indicate “sound
> playing” and the other to indicate “room in the buffer, you can send more
> data.”
>
> Fun stuff.
>
> — A
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
More information about the Coco
mailing list