Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SIBO serial rate setting (5baud and 10400 baud)?

44 views
Skip to first unread message

Mark

unread,
Dec 11, 2007, 7:33:52 AM12/11/07
to
>Newsgroups: comp.sys.psion.programmer, comp.sys.psion.misc
>From: m...@hotmail.com (Mark)
>Date: 9 Aug 2004 07:56:22 -0700
>I want to set the Psion 3c serial port to 5 baud (7 bit, odd parity,
>one stop bit) and later to 10400 baud (8 bit, one stop bit, no
>parity).
>These are not standard rates, and it is not described
>in the SIBO OPL manuals nor "davros" info.
>Does anyone know how to bypass the standard serial rates by
>settting the UART speed divisor register directly.

>Andrew Gregory wrote:
>I've just checked my copy of the hardware development kit documentation. ASIC5 implements >the RS232 interface as used in the 3-Link. It *is* possible to access the divisor register. The >value is set as 1-(96000/baud rate). eg 9600 baud is set as -9 ($FFF7). The next step up is -8, >which works out to 10667 baud. 5 baud is -19199 ($B501). However, 3c/3mx machines cannot >be using the ASIC5 interface, as they support baud rates like 38400, 57600 and 115200 which >cannot be obtained using the above method. I'm pretty sure Psion created a new IC to >integrate the RS232 and IR interfaces, but all my documentation predates the 3c. You're >welcome to look at the HDK stuff I have on one of my webpages ...

I thought I would update this thread I started long ago for those
interested in how it is done!

Thanks to Andrew for pointing me in the right direction and to Psion
Teklogix for critical information on the Serial Physical Device Driver
(PDD) SYS$SRMX for the ASIC9MX.

The setting of serial baudrates is done by a PDD belonging to TTY: and
each PDD is based on what hardware exists on the particular machine
(ie. TTY.SMX is for the 3mx & WAmx; TTY.SRX is for the 3c I think,
etc). I have a 3mx so the TTY.SMX PDD needs to be changed in order to
get my desired baudrates. Instead of writing a new PDD, I decided to
just write a Logical Device Driver (LDD) that will add the required
Set (function #7) features I need in order to override the settings of
the TTY.SMX. My LDD (named BOD:) is less than 400 bytes long!

How it's done: TTY.SMX maintains a control block called
SerMXChannelCB in the OSDataSegment to control the status of the
serial port. After checking this CB to verify that the serial port
(TTY:A) is open and is running, I update the baudrate divisor field &
the control byte field in this CB and then access the UART directly
to set its divisor registers and control byte register using IN and
OUT assembler instructions. I update the CB just in case the OS
places a "hold" on the device and later a "resume", resulting in the
PDD automatically resetting my desired settings. The value of the
divisor is based on the ClockSpeed the UART is running at and this
rate differs depending on what machine it is. For the 3mx, this is
3,686,400 Hz and the divisor is computed by the formula: 3,686,400 /
16 / baudrate (0x0018 is 9600 baud, 0xB400 is 5 baud, etc).

Mark

Lostgallifreyan

unread,
Oct 2, 2010, 3:47:59 PM10/2/10
to
Mark <mc_ric...@hotmail.com> wrote in
news:931cb2f0-6b5b-4464...@d21g2000prf.googlegroups.com:

Thankyou. It means I can't get MIDI by tweaking to 31250 BAUD on the WA MX,
but at least I now know exactly why. :) Like Gregory said, there seems to be
a lack of documentation for the MX, detailing what differs from the older
machines.

If anyone knows a neat bit of DIY baud-rate bending hardware, please point me
at it. I'm after using the fastest rate (115200) on the WA MX, and assuming
that soem widget with a buffer will send the byte out at 31250 the next
chance it gets. Conversely, on receiving at 31250, it sends into the WZ MX
serial at 115200 ASAP. Crude, but no doubt effective. :) The MIDI current
loop and optoisolator stuff I can do, but I'm out of my depth on the neatest
smallest way to do the baud rate bit.

Lostgallifreyan

unread,
Oct 2, 2010, 6:18:26 PM10/2/10
to
Mark <mc_ric...@hotmail.com> wrote in news:931cb2f0-6b5b-4464-9d62-
d7f52b...@d21g2000prf.googlegroups.com:

> The value of the
> divisor is based on the ClockSpeed the UART is running at and this
> rate differs depending on what machine it is. For the 3mx, this is

> 3,686,400 Hz...

Do you (or anyone else) know if the UART in the WorkAbout MX has an
independent crystal, and that if this crystal were replaced by one that
allowed the divisor to result in a clean 51250 baud, would the UART and the
rest of the machine still be in proper contact with each other's doings?

If so, I'm considering a simple adaptation to switch between two crystals for
when I want the serial ports to do MIDI.

0 new messages