PPC Overview
At the heart of the PPC is a dedicated comms processor based around a Zilog Z180 with hardware specially designed to support high speed data transfers over multiple ports. It executes user programs written in PPC Pascal, C or Basic.
The PPC's four serial ports support a wide range of baud rates and handshakes and all ports are accessible to user programs. The first port (Port 1) can be placed into an "Executive" mode in which the PPC's functions are accessed via an ANSI (e.g. VT-100) terminal at up to 38,400 baud. This mode can also run over a modem.
The PPC Executive is a highly intuitive menu system (see example below) which supports the creation, editing, compilation and execution of user programs and many other features; for example: user programs can be listed to ASCII or Postscript printers, can be encrypted, copied, or marked for automatic execution at power-up.
Everything in the PPC is menu-driven and intuitive, as the port configuration screen (below) demonstrates.
In addition, the PPC configuration text can be dumped to a ASCII, Postscript or HPGL output device connected to any of the four ports.
PPC Programming Languages
The PPC can be programmed in Standard Pascal (with comms and other extensions), ANSI C, and Tiny Basic. The interactive Pascal development environment is fully self-contained and nothing extra needs to be purchased. The one-pass compiler is a high quality well-tested (since 1981) product which compiles even the largest programs in seconds. The Pascal source program is stored in the EEPROM-based filing system in source form, and is compiled automatically at power-up. The Pascal source can also be encrypted for security. As the runtime routines are ROM-based, the usual large runtime library overhead is avoided. Pascal programs up to 2000 lines have been developed.
The strict type checking in Pascal helps to ensure rapid application development. If a program compiles, it is generally 90% there. However, PPC Pascal is also very easy to use for the most trivial programs. As with C, you do not need to use the esoteric language constructs to get the job done.
The ANSI C development environment consists of a high quality PC-based cross-compiler, available separately. Sample programs, makefiles, etc. are provided, including a test program which demonstrates the use of all PPC-specific C runtime library extensions. The binary executable is stored in the EEPROM-based filing system, and can be encrypted for additional security. C programs up to 10000 lines have been developed.
The C capability is suitable for the largest comms projects.
The Tiny Basic is an integer-only Basic interpreter intended for extremely simple tasks only.
On a scale of 1 to 100, the relative TYPICAL runtime speeds of the three languages are 1, 50, 150 (Basic,Pascal,C). Note however, that the 3-1 difference between Pascal and C does not necessarily translate to actual performance, because most products are baud rate and protocol-timing limited, even at 115200 baud.
PPC Program Development
User programs are entered and modified with the PPC internal full-screen text editor, or they can be generated with any non-document editor on an IBM-compatible PC and uploaded to the PPC, where they reside on a highly secure EEPROM-based filing system. Basic programs can also be entered while in the standard Basic interactive mode. C programs are cross-compiled on a PC and the binary image is uploaded to the PPC.
Program debuging is easy: debug print statements can be included anywhere as required and the debug output can be sent to any port. For development of larger programs, the PPC allows independent debugging via a third port while normal data I/O is taking place on two other ports.
An Input Hex Dump function is provided in the Executive and this greatly assists in the analysis of an incoming data stream.
No facilities for machine code or assembly language programming are required and none are provided. The user requires no knowledge of hardware or system software in the PPC.
All PPC communications are interrupt-driven, are buffered and run in the background. This makes programming easy: everything is done via high level READ and WRITE commands.
For example, the PPC Pascal program below reads data from port 3, converts any lowercase characters to uppercase and transmits the result out on port 4:
program
upper; var ch:char; begin repeat bread(port3,ch); bwrite(port4,toupper(ch)); until false; end; end. |
An equivalent PPC Basic program would be: |
10 REDIR(4) 20 C=WGET(3) 30 IF C<97 GOTO 60 40 IF C>122 GOTO 60 50 C=C-32 60 PRINT CHR$(C), 70 GOTO 20 |
or ANSI C: |
main
upper ; { char ch; for (;;) { fgetc(port3,ch); fputc(port4,toupper(ch)); } { |
Since all ports have buffered I/O, programs are not generally time-critical provided that the correct handshakes have been enabled.
The ANSI C implementation also seamlessly supports the above buffered I/O in the fputc, fgetc, fprintf, etc.
PPC Filing System
Up to 20 separate programs may be stored. The maximum source program size is approximately 30,000 bytes and, in Pascal, this is more than sufficient for very complex programs indeed. Even the largest Pascal programs compile in seconds.
When a program is finished, it can be marked as "autoexec". Whenever the PPC is powered-up, that program will be automatically compiled and executed.
Even if the PPC is configured to "autoexec" a program automatically at power-up, it is possible to override this and enter the Executive by holding-down a front panel switch during power-up. This prevents a PPC being inadvertently placed into a state from which no recovery is possible.
The filing system uses a state-of-the-art EEPROM device which ensures secure and virtually indefinite storage without a battery.
The PPC EEPROM-based filing system is far more reliable than the much cheaper and much more common CMOS battery-backed data storage methods, particularly in electrically harsh environments. This, together with the PPC's shielded construction, enables the PPC to be installed almost anywhere.
The PPC has a hardware 1.6 second watchdog which normally runs as part of the operating system but can also be directly accessed from within C programs for more sophisticated program protection.
The PPC Editor
The full screen editor uses "Wordstar" style commands, and, like all PPC functions, works with any ANSI-compatible terminal. However, the KTERM.EXE ANSI terminal emulator (supplied) offers additional features: it provides fast PPC-PC file transfer, supports 43 and 50 line modes on PCs equipped with EGA or VGA displays, and runs at up to 38,400 baud for very fast screen updates.
The editor is integrated with the Pascal compiler: when a compilation error occurs, it is flagged and the user is offered the option to enter the editor; doing so places the cursor at the error location:
Non-Volatile Data Storage
A particularly useful feature accessable to PPC Pascal programs is a 2000-byte nonvolatile storage area. This supports programs which need to record information permanently. As this feature uses a part of the EEPROM, the standard EEPROM write limit of 10,000 (typically > 100,000) writes per memory location applies. Another type of nonvolatile storage is the -96 option which provided a 96k byte "character file" in SRAM which can be battery backed using a Dallas SRAM socket.
Real Time Clock
An optional real-time clock module can be factory-fitted, with the date and time readable and writeable from PPC Pascal or C. A lithium battery provides a life of 10-20 years. The clock is Y2K compliant.
Program Security
Programs are stored in the PPC in Pascal or Basic source form. The Executive includes a highly secure password-controlled encryption facility which prevents an encrypted program being viewed, printed or transfered to a PC while allowing all other PPC functions to remain accessible. However, an encrypted program can still be marked "autoexec" and execute automatically at power-up. This feature is invaluable for a value-added PPC reseller who has developed a PPC program whose source text must be protected.
Programs written in C are stored in binary form but can also be encrypted if required for additional security.
DES Encryption Option
This is an implementation of the standard 64-bit (56 bits+parity) DES algorithm. It runs at around 3500 bytes/second (-H3 PPC speed option) which is sufficient for 19200 baud concurrent duplex comms, or 38400 baud comms with data flowing mostly one-way.
A simple fixed-key Pascal program is included in source form on the PPC diskette which implements an encrypted link over two modems.
PPC units fitted with the DES option may require an export license.
Digital I/O
The DG1 digital I/O card is an optional card which fits inside the PPC and offers 16 TTL-level inputs and 16 open-collector (ULN2803) outputs.
For the PPC-E, the DG1E card offers the same capability for the PPC-E. A custom backplane is normally required to achieve the required connections between the two.
Custom Products
Various custom products have been delivered, based on the PPC.
Full details
are in the PPC/PPC-E User Manual which is available in PDF format: