Is there any way to connect a serial printer to PicoCalc? I see a lot of reasonably-priced receipt printers and I’d like to be able to print listings and access the printer from a program (with OPEN to a serial port?) If it’s possible, could anyone detail how? Is the PicoCalc’s USB 3.0 connector accessible from a program? I see Tx and Rx labels on the side. What pin numbers are they connected to? I need to use an OPTION to associate given pins with a serial port. I assume I’d need a TTL to RS-232 converter which is no problem since I have a dozen of them at least.
Thanks for any help you may be able to give!
Off the top of my head…
i think a lot will have to do with the printer side.
If you wanted to hook up a Radio Shack TP-10 thermal printer, for example, you could to so hardware wise, but getting the communications timing correct may cause you to lose more hair.
If you use a standard serial printer, you have to deal with flow control, since the printer is much slower than PicoCalc. So that’s another RS-232 line you will have to deal with.
I’m not too worried about it. If I can get the physical connection working, I can write a driver for it. I’m a software person. My hardware knowledge is not very good. Do you know how to access the STM32 pins from PicoMite BASIC? The pins are brought out to the side of the PicoCalc but, of course they’re not mentioned in the PicoMite BASIC manual since that’s not a standard, bare chip configuration. I tried using SETPIN with various pin names for an STM32 chip but the STM32 doesn’t use pin names PicoMite BASIC can recognize.
The USB interface on the 3.0 connector is indeed connected to the USB interface of the STM32. But the official keyboard/STM32 firmware don’t provide endpoint on it.
One approach I can see for your use case, is to implement a USB printer driver on the STM32, and provide an interface (I2C or UART) for the pico to instruct the STM32 the command to send/process to the printer.
I’m pretty sure that you can’t make a USB bridge/hub with this STM32, but I think it’s possible to make something like a UART<=>USB bridge.
In any case, PicoMite doesn’t provide this kind of remote USB/GPIO driving without modifications of both firmwares.
P.S: What I see on the side interface of the picocalc, is that the only GPIOs used by the STM32 are USB and the debug serial. The others are the GPIO of the pico (shared with the SRAM bus).