MBUS is uni-directional asynchronous serial communication circuitry. The protocol is compatible with RS232D to some degree.
It turns out to be quite easy to drive, and useful, the only inherent problems it has it that it's slow and single duplex. But can be interrupt driven and no big synchronisation and realtime issues on either side. Good enough for debugging and simple tty-like remote interfaces.
An example implementation can be found in the MADos CVS repository in hw/mbus.c.
Maximum baudrate | 9600 (probably) |
Data | 8 bit |
Parity | Odd |
Flow control | None |
Stopbits | 1 |
Fifo | 1 byte |
You can even use a terminal program like Minicom to connect, use the settings '9600 8O1'.
MBUS is driven through four memory mapped I/O ports of 8 bits:
MBUS is controlled by two interrupts:
Make sure both MBUS IRQs are disabled while doing the initialisation.
Initial values:
Register | Value |
PUPControl | 00001000 (0x08) |
MBUSControl | 00000000 (0x00) |
MBUSStatus | 11010000 (0xD0) |
Read from MBUSData.
Test bit 6 (0x40) of MBUSStatus, if not set, we cannot start transmission (?)
This:
Write to MBUSData.
After first byte, set bit 5 (0x20) of MBUSControl
When finished sending data, clear bit 5 (0x20) of MBUSControl
Read from MBUSData
If state is send -> clear bit 5 of MBUSControl
clear bit 6 of MBUSControl
set bits 0,1,2 of MBUSStatus
Disable FIQ3
If MBUSControl bit 6 (0x40) is set (receive mode enabled):
if bit 4 of MBUSStatus(send ready) and bit 5 (0x20) of MBUSControl (send mode)
-> 'send byte'
Enable FIQ3
Signifies timeout and restarts receiver? This is still a mystery.
Make program that
Phone side:
PC->phone also seems to work, although no speed test and interrupts have not been tested.
Last updated: 2005-02-21 14:19
This site is the result of a great deal of assembly code reading, research, countless (mostly futile) searches for data sheets, cross-referencing and analysing. If you use this information in any way please mention wumpus <blacksphere@goliath.darktech.org> (and others in the credits section) in the credits of your program/document. And tell me :) If you have more information please contribute. If you just copy this, stick your name on it and call it yours I hope you get your genitals bitten off by a three headed monkey. Have a nice day.
No mobile phones were harmed in the production of this site.