Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:00 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Print from PicoMite

Author Message
grroel.tech
Newbie

Joined: 09/12/2021
Location: Spain
Posts: 18
Posted: 04:56pm 28 Jul 2025
Copy link to clipboard 
Print this post

Back in the late 70s, I was tinkering with a PDP-11 that controlled sensors and relays in a hospital. The results of the readings were printed on a noisy terminal, one of those where, if you got caught by the collar, you could consider yourself dead.
This is relevant because I would like to be able to print the data captured by my PicoMite. I have a serial printer (almost from the PDP-11 era).
Can I use the Pico's serial pins (RX, TX) to transmit text to the printer?
Is there a way to do this with MMBasic?

Regards
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 471
Posted: 05:23pm 28 Jul 2025
Copy link to clipboard 
Print this post

In short: yes.
But you have to convert the TTL levels to serial levels. To do this, you need something like the MAX3232: https://www.ti.com/lit/ds/symlink/max3232.pdf  
And, of course, your printer manual, which tells you what control sequences it needs.
I did this once with a small thermal printer (like this: https://www.adafruit.com/product/597 ) without the converter, as everything was TTL level.
Greetings
Matthias
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 442
Posted: 04:36am 29 Jul 2025
Copy link to clipboard 
Print this post

  grroel.tech said  Back in the late 70s, I was tinkering with a PDP-11 that controlled sensors and relays in a hospital. The results of the readings were printed on a noisy terminal, one of those where, if you got caught by the collar, you could consider yourself dead.
This is relevant because I would like to be able to print the data captured by my PicoMite. I have a serial printer (almost from the PDP-11 era).
Can I use the Pico's serial pins (RX, TX) to transmit text to the printer?
Is there a way to do this with MMBasic?

Regards


It's easy to do.
Once you have your pins associated with the serial port, you can turn serial output on and off with

OPTION CONSOLE SCREEN   (turns on screen, turns off printer)
OPTION CONSOLE SERIAL   (turns on printer, turns off screen)
OPTION CONSOLE BOTH     (I'll give you two guesses...)
OPTION CONSOLE NONE     (No output nohow)


Make sure to turn off the printer if you do an F4 (EDIT). For some reason, output goes to the serial port as well as the screen during an edit.

You can also OPEN a serial port then print to the open channel when you want to print.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 06:52am 29 Jul 2025
Copy link to clipboard 
Print this post

  grroel.tech said  I have a serial printer (almost from the PDP-11 era).

Not current loop, I hope.

John
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5089
Posted: 07:03am 29 Jul 2025
Copy link to clipboard 
Print this post

Is it ascii ?

Volhout
PicomiteVGA PETSCII ROBOTS
 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 78
Posted: 07:22am 29 Jul 2025
Copy link to clipboard 
Print this post

  JohnS said  
  grroel.tech said  I have a serial printer (almost from the PDP-11 era).

Not current loop, I hope.

John


Good, that you mentioned!

In former times, teletypewriters and even printers had a serial current loop (20mA) interface!

https://en.wikipedia.org/wiki/Digital_current_loop_interface

https://heepy.net/index.php/Optocouplers_for_teletype_current_loop

@grroel.tech: Check!

bfwolf
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 08:04am 29 Jul 2025
Copy link to clipboard 
Print this post

Hehe...
My Nascom-1 had a 20mA current loop to connect it to a heavily carved up KSR33. The keyboard and tape punch had been stripped out by someone else and a solenoid driver transistor with an opto-coupler added for the solenoid. That made it much easier to drive!

The Tandy model 1 got the "luxury" of a Oki Microline 80 with a Centronics interface. A printer famous for having no descenders for lower case characters and, IIRC, no graphics other than Kanji characters. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 08:43am 29 Jul 2025
Copy link to clipboard 
Print this post

  Quote  In former times, teletypewriters and even printers had a serial current loop (20mA) interface!


https://www.worldradiohistory.com/UK/Personal-Computer-World/70s/PCW-1979-02-S-OCR.pdf

Page 23  
 
grroel.tech
Newbie

Joined: 09/12/2021
Location: Spain
Posts: 18
Posted: 08:59am 29 Jul 2025
Copy link to clipboard 
Print this post

No, the printer is a little more modern than the PDP-11 in question, and it has a standard RS-232 interface. I have used it until today, with my Sinclair QL for years, and then on compatible PCs.
As for my question, I would like to know if it is possible to open a channel in MMBasic, such as OPEN#5,COM2. Or should I simply use DEVICE SERIAL, RX pin, baudrate, string$.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 09:15am 29 Jul 2025
Copy link to clipboard 
Print this post

It's a normal UART interface, so you should be able to use
OPEN comspec$ AS [#]fnbr to open a COM port then
PRINT# fnbr, expression... to send the text.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:52am 29 Jul 2025
Copy link to clipboard 
Print this post

You may be able to get away without the MAX3232.
There is an option to invert the serial data.
  Quote  INV specifies that the output signals will be inverted and input assumed to be inverted

A lot of RS232 devices are happy with 0 to 5V rather than +-12V,and some may be happy with 0 to 3.3V levels.
If you connect the return signal, you will need lots of clamping to keep it within 0-3.3.
It is worth a try...

Jim
VK7JH
MMedit
 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 78
Posted: 10:56am 29 Jul 2025
Copy link to clipboard 
Print this post

  matherp said  
  Quote  In former times, teletypewriters and even printers had a serial current loop (20mA) interface!


https://www.worldradiohistory.com/UK/Personal-Computer-World/70s/PCW-1979-02-S-OCR.pdf

Page 23  


@Peter, @Geoff: Page 19 - "MIGHTY MICROMITE" - THE predecessor of PicoMite !

bfwolf
 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 78
Posted: 11:28am 29 Jul 2025
Copy link to clipboard 
Print this post

Long-long ago (1987/11) the ELEKTOR magazine published an interesting project with the 8052AH-BASIC microcontroller..

Very clever in the schematics: A cheap RS232 interface without IC (MAX etc.):



Used it several times in other applications.
BUT: it only works, if the remote has a full RS232 !

bfwolf
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025