Peter's electronic projects

PBUS communication bus for connecting microcontroller-based devices

< page 1

description

PBUS is a multi-drop communication bus for microcontrollers. Each slave node participating in the bus communication can be sent commands and data, and can respond to them with status and data. The device nodes are connected through 3 wires: GND (ground), +5VDC (power) and the PBUS signal. The bus communicates by half-duplex 2400 bps 8-bit asynchronous serial transmission, using the built-in UART of the microcontrollers. Each node has a static unique 4-bit address, which is used during communication. The master node has address 0. The maximum number of slaves is 15.

Connecting a microcontroller through bus isolation

Nodes can be isolated from the bus and powered by their own power source. The TTL level serial TX/RX signals are isolated using optocopulers.

Connecting to a computer using USB port

A computer or an embedded RISC board with an USB port can be employed as a bus master.


PIC source code for master node

This code is not currently used, so it is not well tested. It uses a trivial software-UART code for polling slave nodes.

name version description download
pmaster 010  PBUS master controller using software UART. Written and tested on 16F628, polls 2-5 devices and displays statistics on LCD pmaster.asm pbus master
LCDLIB 001 library to drive an at least 2x16 LCD display
see the lcdlib page for LCD interface schematic
lcdlib.inc, lcdlib.asm are required for the example sources to display debug info

Old source code

The PBUS was originally developed in 2000 when OTP and low-end PIC devices were more common. There is a software-UART pbus slave version for UART-less microcontrollers, but it is abandoned and no longer developed or used.

name version description download
PB12 023 polling version for 12-bit slave devices without interrupt capability (stack depth is 2). Written and tested on 16F628. Not actually tested on 12c508 devices pb12.zip pbus 12-bit slave 
PBUS 041 software UART version for 14-bit devices with interrupt capability. Written and tested on 16F628 pb14.zip pbus 14-bit slave


< page 1