This is a discussion on SIBO serial rate setting (5baud and 10400 baud)? - Scion ; >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 ...
>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
>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).