The title "The serial communication thread" is perhaps presumptuous.. perhaps no one else uses or cares about the RS232C port of their own little Albert(s) anymore... well let's see.
I am using the RS232 port connected to a PC which itself runs an "Albert server" in order to support 'remote' disk drives. (More details of this are in a separate thread). This is all working pretty swimmingly but for one thing: 9600bps is so slow, so 'last century'. If this is all Einstein can handle, so be it. But if that could be, say, doubled, that would make a real perceptible difference.
The standard MOS call definitely only goes up to 9600. Furthermore, looking at the actual ROM code, I see that the timer reload value for 9600 is 13 - not divisible by two in the realm of integers. But undeterred, I thought: what if I try the value 6 anyway. This corresponds to a bit rate of 20800 to I started "picocom --baud 20800 /dev/ttyUSB0" on the PC. It complained that could not set that exactly , but got well within 1% which is usually good enough for RS232-C.
Simply typing characters to and fro between the PC and Einstein worked fine. Of course, I need to try more intensive data transfer before concluding this is a viable solution, but I'm optimistic. Some concessions I may need to make are:
- disable the 1 second interrupt.My Einsteins don't know what day day it is, so not keeping the time to within a second is no great loss.
- perhaps disable all interrupts during data transfer.
- (almost certainly need to:) use straight I/O instructions for serial port access rather than the (nifty but time-consuming) MOS calls. This would make it easier to, where appropriate, put a poll limit on read operations.
While I was hooking my scope up to check the timings, one of my poorly soldered connections fell apart (again!), so I didn't get beyond establishing that I really had doubled the transfer rate. ..
Any thoughts/recommendations from the rest of the Einstein community?
Larry Myerscough (aka papahippo)
The serial communication thread
-
- Posts: 266
- Joined: Wed Oct 23, 2019 8:43 pm
Re: The serial communication thread
Very intersting, you never know when things like this will come in handy. One day someone will want to do some serial transfers and this thread will be perfect! It’s fun to tinker about too
Re: The serial communication thread
Since then , I have uploaded my entire Einstein software collection first to a PC, then onward to 'The Cloud'... and I've unearthed another 'domino' plug from my bags of tricks and made a second cable with better (but still not particularly good) soldering.
In the other direction, I can currently only load stuff via the ZEN utility, but I'm working on extending my 'xXDOS' so I can copy some or all files from a remote directory onto Alberto.
All this stuff is available - albeit in a rather scruffy form - on https://gitlab.com/papahippo/einstein
In the other direction, I can currently only load stuff via the ZEN utility, but I'm working on extending my 'xXDOS' so I can copy some or all files from a remote directory onto Alberto.
All this stuff is available - albeit in a rather scruffy form - on https://gitlab.com/papahippo/einstein