![]() |
Forum Index : Microcontroller and PC projects : Print from PicoMite
Author | Message | ||||
grroel.tech Newbie ![]() Joined: 09/12/2021 Location: SpainPosts: 18 |
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: GermanyPosts: 471 |
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 StatesPosts: 442 |
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 KingdomPosts: 4044 |
Not current loop, I hope. John |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
Is it ascii ? Volhout PicomiteVGA PETSCII ROBOTS |
||||
bfwolf Regular Member ![]() Joined: 03/01/2025 Location: GermanyPosts: 78 |
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 KingdomPosts: 7937 |
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 KingdomPosts: 10310 |
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: SpainPosts: 18 |
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 KingdomPosts: 7937 |
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: AustraliaPosts: 6283 |
You may be able to get away without the MAX3232. There is an option to invert the serial data. 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: GermanyPosts: 78 |
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: GermanyPosts: 78 |
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 |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |